Title: Accessing a database via servlets
hi ravi
 
u have used a wrong column name.. in the seslect query u have used 
     rs = stmt.executeQuery("SELECT NAME,PHONENUM FROM SUBSCRIBERS");
NAME adn PHONENUM but while ur using userid and password  browsing the result set
 
better use index number ....
 
hope ur problem is solved
 
bye
jaya krishna
 
 
 while(rs.next())
                        {
                                out.println("<LI>" + rs.getString("userid") + " " + rs.getString("password"));
                        }
 
----- Original Message -----
Sent: Monday, February 07, 2000 10:05 AM
Subject: Accessing a database via servlets

Hi list,

I tried to implement Jason Hunter's example on a JDBC call to a database (Access in my case) and throw the resultant output via a servlet. Everything works fine but after showing the resultset on the browser the JVM comes up with a "memory read failed" error message. Has anyone experienced similar problems???

I am enclosing the sample code I used. Before you check this out. Please create a DSN to an Access database with a table named subscribers having Name and PhoneNum as the field names.

<<DBConnect.java>>

Please do let me know if any of you are having this problem.

Thanks k Regards

Ravi Kumar Gopalankutty
Cognizant Technology Solutions,
Ph: 044-2354281 Extn:4423
e-mail: [EMAIL PROTECTED]
_______________________________________________________________


Reply via email to