Problem with create table in Derby 10.2.2.0

2007-02-09 Thread Leo Alberto
Hy I'm try to using Derby 10.2.2.0 http://db.apache.org/derby/releases/release-10.2.2.0.cgi in embedded mode with the integrated plug-in environment in Eclipse 3.2.0. Environment jre 1.6.0 I would create a table with this code : public boolean tableCreation(Connection currentConn, String Table)

Re: Problem with create table in Derby 10.2.2.0

2007-02-09 Thread Mamta Satoor
Leo, You need to use BIGINT rather than long for KEY_ID column. Mamta On 2/9/07, Leo Alberto [EMAIL PROTECTED] wrote: Hy I'm try to using Derby 10.2.2.0http://db.apache.org/derby/releases/release-10.2.2.0.cgi in embedded mode with the integrated plug-in environment in Eclipse 3.2.0.

Re: Problem with create table in Derby 10.2.2.0

2007-02-09 Thread Mamta Satoor
BTW, the 10.2 Reference manual talks more about BIGINT at http://db.apache.org/derby/docs/10.2/ref/rrefbuiltbigint.html Mamta On 2/9/07, Mamta Satoor [EMAIL PROTECTED] wrote: Leo, You need to use BIGINT rather than long for KEY_ID column. Mamta On 2/9/07, Leo Alberto [EMAIL PROTECTED]

Re: Problem with create table in Derby 10.2.2.0

2007-02-09 Thread Manjula Kutty
Hi Leo, Also I think following will be a better createString, I wonder why you didn''t get any error for generate'. Also please don't use 'Table' as table name. I got error for that also. And KEY_ID can not have any null values, since you are making it unique it should be declared as not null.

Atomic check for row existence and insert if doesn't exist

2007-02-09 Thread Ace Jayz
I've got a table with an identity column, P, as a primary key. This table has another column, C, with a uniqueness constraint. I want to insert a row into the table if no row has a value for C=c, and if a row does exist whose column C=c I want to get the value of the identity column for storage