
September 3rd, 2003, 11:07 AM
|
|
Junior Member
|
|
Join Date: Sep 2003
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
temporary table inaccessible?
Hi,
I am trying to create a temporary table, insert an empty blob into it, and then select the empty blob from the table into a blob object. I am doing this using a plsql block that Java calls, using JDBC.
The creating and inserting parts execute, but when I do the select on the temporary table, it says the table or view does not exist.
What's going on here? What am I doing wrong?
Here's the code I'm using:
CallableStatement plsqlblock = db.prepareCall(
"declare\n"+
"lb blob;\n"+
"begin\n"+
"execute immediate 'create temporary table tmp_table (blobid NUMBER unique, blob_col BLOB)';\n"+
"execute immediate 'commit'; \n"+
"execute immediate 'insert into tmp_table values (1, empty_blob())';\n"+
"execute immediate 'commit'; \n"+
"select blob_col into lb from tmp_table where blobid = 1;\n"+
"end;");
plsqlblock.execute();
|