When you update the database, you have to say "stmt.executeUpdate(your sql
String)". In addition, you don't need a result set when you update, only
when you query.

> -----Original Message-----
> From: abrougui raouf [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, April 17, 2000 3:32 PM
> To:   [EMAIL PROTECTED]
> Subject:      SQL Exception
>
> Hi
>
> I have a problem !
> When i try to UPDATE my db, the servlet execute the
> update at the right place but i have this message on
> the screen :
>
> >>No ResultSet was produced
>
> Here is the code :
>
> >>Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
>
> >>con =
> DriverManager.getConnection("jdbc:odbc:JavaTP",
> >>userName, passWord);
>
> >>stmt= con.createStatement();
>
> >>rs = stmt.executeQuery("UPDATE Client SET CarteC
> >>="+numerocc+", ID_Vol="+idvol+" "+"WHERE ID_Client
> >>="+ID+"");
>
> What is this message???
>
> Thanx
>
> Raouf
>
> ___________________________________________________________
> Do You Yahoo!?
> Achetez, vendez! � votre prix! Sur http://encheres.yahoo.fr
>
> __________________________________________________________________________
> _
> 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