Re: Global temporary tables in Java DB -- Apache Derby
- From: CJ <spambox1@xxxxxxxxxxxxxx>
- Date: Fri, 14 Dec 2007 07:07:40 -0800 (PST)
On Dec 12, 7:05 am, Dyreatn...@xxxxxxx wrote:
CJ <spamb...@xxxxxxxxxxxxxx> writes:
I can't seem to use "declare create temporary table" to function in
Java DB, JVM 1.6.0_03 Linux. After starting an embedded Derby server,
I issue the following;
stmt.execute("SET SCHEMA myschema");
stmt.execute("DECLARE CREATE TEMPORARY TABLE SESSION.mytable (fld INT
NOT NULL) NOT LOGGED");
stmt.execute("INSERT INTO SESSION.mytable VALUES(1)");
System.err.println(stmt.getUpdateCount());
stmt.execute("SELECT * FROM SESSION.mytable");
The getUpdateCount after insert is one (1), however the query does not
return a resultset. What am I doing incorrectly?
Statement.execute(String) doesn't return a result
set. Statement.executeQuery(String) on the other hand, does.
--
dt
Questions about Derby/Java DB? Please visithttp://db.apache.org/derby/derby_mail.html
Thanks dt. While you are correct that Statement.execute() does not
return a ResultSet object, Statement.getResultSet() should return a
ResultSet if Statement.execute(String) returns true.
Perhaps my post was incomplete. While stmt.execute("SELECT * FROM
SESSION.mytable") indicates at least one ResultSet was returned, no
data is available from the ResultSet returned from
"stmt.getResultSet()".
.
- Follow-Ups:
- Re: Global temporary tables in Java DB -- Apache Derby
- From: Dyreatnews
- Re: Global temporary tables in Java DB -- Apache Derby
- References:
- Global temporary tables in Java DB -- Apache Derby
- From: CJ
- Re: Global temporary tables in Java DB -- Apache Derby
- From: Dyreatnews
- Global temporary tables in Java DB -- Apache Derby
- Prev by Date: Re: MySQL ResultSet - count rows?
- Next by Date: Re: Global temporary tables in Java DB -- Apache Derby
- Previous by thread: Re: Global temporary tables in Java DB -- Apache Derby
- Next by thread: Re: Global temporary tables in Java DB -- Apache Derby
- Index(es):
Relevant Pages
|