File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Control the loop of ); Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Control the loop of );" Watch "Control the loop of );" New topic

Control the loop of );

Hewa Naimanage Sumedha Amalka

Joined: Oct 31, 2006
Posts: 19
Hai, guys
I am using the ODBC database (Excel Sheet) and i wanna get the records from it. My code is scucess but there is a problem in method.

The thing is it retrieving all the data including the none data fields, so finally it became a never ending loop.

pls help me to get the data rang's records

Statement stmnt = connexl.createStatement();
String query = "SELECT * FROM [IJTS$]";
ResultSet rsxl = stmnt.getResultSet();

while( {
String excelname = rsxl.getString(1);
String excelcate = rsxl.getString(2);
System.out.println(" "+rsxl.getString(2));

SCJP 1.4 71%, SCWCD 1.5 84%, SCBCD 90%, SCMAD 98%
Prabhu Venkatachalam
Ranch Hand

Joined: Nov 16, 2005
Posts: 502

Try this. It should work.

Prabhu Venkatachalam<br />SCJP 1.4,SCWCD 1.4<br />
subject: Control the loop of );
It's not a secret anymore!