|
-
Apr 29th, 2003, 07:29 PM
#1
Thread Starter
New Member
JBDC Malfunctioning of SQL Query after customizing the ResultSetType ...
I am developing a JDBC database system using Microsoft Access as the storage facility. All users are authenticated before accessing the system. I achieve this through the following SQL query that just simply compares the user logon to the Access database. It's working fine initially. However, when the ResultSet was switched from TYPE_FORWARD_ONLY to TYPE_SCROLL_INSENSITIVE, the executeQuery() failed to return any record. Does anyone know what could be the cause of this misbehavior, and how could I solve it ??
Thanx in advance.
***********************************************************************
...
...
String sql = "SELECT * FROM Staff WHERE username = 'mary' AND strComp(password, 'pp12344', 0) = 0";
...
...
...
stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
results = stmt.executeQuery(sql);
...
...
...
System.out.println(results.next()); //keep saying "false" meaning no record found ??
...
...
...
***********************************************************************
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|