English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am trying to set IDENTITY_INSERT to ON with "SET IDENTITY_INSERT AJAXMaster (table name) ON". But it shows me the error "The Set SQL construct or statement is not supported."
Then it shows the message that "Query has executed successfully."

Now when I am trying to insert a field containing image into this table using this query "insert into ajaxmaster values (12, 'Mr.Brahmbhatt', 'Can not set the identity_insert to ON', 'E:\logo.jpg')", it shows me "Can not insert explicit value for identity column in table 'AJAXMaster' when IDENTITY_INSERT is set to OFF."

Can anyone help me out with this? Pl.

2007-02-11 21:20:28 · 1 answers · asked by Mr.Brahmbhatt 3 in Computers & Internet Programming & Design

1 answers

May be you have not corresponding permissions:

Execute permissions default to the sysadmin fixed server role, and the db_owner and db_ddladmin fixed database roles, and the object owner.

Thus, use the following syntax:

--
insert into ajaxmaster(f2,f3, f4)

values ('Mr.Brahmbhatt', 'Can not set the identity_insert to ON', 'E:\logo.jpg')
--

Here,
f2,f3,f4 - table colunms without identity column.

2007-02-12 00:06:32 · answer #1 · answered by Serge M 6 · 0 0

fedest.com, questions and answers