----------
From: SERVLET-INTEREST(a)JAVA.SUN.COM
Sent: Friday, April 30, 1999 3:07 PM
To: SERVLET-INTEREST(a)JAVA.SUN.COM
Cc: qianjh(a)FUDAN.EDU.CN
Subject: another SQLException
Try closing the statement after you do the gets.
Please try the following:
con.setAutoCommit(false); //not needed since this is just a select
Statement stmt1=con.createStatement();
String query1="select * from customer_binfo where
customer_num="+customernum;
ResultSet rs1=stmt1.executeQuery(query1);
Statement stmt2=con.createStatement();
String query2="select * from customer where
customer_num="+customernum;
ResultSet rs2=stmt2.executeQuery(query2);
boolean r1=rs1.next();
boolean r2=rs2.next();
if (r1&&r2){
String gender=rs1.getString(2);
int age=rs1.getInt(3);
.....
con.commit(); //not needed since this is just a select
con.setAutoCommit(true); //not needed since this is just
a select
stmt1.close();
stmt2.close();
And the exception is:
SQLException:S1010 [Microsoft][ODBC Driver Manager] Function sequence
error 0
Who can tell me the reason?
Thank you.
<<File: Untitled1>>
Good luck
Binu
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html