Bookmark Topic Watch Topic
  • New Topic

Error while creating Statement

 
Rkrishna daruri
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Report post to moderator
The code which helps in creating a statement is giving this error.
java.sql.SQLException: General error
at sun.jdbc.odbc.JdbcOdbc.throwGenericSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLAllocStmt(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcConnection.createStatement(Unknown Source)
*********
Can someone help me out in understanding why this is happening and what may be the solution.
Thanks in Advance..Ramakrishna
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
Have you tried running the SQL in a db client before rtrying it in JDBC?
Secondly, if you are not using MS Access, don't use the generic JDBC-ODBC Driver, get a specific (preferably type-4) driver for the database and use that instead.
Dave
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Report post to moderator
You may want to post some code for us to see what is generating the error. That sounds like a generic error that JDBC-ODBC driver just sends. It can be caused by a number of things.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
I just realised that you also posted the same question to the JDBC forum here, so that we've been having the same discussion twice
Please don't post the same question in multiple forums since it ends up wasting peoples time. I'm going to organise for this thread to be closed.
Dave
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!