dbTalk Databases Forums  

Autoincrement Default on UltraliteJ

sybase.public.sqlanywhere.ultralite sybase.public.sqlanywhere.ultralite


Discuss Autoincrement Default on UltraliteJ in the sybase.public.sqlanywhere.ultralite forum.

Reply
 
Thread Tools Display Modes
  #21  
Old   
y2kenny.funstuff@gmail.com
 
Posts: n/a

Default Re: Autoincrement Default on UltraliteJ - 12-14-2008 , 09:59 PM






Hey Tom,

You're right. It worked. Thanks!

Kenny

On Dec 14, 3:54*pm, Tom Slee wrote:
Quote:
Hi,

Unfortunately there was a bug in the autoincrement in the
initial release of UltraLiteJ. If you get a recent Express
Bug Fix (EBF) release you will find this has been fixed.

You can download EBFs from here (you need a free
registration on sybase.com):http://downloads.sybase.com/swd/base.do

The click SQL Anywhere and find the "Platform: Windows x86"
(as development is on Windows UltraLiteJ goes out in the
Windows release) and get the latest (build 11.0.0.1526 I
believe).

Tom

Hi,

I understand that this place is more for ultralite on
other platform but I am really stuck and I am hoping
someone can help me here. *I am trying to setup a really
simple database on a mobile device (Blackberry) using
UltraliteJ with a Autoincrement primary key. *I set it up
as follows:

TableSchema table_schema = _conn.createTable("SomeTable");

column_schema = table_schema.createColumn("tid",
Domain.BIG ); column_schema.setDefault(
ColumnSchema.COLUMN_DEFAULT_AUTOINC);

index_schema =
table_schema.createPrimaryIndex("prime_keys");
index_schema.addColumn("tid", IndexSchema.ASCENDING);

But when I try to insert an item to a non-empty table
without the primary key column, I get the "tid column"
cannot be NULL error. *And the funny thing is that things
worked (insert was successful) when I try to insert when
the table was first created. *Any ideas?

Kenny




Reply With Quote
  #22  
Old   
y2kenny.funstuff@gmail.com
 
Posts: n/a

Default Re: Autoincrement Default on UltraliteJ - 12-14-2008 , 09:59 PM






Hey Tom,

You're right. It worked. Thanks!

Kenny

On Dec 14, 3:54*pm, Tom Slee wrote:
Quote:
Hi,

Unfortunately there was a bug in the autoincrement in the
initial release of UltraLiteJ. If you get a recent Express
Bug Fix (EBF) release you will find this has been fixed.

You can download EBFs from here (you need a free
registration on sybase.com):http://downloads.sybase.com/swd/base.do

The click SQL Anywhere and find the "Platform: Windows x86"
(as development is on Windows UltraLiteJ goes out in the
Windows release) and get the latest (build 11.0.0.1526 I
believe).

Tom

Hi,

I understand that this place is more for ultralite on
other platform but I am really stuck and I am hoping
someone can help me here. *I am trying to setup a really
simple database on a mobile device (Blackberry) using
UltraliteJ with a Autoincrement primary key. *I set it up
as follows:

TableSchema table_schema = _conn.createTable("SomeTable");

column_schema = table_schema.createColumn("tid",
Domain.BIG ); column_schema.setDefault(
ColumnSchema.COLUMN_DEFAULT_AUTOINC);

index_schema =
table_schema.createPrimaryIndex("prime_keys");
index_schema.addColumn("tid", IndexSchema.ASCENDING);

But when I try to insert an item to a non-empty table
without the primary key column, I get the "tid column"
cannot be NULL error. *And the funny thing is that things
worked (insert was successful) when I try to insert when
the table was first created. *Any ideas?

Kenny


Reply With Quote
  #23  
Old   
y2kenny.funstuff@gmail.com
 
Posts: n/a

Default Re: Autoincrement Default on UltraliteJ - 12-14-2008 , 09:59 PM



Hey Tom,

You're right. It worked. Thanks!

Kenny

On Dec 14, 3:54*pm, Tom Slee wrote:
Quote:
Hi,

Unfortunately there was a bug in the autoincrement in the
initial release of UltraLiteJ. If you get a recent Express
Bug Fix (EBF) release you will find this has been fixed.

You can download EBFs from here (you need a free
registration on sybase.com):http://downloads.sybase.com/swd/base.do

The click SQL Anywhere and find the "Platform: Windows x86"
(as development is on Windows UltraLiteJ goes out in the
Windows release) and get the latest (build 11.0.0.1526 I
believe).

Tom

Hi,

I understand that this place is more for ultralite on
other platform but I am really stuck and I am hoping
someone can help me here. *I am trying to setup a really
simple database on a mobile device (Blackberry) using
UltraliteJ with a Autoincrement primary key. *I set it up
as follows:

TableSchema table_schema = _conn.createTable("SomeTable");

column_schema = table_schema.createColumn("tid",
Domain.BIG ); column_schema.setDefault(
ColumnSchema.COLUMN_DEFAULT_AUTOINC);

index_schema =
table_schema.createPrimaryIndex("prime_keys");
index_schema.addColumn("tid", IndexSchema.ASCENDING);

But when I try to insert an item to a non-empty table
without the primary key column, I get the "tid column"
cannot be NULL error. *And the funny thing is that things
worked (insert was successful) when I try to insert when
the table was first created. *Any ideas?

Kenny


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.