![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
| 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 ? |
#12
| |||
| |||
|
| 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 ? |
#13
| |||
| |||
|
#14
| |||
| |||
|
#15
| |||
| |||
|
#16
| |||
| |||
|
#17
| |||
| |||
|
#18
| |||
| |||
|
#19
| |||
| |||
|
#20
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |