executeQuery is for SELECT only. Use executeUpdate(String
insertSqlStatement) for UPDATE/INSERT. It returns integer as number of
inserted/updated records. You can also use prepared statements if You have
multiple requests and Your DB allows.
Damir Sovic ([EMAIL PROTECTED])
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> abrougui raouf
> Sent: Monday, April 17, 2000 9: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! R 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