• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem executing prepareStatement

 
Gopi Rajesh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i tried to execute the code given below but seem to get the following error
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:460)
at sun.jdbc.odbc.JdbcOdbcConnection.prepareStatement(JdbcOdbcConnection.java:438)
at VM.NewVersionCreation.updateSysVersionsDB(NewVersionCreation.java:346)
at VM.NewVersionCreation.createDraftVersion(NewVersionCreation.java:612)
at VM.NewVersionCreation.main(NewVersionCreation.java:621)

Where have i missed?
any solutions to this problem will be helpful
regards
Gopi
 
Wayne L Johnson
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't see anything wrong with either the SQL or the Java code, so I must assume that you are trying to do something that your database+driver combination doesn't allow.
What database are you using? Also, is there are type 4 JDBC driver available for this database?
 
Gopi Rajesh
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
I found the mistake. My connection object was closed before executing this method. Thats why it shows an error. Thanks for ur effort
Regards
Gopi
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic