Tejas,
Use the executeUpdate(String sql) method instead of executeQuery(). Since 
the SQL UPDATE command doesn't return a resultSet, but instead returns an 
integer that indicates the # of records updated, an error occurs in the 
executeQuery command when it tries to get a resultSet.

Regards,

Richard

At 09:20 AM 3/21/2002 -0800, you wrote:

>Hi all,
>
>I have problem executing this update query.
>
>String query= "UPDATE  BasicInformation"+
>                     " SET Program="+"\'"+program+"\'"+
>                     " WHERE ProjectID ="+"\'"+projectid+"\'";
>
>My code compiled but when I execute it gave me this error
>
>
>
>Exception! java.sql.SQLException: No ResultSet was produced at 
>sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:255
>
>
>
>I tried running other Select query it executed fine.
>
>
>
>Thanks
>
>Tejas
>
>
>
>Do You Yahoo!?
>Yahoo! Movies - coverage of the 74th Academy Awards�

___________________________________________________________________________
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