Neeraj, which version of JDBC are you using. The problem here that the JDBC (prior to ver 2.0) cursor is forward only. So when you execute a query, so have moved the cursor and you cant go backward until you close the connection and reconnect. That probably is the reason the query works for the first time and there is a syntax error the next time. hope this helps, cheers ... Yogesh neeraj koul <[EMAIL PROTECTED]> wrote: hi, Through a servlet( and JDBC) I am sending two queries to a database. It is a informix databse. One query goes through while other gives me a syntax error. on trying them actually,both of them run fine. I do not know what is the problem. To do the queries I use the servlet which calls a class on the same server and passes the connection object and query string to it. If one goes through, why does not the other. Is it because connection object cannoot be used(However, I gave the 'problematic' query--"info columns for legend" and it still gave syntax error). Can somebody suggest regards neeraj ___________________________________________________________________________ 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 ____________________________________________________________________ Get free email and a permanent address at http://www.netaddress.com/?N=1 ___________________________________________________________________________ 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
