I have NO problems in conneting to Ms acees thro java jdbc-odbc bridge.
I get a result set and i read the data from say column c1.
Then say i try to read the same c1 data agin in the very next line, i get an 'no dat afound error'
Here is the part of code ..
while(rs.next())
{
System.out.print(rs.getString("UserId"));
System.out.print(rs.getString("UserId"));
}
I get output for 1st system.out, but with the second one i get an error " no data found"
Any ideas Gurus???
Thanks
-
Help wanted for java - MS access (1 messages)
- Posted by: sean decor
- Posted on: August 30 2002 03:40 EDT
Threaded Messages (1)
- Help wanted for java - MS access by Ken Hall on August 31 2002 01:21 EDT
-
Help wanted for java - MS access[ Go to top ]
- Posted by: Ken Hall
- Posted on: August 31 2002 01:21 EDT
- in response to sean decor
This is a while loop and will keep repeating until there is nothing left in the ResultSet
Modify your code to be:
while(rs.next())
{
System.out.print(rs.getString("UserId"));
}
and you will loop through the ResultSet correctly.