Home > Archive > MS SQL Server > March 2006 > How to set IDENTITY_INSERT to ON?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How to set IDENTITY_INSERT to ON?
Nathon Jones

2006-03-05, 8:24 pm

Hi,

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert explicit value
for identity column in table 'tblCustomers' when IDENTITY_INSERT is set to
OFF.
/checkout.asp, line 112

Is this a database setting error? Can anyone instruct us on how to set the
IDENTITY_INSERT to ON for the ID column in our table?

Thanks.
nath.


Jens

2006-03-05, 8:24 pm

Hi,

thats a session thing, llok in the BOL for more information:


ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/a5dd49f2-45c7-44a8-b182-e0a5e5c373ee.htm


SET IDENTITY_INSERT [ database_name . [ schema_name ] . ] table { ON |
OFF }


HTH, Jens Suessmeyer.

Jens

2006-03-05, 8:24 pm

Hi,

thats a session thing, llok in the BOL for more information:


ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/a5dd49f2-45c7-44a8-b182-e0a5e5c373ee.htm


SET IDENTITY_INSERT [ database_name . [ schema_name ] . ] table { ON |
OFF }


HTH, Jens Suessmeyer.

Nathon Jones

2006-03-05, 8:24 pm

The BOL? :o(

Total newbie here Jens...hope you can bear with me! :o)

Where/What is the BOL?

Thanks
Nath.

"Jens" <Jens@sqlserver2005.de> wrote in message
news:1141478203.215944.156110@i40g2000cwc.googlegroups.com...
> Hi,
>
> thats a session thing, llok in the BOL for more information:
>
>
> ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/a5dd49f2-45c7-44a8-b182-e0a5e5c373ee.htm
>
>
> SET IDENTITY_INSERT [ database_name . [ schema_name ] . ] table { ON |
> OFF }
>
>
> HTH, Jens Suessmeyer.
>



Tibor Karaszi

2006-03-05, 8:24 pm

BOL is Books Online. The documentation that comes with SQL Server.

--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www. solidqualitylearning
.com/

Blog: http:// solidqualitylearning
.com/blogs/tibor/



"Nathon Jones" < sales@NOSHPAMtradmus
ic.com> wrote in message
news:Om%23WVY5PGHA.5592@TK2MSFTNGP11.phx.gbl...
> The BOL? :o(
>
> Total newbie here Jens...hope you can bear with me! :o)
>
> Where/What is the BOL?
>
> Thanks
> Nath.
>
> "Jens" <Jens@sqlserver2005.de> wrote in message
> news:1141478203.215944.156110@i40g2000cwc.googlegroups.com...
>
>


Nathon Jones

2006-03-05, 8:24 pm

Hi,

Doh!

Nath.

"Tibor Karaszi" <tibor_please.no. email_karaszi@hotmai
l.nomail.com> wrote in
message news:OpLMjd5PGHA.5152@TK2MSFTNGP10.phx.gbl...
> BOL is Books Online. The documentation that comes with SQL Server.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www. solidqualitylearning
.com/

> Blog: http:// solidqualitylearning
.com/blogs/tibor/

>
>
> "Nathon Jones" < sales@NOSHPAMtradmus
ic.com> wrote in message
> news:Om%23WVY5PGHA.5592@TK2MSFTNGP11.phx.gbl...
>



Dan Guzman

2006-03-05, 8:24 pm

Are you certain you want to set IDENTITY_INSERT ON? There are special
situations where you may need to turn on this option but in most cases you
want to omit the column from your insert statement so that SQL Server will
assign the value automatically.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Nathon Jones" < sales@NOSHPAMtradmus
ic.com> wrote in message
news:ONykDn4PGHA.2828@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
> [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert explicit
> value
> for identity column in table 'tblCustomers' when IDENTITY_INSERT is set to
> OFF.
> /checkout.asp, line 112
>
> Is this a database setting error? Can anyone instruct us on how to set
> the
> IDENTITY_INSERT to ON for the ID column in our table?
>
> Thanks.
> nath.
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com