I'm fairly new at this, so I'm hoping this is a common error and easily
fixed. I have a servlet that collects data from a form and writes it to a
database. The first time through it works fine, and it shows a link to add
another record. Clicking on this link brings up the same form again but
when I post again I get an error from the servlet:
java.sql.SQLException: General error
at sun.jdbc.odbc.JdbcOdbc.throwGenericSQLException(JdbcOdbc.java:6235)
at sun.jdbc.odbc.JdbcOdbc.SQLAllocStmt(JdbcOdbc.java:163)
at
sun.jdbc.odbc.JdbcOdbcConnection.prepareStatement(JdbcOdbcConnection.java:46
0)
at
sun.jdbc.odbc.JdbcOdbcConnection.prepareStatement(JdbcOdbcConnection.java:43
8)
at
cc.nisc.surveymanager.servlets.GenerateQuestion.doPost(GenerateQuestion.java
:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown
Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
Source)
at java.lang.Thread.run(Thread.java:536)
Line 69 in the .java source is the beginning of a try block.
I'm using Tomcat 3.3, connection pooling, MS SQL Server.
I can post the code if necessary. TIA.
Greg
___________________________________________________________________________
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