Add new record error

Hi

Can anybody tell me what the following error message means please? It occurs when trying to add a new record.

“java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Cannot insert explicit value for identity column in table ‘WHouseLocation’ when IDENTITY_INSERT is set to OFF. [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Cannot insert explicit value for identity column in table ‘WHouseLocation’ when IDENTITY_INSERT is set to OFF.”

Cheers

Niall

Ahh. I think I may have sussed this myself.

Is it because the field is a PK and is being incremented on the server side?

Niall

Correct, PK’s managed by server are not supported in 1.2, they will be supported in an upcoming version of Servoy.

Hi, do you know if this is now supported in v 2.0 rc9?
I get the same error that Niall was getting.

Is it possible to add a record in servoy with the field id being incremented on the server side?

thanks
Eugene

Yes it should work fine in rc9. Have you set the column options to use a server generated pk?

thanks Jan, that did the trick :D

Is it possible to indicate that all pk’s in a database are server generated in case you have many tables? or do you have to set each pk for each table individually

thanks
eugene

We discovered an issue in sequence auto assinging to PK columns in Sercoy 2.0 rc9, will be fixed in Servoy 2.0 rc10

Hi,

we are using Version R2 2.0 rc12-build 271
is it possible now to tell servoy that all tables in a database have db assigned pk’s?
We can set them one at a time by hand it’s not that difficult but with over 100 tables all with db assigned pk’s it would be great to be able to click one button to say “All pk’s are DB assigned” 8)
many thanks
Eugene

That cannot be build for db_seq, you need to specify the sequence name, for db_identity we could build this.