Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Databases > Re: Global tem*...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 9 Topic 3616 of 3876
Post > Topic >>

Re: Global tem****ary tables in Java DB -- Apache Derby

by CJ <spambox1@[EMAIL PROTECTED] > Dec 14, 2007 at 07:07 AM

On Dec 12, 7:05 am, Dyreatn...@[EMAIL PROTECTED]
 wrote:
> CJ <spamb...@[EMAIL PROTECTED]
> writes:
> > I can't seem to use "declare create tem****ary 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 TEM****ARY 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()".
 




 9 Posts in Topic:
Global temporary tables in Java DB -- Apache Derby
CJ <spambox1@[EMAIL PR  2007-12-11 12:26:31 
Re: Global temporary tables in Java DB -- Apache Derby
Dyreatnews@[EMAIL PROTECT  2007-12-12 13:05:31 
Re: Global temporary tables in Java DB -- Apache Derby
CJ <spambox1@[EMAIL PR  2007-12-14 07:07:40 
Re: Global temporary tables in Java DB -- Apache Derby
Dyreatnews@[EMAIL PROTECT  2007-12-14 18:26:36 
Re: Global temporary tables in Java DB -- Apache Derby
CJ <spambox1@[EMAIL PR  2007-12-14 14:28:20 
Re: Global temporary tables in Java DB -- Apache Derby
Lew <lew@[EMAIL PROTEC  2007-12-14 19:17:09 
Re: Global temporary tables in Java DB -- Apache Derby
Dyreatnews@[EMAIL PROTECT  2007-12-15 20:05:10 
Re: Global temporary tables in Java DB -- Apache Derby
CJ <spambox1@[EMAIL PR  2007-12-17 12:01:55 
Re: Global temporary tables in Java DB -- Apache Derby
Dyreatnews@[EMAIL PROTECT  2007-12-18 17:21:10 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 23:17:20 CST 2008.