This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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 />
Have you checked out Aspose?
subject: Control the loop of );
It's not a secret anymore!