• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trying to send "SET IDENTITY_INSERT...ON"

 
jim gemlo
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to a sqlserver data base using jsp and I get error:
Message: Server caught unhandled exception from servlet [JSP 1.1 Processor]: Unable to compile class for JSP "/osg/InsertTrys/delete/displayserver.jsp" /usr/WebSphere/AppServer/temp/default_host/default_app/osg/InsertTrys/delete/_displayserver_jsp_176.java:269: Method preparedStatement(java.lang.String) not found in interface java.sql.Connection. PreparedStatement stmtSetIdentityValueON = conn.preparedStatement(sqlSetValueIdentityOn);
Here is my code snip:
String sqlSetValueIdentityOn = "SET IDENTITY_INSERT dbo.BACKUP_DIM ON";
PreparedStatement stmtSetIdentityValueON = conn.preparedStatement(sqlSetValueIdentityOn);
what is the correct way to send this to the DB?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64181
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the JDBC forum.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic