aspose file tools
The moose likes JDBC and the fly likes Temp Table problem with PreparedStatement Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Temp Table problem with PreparedStatement" Watch "Temp Table problem with PreparedStatement" New topic
Author

Temp Table problem with PreparedStatement

Vikram Varma
Greenhorn

Joined: Apr 18, 2011
Posts: 4
Hi All,

I am creating a prepared statement as:
ps = connection.prepareStatement(sqlString,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);

This works fine in most cases. One of our table has a colum of lenght 16000 bytes VarChar. When I use the above preparedStatement to select that colum I get the error:
DB2 SQL Error: SQLCODE=-904, SQLSTATE=57011, SQLERRMC=00E7009A;200;TABLESPACE IN TEMP DATABASE, DRIVER=3.50.152

I found that the problem is with the two parameters(TYPE_SCROLL_INSENSITIVE,CONCUR_UPDATABLE). If I prepare the statement as ps = connection.prepareStatement(sqlString), I dont get any problem while selecting that huge colum.

My question is is there any was that I can increase the size of the temporary table while creating the Prepared Statemnt.


Thanks!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Temp Table problem with PreparedStatement
 
Similar Threads
Problem passing PreparedStatement
parameter index out of bounds:3 is not valid value between 1 and 1
execute batch is not executing all the queries.
Select max id and calling method from another class
ResultSet problems