[This topic is migrated from our old forums. The original author name has been removed]
A stupid question
how to set IDENTITY_INSERT as off in db visuzalier. when i execute the below statemnt(SET IDENTITY_INSERT ARK_MESSAGES OFF;) it executs without any error
but i still cant insert into a value for a row which has identity set (i.e automatially values will be generated)
insert into TEST_MESSAGES (ID, ARK_ID, ARK_CONTEXT_ID, SOURCE_URN, MSG_TYPE, PAYLOAD, EXECUTION_TIME, INSERT_TIME) values (4, '4.1356592315048', '20121227.12345678..12339', null, 'RAW_MSG', '[B@', '2012-12-27 02:11:55', '2012-12-27 02:11:57');
22:26:11 [INSERT - 0 row(s), 0.000 secs] [Error Code: 584, SQL State: ZZZZZ] Explicit value specified for identity field in table 'ARK_MESSAGES' when 'SET IDENTITY_INSERT' is OFF.
almost 5 years ago
[This reply is migrated from our old forums.]
Re: Executing SET value
Are you asking about how to do this in an SQL Commander tab? If so, you may have already figured it out, but IDENTITY_INSERT need to be ON, not OFF, in order to insert explicit values.
If you want to do this in the Data tab, you need to add the SET IDENTITY_INSERT statement to a connection hook:
Please let us know if we can be of further assistance.