Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with insert query

 
vijayalakshmi raghavan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I already went through similar topics in the forum. But none of the solutions are working.

I am doing a project using tomcat.

I have my MSAccess DB inside tomcat/webapps/MyFiles/db1.mdb
I have a class named"Jn.java" inside tomcat/webapps/MyFiles/WEB-INF/classes

Th following is Jn.java code.




When I compile and execute the program, i get the following error.

java.sql.SQLException: General error
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLExecute(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeUpdate(Unknown Source)

at Jn.main(Jn.java:40)

I have created the DataSource under SystemDSN and not userDSN.


Please help!!!
 
Wendy Gibbons
Bartender
Posts: 1110
Eclipse IDE Oracle VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does it work when you remove tomcat, and just run from the command line (or your IDE) as a standalone main program?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic