dbTalk Databases Forums  

column_schema.setDefault problem

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


Discuss column_schema.setDefault problem in the sybase.public.sqlanywhere.ultralite forum.

Reply
 
Thread Tools Display Modes
  #1  
Old   
GUO Lin
 
Posts: n/a

Default column_schema.setDefault problem - 10-17-2008 , 10:32 AM








It is about SQL UltraliteJ.

I have updated to the forth EBF release.
But I have still the problem about the function setDefault

1 : column_schema.setDefault( COLUMN_DEFAULT_GLOBAL_AUTOINC )

I define the table schema like this:

conn.schemaCreateBegin();
ColumnSchema column_schema;
TableSchema table_schema = conn.createTable("INTERVENTIONS");

column_schema = table_schema.createColumn( "id", Domain.INTEGER );
column_schema.setNullable( false );

column_schema.setDefault( ColumnSchema.COLUMN_DEFAULT_GLOBAL_AUTOINC );

column_schema = table_schema.createColumn( "description",
Domain.VARCHAR, 512 );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "statut",
Domain.INTEGER);
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "duree",
Domain.INTEGER );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "idtechnicien",
Domain.INTEGER);
column_schema.setNullable( true );
...

IndexSchema index_schema =
table_schema.createPrimaryIndex( "primary" );
index_schema.addColumn( "id", IndexSchema.ASCENDING );
conn.schemaCreateComplete();

When I insert data into this table, I receive an exception :
ULjException: ianywhere.ultralitej.implementation.JrException:
UltraLiteJ Error[-195]: Column 'id' in table 'INTERVENTIONS' cannot be
NULL

2: We have the function getLastIdentity of interface connection in M-
business.
But We have not the equivalencie in UltralitJ, has anyone good
solution of getting the last identity ?



Reply With Quote
  #2  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: column_schema.setDefault problem - 10-17-2008 , 05:18 PM






Version 11 documents

ColumnSchema.COLUMN_DEFAULT_AUTOINC
and
ColumnSchema.setDefault

[see:
http://dcx.sybase.com/index.php#http...-autoinc0.html
or
http://dcx.sybase.com/index.php#http...307492134.html ]

Maybe one of those will work for you with V10.


"GUO Lin" <guolin.mobi (AT) gmail (DOT) com> wrote

Quote:

It is about SQL UltraliteJ.

I have updated to the forth EBF release.
But I have still the problem about the function setDefault

1 : column_schema.setDefault( COLUMN_DEFAULT_GLOBAL_AUTOINC )

I define the table schema like this:

conn.schemaCreateBegin();
ColumnSchema column_schema;
TableSchema table_schema = conn.createTable("INTERVENTIONS");

column_schema = table_schema.createColumn( "id", Domain.INTEGER );
column_schema.setNullable( false );

column_schema.setDefault( ColumnSchema.COLUMN_DEFAULT_GLOBAL_AUTOINC );

column_schema = table_schema.createColumn( "description",
Domain.VARCHAR, 512 );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "statut",
Domain.INTEGER);
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "duree",
Domain.INTEGER );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "idtechnicien",
Domain.INTEGER);
column_schema.setNullable( true );
...

IndexSchema index_schema =
table_schema.createPrimaryIndex( "primary" );
index_schema.addColumn( "id", IndexSchema.ASCENDING );
conn.schemaCreateComplete();

When I insert data into this table, I receive an exception :
ULjException: ianywhere.ultralitej.implementation.JrException:
UltraLiteJ Error[-195]: Column 'id' in table 'INTERVENTIONS' cannot be
NULL

2: We have the function getLastIdentity of interface connection in M-
business.
But We have not the equivalencie in UltralitJ, has anyone good
solution of getting the last identity ?



Reply With Quote
  #3  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: column_schema.setDefault problem - 10-17-2008 , 05:18 PM



Version 11 documents

ColumnSchema.COLUMN_DEFAULT_AUTOINC
and
ColumnSchema.setDefault

[see:
http://dcx.sybase.com/index.php#http...-autoinc0.html
or
http://dcx.sybase.com/index.php#http...307492134.html ]

Maybe one of those will work for you with V10.


"GUO Lin" <guolin.mobi (AT) gmail (DOT) com> wrote

Quote:

It is about SQL UltraliteJ.

I have updated to the forth EBF release.
But I have still the problem about the function setDefault

1 : column_schema.setDefault( COLUMN_DEFAULT_GLOBAL_AUTOINC )

I define the table schema like this:

conn.schemaCreateBegin();
ColumnSchema column_schema;
TableSchema table_schema = conn.createTable("INTERVENTIONS");

column_schema = table_schema.createColumn( "id", Domain.INTEGER );
column_schema.setNullable( false );

column_schema.setDefault( ColumnSchema.COLUMN_DEFAULT_GLOBAL_AUTOINC );

column_schema = table_schema.createColumn( "description",
Domain.VARCHAR, 512 );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "statut",
Domain.INTEGER);
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "duree",
Domain.INTEGER );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "idtechnicien",
Domain.INTEGER);
column_schema.setNullable( true );
...

IndexSchema index_schema =
table_schema.createPrimaryIndex( "primary" );
index_schema.addColumn( "id", IndexSchema.ASCENDING );
conn.schemaCreateComplete();

When I insert data into this table, I receive an exception :
ULjException: ianywhere.ultralitej.implementation.JrException:
UltraLiteJ Error[-195]: Column 'id' in table 'INTERVENTIONS' cannot be
NULL

2: We have the function getLastIdentity of interface connection in M-
business.
But We have not the equivalencie in UltralitJ, has anyone good
solution of getting the last identity ?



Reply With Quote
  #4  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: column_schema.setDefault problem - 10-17-2008 , 05:18 PM



Version 11 documents

ColumnSchema.COLUMN_DEFAULT_AUTOINC
and
ColumnSchema.setDefault

[see:
http://dcx.sybase.com/index.php#http...-autoinc0.html
or
http://dcx.sybase.com/index.php#http...307492134.html ]

Maybe one of those will work for you with V10.


"GUO Lin" <guolin.mobi (AT) gmail (DOT) com> wrote

Quote:

It is about SQL UltraliteJ.

I have updated to the forth EBF release.
But I have still the problem about the function setDefault

1 : column_schema.setDefault( COLUMN_DEFAULT_GLOBAL_AUTOINC )

I define the table schema like this:

conn.schemaCreateBegin();
ColumnSchema column_schema;
TableSchema table_schema = conn.createTable("INTERVENTIONS");

column_schema = table_schema.createColumn( "id", Domain.INTEGER );
column_schema.setNullable( false );

column_schema.setDefault( ColumnSchema.COLUMN_DEFAULT_GLOBAL_AUTOINC );

column_schema = table_schema.createColumn( "description",
Domain.VARCHAR, 512 );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "statut",
Domain.INTEGER);
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "duree",
Domain.INTEGER );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "idtechnicien",
Domain.INTEGER);
column_schema.setNullable( true );
...

IndexSchema index_schema =
table_schema.createPrimaryIndex( "primary" );
index_schema.addColumn( "id", IndexSchema.ASCENDING );
conn.schemaCreateComplete();

When I insert data into this table, I receive an exception :
ULjException: ianywhere.ultralitej.implementation.JrException:
UltraLiteJ Error[-195]: Column 'id' in table 'INTERVENTIONS' cannot be
NULL

2: We have the function getLastIdentity of interface connection in M-
business.
But We have not the equivalencie in UltralitJ, has anyone good
solution of getting the last identity ?



Reply With Quote
  #5  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: column_schema.setDefault problem - 10-17-2008 , 05:18 PM



Version 11 documents

ColumnSchema.COLUMN_DEFAULT_AUTOINC
and
ColumnSchema.setDefault

[see:
http://dcx.sybase.com/index.php#http...-autoinc0.html
or
http://dcx.sybase.com/index.php#http...307492134.html ]

Maybe one of those will work for you with V10.


"GUO Lin" <guolin.mobi (AT) gmail (DOT) com> wrote

Quote:

It is about SQL UltraliteJ.

I have updated to the forth EBF release.
But I have still the problem about the function setDefault

1 : column_schema.setDefault( COLUMN_DEFAULT_GLOBAL_AUTOINC )

I define the table schema like this:

conn.schemaCreateBegin();
ColumnSchema column_schema;
TableSchema table_schema = conn.createTable("INTERVENTIONS");

column_schema = table_schema.createColumn( "id", Domain.INTEGER );
column_schema.setNullable( false );

column_schema.setDefault( ColumnSchema.COLUMN_DEFAULT_GLOBAL_AUTOINC );

column_schema = table_schema.createColumn( "description",
Domain.VARCHAR, 512 );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "statut",
Domain.INTEGER);
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "duree",
Domain.INTEGER );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "idtechnicien",
Domain.INTEGER);
column_schema.setNullable( true );
...

IndexSchema index_schema =
table_schema.createPrimaryIndex( "primary" );
index_schema.addColumn( "id", IndexSchema.ASCENDING );
conn.schemaCreateComplete();

When I insert data into this table, I receive an exception :
ULjException: ianywhere.ultralitej.implementation.JrException:
UltraLiteJ Error[-195]: Column 'id' in table 'INTERVENTIONS' cannot be
NULL

2: We have the function getLastIdentity of interface connection in M-
business.
But We have not the equivalencie in UltralitJ, has anyone good
solution of getting the last identity ?



Reply With Quote
  #6  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: column_schema.setDefault problem - 10-17-2008 , 05:18 PM



Version 11 documents

ColumnSchema.COLUMN_DEFAULT_AUTOINC
and
ColumnSchema.setDefault

[see:
http://dcx.sybase.com/index.php#http...-autoinc0.html
or
http://dcx.sybase.com/index.php#http...307492134.html ]

Maybe one of those will work for you with V10.


"GUO Lin" <guolin.mobi (AT) gmail (DOT) com> wrote

Quote:

It is about SQL UltraliteJ.

I have updated to the forth EBF release.
But I have still the problem about the function setDefault

1 : column_schema.setDefault( COLUMN_DEFAULT_GLOBAL_AUTOINC )

I define the table schema like this:

conn.schemaCreateBegin();
ColumnSchema column_schema;
TableSchema table_schema = conn.createTable("INTERVENTIONS");

column_schema = table_schema.createColumn( "id", Domain.INTEGER );
column_schema.setNullable( false );

column_schema.setDefault( ColumnSchema.COLUMN_DEFAULT_GLOBAL_AUTOINC );

column_schema = table_schema.createColumn( "description",
Domain.VARCHAR, 512 );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "statut",
Domain.INTEGER);
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "duree",
Domain.INTEGER );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "idtechnicien",
Domain.INTEGER);
column_schema.setNullable( true );
...

IndexSchema index_schema =
table_schema.createPrimaryIndex( "primary" );
index_schema.addColumn( "id", IndexSchema.ASCENDING );
conn.schemaCreateComplete();

When I insert data into this table, I receive an exception :
ULjException: ianywhere.ultralitej.implementation.JrException:
UltraLiteJ Error[-195]: Column 'id' in table 'INTERVENTIONS' cannot be
NULL

2: We have the function getLastIdentity of interface connection in M-
business.
But We have not the equivalencie in UltralitJ, has anyone good
solution of getting the last identity ?



Reply With Quote
  #7  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: column_schema.setDefault problem - 10-17-2008 , 05:18 PM



Version 11 documents

ColumnSchema.COLUMN_DEFAULT_AUTOINC
and
ColumnSchema.setDefault

[see:
http://dcx.sybase.com/index.php#http...-autoinc0.html
or
http://dcx.sybase.com/index.php#http...307492134.html ]

Maybe one of those will work for you with V10.


"GUO Lin" <guolin.mobi (AT) gmail (DOT) com> wrote

Quote:

It is about SQL UltraliteJ.

I have updated to the forth EBF release.
But I have still the problem about the function setDefault

1 : column_schema.setDefault( COLUMN_DEFAULT_GLOBAL_AUTOINC )

I define the table schema like this:

conn.schemaCreateBegin();
ColumnSchema column_schema;
TableSchema table_schema = conn.createTable("INTERVENTIONS");

column_schema = table_schema.createColumn( "id", Domain.INTEGER );
column_schema.setNullable( false );

column_schema.setDefault( ColumnSchema.COLUMN_DEFAULT_GLOBAL_AUTOINC );

column_schema = table_schema.createColumn( "description",
Domain.VARCHAR, 512 );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "statut",
Domain.INTEGER);
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "duree",
Domain.INTEGER );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "idtechnicien",
Domain.INTEGER);
column_schema.setNullable( true );
...

IndexSchema index_schema =
table_schema.createPrimaryIndex( "primary" );
index_schema.addColumn( "id", IndexSchema.ASCENDING );
conn.schemaCreateComplete();

When I insert data into this table, I receive an exception :
ULjException: ianywhere.ultralitej.implementation.JrException:
UltraLiteJ Error[-195]: Column 'id' in table 'INTERVENTIONS' cannot be
NULL

2: We have the function getLastIdentity of interface connection in M-
business.
But We have not the equivalencie in UltralitJ, has anyone good
solution of getting the last identity ?



Reply With Quote
  #8  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: column_schema.setDefault problem - 10-17-2008 , 05:18 PM



Version 11 documents

ColumnSchema.COLUMN_DEFAULT_AUTOINC
and
ColumnSchema.setDefault

[see:
http://dcx.sybase.com/index.php#http...-autoinc0.html
or
http://dcx.sybase.com/index.php#http...307492134.html ]

Maybe one of those will work for you with V10.


"GUO Lin" <guolin.mobi (AT) gmail (DOT) com> wrote

Quote:

It is about SQL UltraliteJ.

I have updated to the forth EBF release.
But I have still the problem about the function setDefault

1 : column_schema.setDefault( COLUMN_DEFAULT_GLOBAL_AUTOINC )

I define the table schema like this:

conn.schemaCreateBegin();
ColumnSchema column_schema;
TableSchema table_schema = conn.createTable("INTERVENTIONS");

column_schema = table_schema.createColumn( "id", Domain.INTEGER );
column_schema.setNullable( false );

column_schema.setDefault( ColumnSchema.COLUMN_DEFAULT_GLOBAL_AUTOINC );

column_schema = table_schema.createColumn( "description",
Domain.VARCHAR, 512 );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "statut",
Domain.INTEGER);
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "duree",
Domain.INTEGER );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "idtechnicien",
Domain.INTEGER);
column_schema.setNullable( true );
...

IndexSchema index_schema =
table_schema.createPrimaryIndex( "primary" );
index_schema.addColumn( "id", IndexSchema.ASCENDING );
conn.schemaCreateComplete();

When I insert data into this table, I receive an exception :
ULjException: ianywhere.ultralitej.implementation.JrException:
UltraLiteJ Error[-195]: Column 'id' in table 'INTERVENTIONS' cannot be
NULL

2: We have the function getLastIdentity of interface connection in M-
business.
But We have not the equivalencie in UltralitJ, has anyone good
solution of getting the last identity ?



Reply With Quote
  #9  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: column_schema.setDefault problem - 10-17-2008 , 05:18 PM



Version 11 documents

ColumnSchema.COLUMN_DEFAULT_AUTOINC
and
ColumnSchema.setDefault

[see:
http://dcx.sybase.com/index.php#http...-autoinc0.html
or
http://dcx.sybase.com/index.php#http...307492134.html ]

Maybe one of those will work for you with V10.


"GUO Lin" <guolin.mobi (AT) gmail (DOT) com> wrote

Quote:

It is about SQL UltraliteJ.

I have updated to the forth EBF release.
But I have still the problem about the function setDefault

1 : column_schema.setDefault( COLUMN_DEFAULT_GLOBAL_AUTOINC )

I define the table schema like this:

conn.schemaCreateBegin();
ColumnSchema column_schema;
TableSchema table_schema = conn.createTable("INTERVENTIONS");

column_schema = table_schema.createColumn( "id", Domain.INTEGER );
column_schema.setNullable( false );

column_schema.setDefault( ColumnSchema.COLUMN_DEFAULT_GLOBAL_AUTOINC );

column_schema = table_schema.createColumn( "description",
Domain.VARCHAR, 512 );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "statut",
Domain.INTEGER);
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "duree",
Domain.INTEGER );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "idtechnicien",
Domain.INTEGER);
column_schema.setNullable( true );
...

IndexSchema index_schema =
table_schema.createPrimaryIndex( "primary" );
index_schema.addColumn( "id", IndexSchema.ASCENDING );
conn.schemaCreateComplete();

When I insert data into this table, I receive an exception :
ULjException: ianywhere.ultralitej.implementation.JrException:
UltraLiteJ Error[-195]: Column 'id' in table 'INTERVENTIONS' cannot be
NULL

2: We have the function getLastIdentity of interface connection in M-
business.
But We have not the equivalencie in UltralitJ, has anyone good
solution of getting the last identity ?



Reply With Quote
  #10  
Old   
Nick Elson [Sybase iAnywhere]
 
Posts: n/a

Default Re: column_schema.setDefault problem - 10-17-2008 , 05:18 PM






Version 11 documents

ColumnSchema.COLUMN_DEFAULT_AUTOINC
and
ColumnSchema.setDefault

[see:
http://dcx.sybase.com/index.php#http...-autoinc0.html
or
http://dcx.sybase.com/index.php#http...307492134.html ]

Maybe one of those will work for you with V10.


"GUO Lin" <guolin.mobi (AT) gmail (DOT) com> wrote

Quote:

It is about SQL UltraliteJ.

I have updated to the forth EBF release.
But I have still the problem about the function setDefault

1 : column_schema.setDefault( COLUMN_DEFAULT_GLOBAL_AUTOINC )

I define the table schema like this:

conn.schemaCreateBegin();
ColumnSchema column_schema;
TableSchema table_schema = conn.createTable("INTERVENTIONS");

column_schema = table_schema.createColumn( "id", Domain.INTEGER );
column_schema.setNullable( false );

column_schema.setDefault( ColumnSchema.COLUMN_DEFAULT_GLOBAL_AUTOINC );

column_schema = table_schema.createColumn( "description",
Domain.VARCHAR, 512 );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "statut",
Domain.INTEGER);
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "duree",
Domain.INTEGER );
column_schema.setNullable( true );
column_schema = table_schema.createColumn( "idtechnicien",
Domain.INTEGER);
column_schema.setNullable( true );
...

IndexSchema index_schema =
table_schema.createPrimaryIndex( "primary" );
index_schema.addColumn( "id", IndexSchema.ASCENDING );
conn.schemaCreateComplete();

When I insert data into this table, I receive an exception :
ULjException: ianywhere.ultralitej.implementation.JrException:
UltraLiteJ Error[-195]: Column 'id' in table 'INTERVENTIONS' cannot be
NULL

2: We have the function getLastIdentity of interface connection in M-
business.
But We have not the equivalencie in UltralitJ, has anyone good
solution of getting the last identity ?



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.