ehh
uhhmm
i was wrong...
iam sorry

But i think i have already make this without a result.next() and that
worked...
propably a "stroke of luck"

PS sorry for my poor english..

-----Original Message-----
From: Tanmaya Kumar Sahoo [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 29, 2000 12:17 PM
To: [EMAIL PROTECTED]
Subject: Re: ODBC problem


Hi berwart,
                    cool .. cool.. coll  !!!
                  I agree that the query should be "SELECT Nome,Password
FROM Utenti"...
But the exception is due to not advancing the pointer.I think u are still a
beginner in this field.
Just go through Sun's Help material...U will get the answer..
U test it first,then shoot back...




-----Original Message-----
From: BERWART Thierry <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, September 26, 2000 3:17 PM
Subject: Re: ODBC problem


>pffffffffffff
>READ THE REQUEST !!!!!!!!!
>
>
>-----Original Message-----
>From: Tanmaya Kumar Sahoo [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, August 29, 2000 11:40 AM
>To: [EMAIL PROTECTED]
>Subject: Re: ODBC problem
>
>
>Hi palanca,
>                    If u want 2 access a single row then
>write rs.next() before    this.
>        String nome = rsStudente.getString("Nome");
>        String passw = rsUser.getString("Password");
>B'coz rs points to just before the 1st row.
>After the call to next() method it points to 1st row.
>Hope it is okay with u.
>
>tans
>
>-----Original Message-----
>From: Elena Palanca <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>Date: Tuesday, September 26, 2000 2:33 PM
>Subject: ODBC problem
>
>
>>Hy,
>>I'm tried to connect in a servlet to an ACCESS database doing a select
>>operation and I have the following error:
>>
>>[parseRequest]Errore 2:java.sql.SQLException: [Microsoft][ODBC Driver
>>Manager] Stato del cursore non valido. (Invalid Cursor State)
>>
>>In the Access Table I have only a row with the field Nome and Password
>>
>>My code is the following:
>>
>>  String userId = req.getParameter( "UserId" );
>>try{
>>        Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
>>        Connection con = DriverManager.getConnection
>>("jdbc:odbc:Esami","","");
>>        Statement stat= con.createStatement();
>>        rsStudente= stat.executeQuery("SELECT Nome FROM Utenti");
>>       String nome = rsStudente.getString("Nome");
>>       String passw = rsUser.getString("Password");
>>        if ((nome.equals(userId))) auth="true";
>>        rsStudente.close();
>>         stat.close();
>>  }catch (Exception e) {
>>           log( "[parseRequest]Errore 2:" + e.toString() );
>>         }
>>
>>Someone know what I'm doing wrong?
>>
>>Thanks in advance
>>
>>Elena
>>
>>__________________________________________________________________________
_
>>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
>>
>-----Original Message-----
>From: Elena Palanca <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
>Date: Tuesday, September 26, 2000 2:33 PM
>Subject: ODBC problem
>
>
>>Hy,
>>I'm tried to connect in a servlet to an ACCESS database doing a select
>>operation and I have the following error:
>>
>>[parseRequest]Errore 2:java.sql.SQLException: [Microsoft][ODBC Driver
>>Manager] Stato del cursore non valido. (Invalid Cursor State)
>>
>>In the Access Table I have only a row with the field Nome and Password
>>
>>My code is the following:
>>
>>  String userId = req.getParameter( "UserId" );
>>try{
>>        Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
>>        Connection con = DriverManager.getConnection
>>("jdbc:odbc:Esami","","");
>>        Statement stat= con.createStatement();
>>        rsStudente= stat.executeQuery("SELECT Nome FROM Utenti");
>>       String nome = rsStudente.getString("Nome");
>>       String passw = rsUser.getString("Password");
>>        if ((nome.equals(userId))) auth="true";
>>        rsStudente.close();
>>         stat.close();
>>  }catch (Exception e) {
>>           log( "[parseRequest]Errore 2:" + e.toString() );
>>         }
>>
>>Someone know what I'm doing wrong?
>>
>>Thanks in advance
>>
>>Elena
>>
>>__________________________________________________________________________
_
>>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
>>
>
>___________________________________________________________________________
>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
>
>___________________________________________________________________________
>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
>

___________________________________________________________________________
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

___________________________________________________________________________
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

Reply via email to