File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and the fly likes Trying to send Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Trying to send "SET IDENTITY_INSERT...ON"" Watch "Trying to send "SET IDENTITY_INSERT...ON"" New topic

Trying to send "SET IDENTITY_INSERT...ON"

jim gemlo

Joined: Feb 24, 2004
Posts: 20
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/ 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

Joined: Jan 10, 2002
Posts: 60053

Moving to the JDBC forum.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
jQuery in Action, 2nd edition
subject: Trying to send "SET IDENTITY_INSERT...ON"
Similar Threads
Relieve database bean objects from heap
Can i batch preparedStatements?
How to delete a record from a table without a primary key
Identifier expected, (already searched and read about this, still confused
What exactly we mean by Precompiled SQL Statement