A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

what the heck does this mean?



 
 
Thread Tools Display Modes
  #1  
Old May 6th, 2009, 08:05 PM posted to microsoft.public.access
JAmes
external usenet poster
 
Posts: 904
Default what the heck does this mean?

I know these type of questions are lame but I am lame at access...ha...so if
I could understand what this error is telling me maybe I could find the
problem. Any help would be great thanks!

ODBC --call failed.

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert explicit value
for identity column in table 'table1' when IDENTITY_INSERT is set to OFF.
(#544)

ps. table1 is a subform with in a mainform
thanks
  #2  
Old May 6th, 2009, 08:28 PM posted to microsoft.public.access
John Spencer MVP
external usenet poster
 
Posts: 533
Default what the heck does this mean?

It means that you are trying to insert a specific value into an identity
column (think autonumber) and SQL SERVER won't permit it unless
Identity_Insert Property is set to OFF. While the property is On (TRUE) only
the SERVER can insert values (that are aut0generated) into the field.

It sounds like you have a field in Table 1 that should be a foreign key to a
field on the main form.

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County

James wrote:
I know these type of questions are lame but I am lame at access...ha...so if
I could understand what this error is telling me maybe I could find the
problem. Any help would be great thanks!

ODBC --call failed.

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert explicit value
for identity column in table 'table1' when IDENTITY_INSERT is set to OFF.
(#544)

ps. table1 is a subform with in a mainform
thanks

  #3  
Old May 6th, 2009, 08:29 PM posted to microsoft.public.access
Larry Linson
external usenet poster
 
Posts: 3,112
Default what the heck does this mean?


"James" wrote in message
...
I know these type of questions are lame but I am lame at access...ha...so
if
I could understand what this error is telling me maybe I could find the
problem. Any help would be great thanks!

ODBC --call failed.

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert explicit

value
for identity column in table 'table1' when IDENTITY_INSERT is set to OFF.
(#544)


An "identity column" in SQL Server is similar to an Autonumber column in the
default Access Jet/ACE database engines, that is, SQL Server assigns the
value. The message indicates that you performed an operation that attempted
to set the value of the identity column in "table1" instead of letting SQL
Server set it. The problem could be in your definition of the table1 in SQL
Server, or in what you are doing in your database application. Only careful
examination and debugging on your part will determine which.

ps. table1 is a subform with in a mainform


I seriously doubt that "table1" is a "subform within a mainform". Even if
you used the name "table" for a "form", the message you received applies
only to tables, that is, tables in the server database. Tables are not forms
nor subforms; tables contain data; forms display data; subform controls
display other forms or datasheet views.

thanks





__________ Information from ESET Smart Security, version of virus signature database 4057 (20090506) __________

The message was checked by ESET Smart Security.

http://www.eset.com




  #4  
Old May 6th, 2009, 09:38 PM posted to microsoft.public.access
David W. Fenton
external usenet poster
 
Posts: 3,373
Default what the heck does this mean?

"Larry Linson" wrote in
:

"James" wrote in message
...
I know these type of questions are lame but I am lame at
access...ha...so if
I could understand what this error is telling me maybe I could
find the problem. Any help would be great thanks!

ODBC --call failed.

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert
explicit

value
for identity column in table 'table1' when IDENTITY_INSERT is
set to OFF. (#544)


An "identity column" in SQL Server is similar to an Autonumber
column in the default Access Jet/ACE database engines, that is,
SQL Server assigns the value. The message indicates that you
performed an operation that attempted to set the value of the
identity column in "table1" instead of letting SQL Server set it.


I don't think so, Larry. Only one table at a time can have
IDENTITY_INSERT on. Before an insert you have to set it OFF for
whatever table it's on for, and on for the table you're using. This
is best done by having your inserts be handled with stored
procedures.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
  #5  
Old May 6th, 2009, 11:29 PM posted to microsoft.public.access
Richard
external usenet poster
 
Posts: 1,419
Default what the heck does this mean?


http://support.microsoft.com/default.aspx/kb/160762


Richard

"David W. Fenton" wrote:

"Larry Linson" wrote in
:

"James" wrote in message
...
I know these type of questions are lame but I am lame at
access...ha...so if
I could understand what this error is telling me maybe I could
find the problem. Any help would be great thanks!

ODBC --call failed.

[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert
explicit

value
for identity column in table 'table1' when IDENTITY_INSERT is
set to OFF. (#544)


An "identity column" in SQL Server is similar to an Autonumber
column in the default Access Jet/ACE database engines, that is,
SQL Server assigns the value. The message indicates that you
performed an operation that attempted to set the value of the
identity column in "table1" instead of letting SQL Server set it.


I don't think so, Larry. Only one table at a time can have
IDENTITY_INSERT on. Before an insert you have to set it OFF for
whatever table it's on for, and on for the table you're using. This
is best done by having your inserts be handled with stored
procedures.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

  #6  
Old May 7th, 2009, 06:32 PM posted to microsoft.public.access
JAmes
external usenet poster
 
Posts: 904
Default what the heck does this mean?

I seriously doubt that "table1" is a "subform within a mainform". Even if
you used the name "table" for a "form", the message you received applies
only to tables, that is, tables in the server database. Tables are not forms
nor subforms; tables contain data; forms display data; subform controls
display other forms or datasheet views.


Correct. I was thinking form, but typed table. sorry for the confusion.
  #7  
Old May 7th, 2009, 11:00 PM posted to microsoft.public.access
David W. Fenton
external usenet poster
 
Posts: 3,373
Default what the heck does this mean?

"David W. Fenton" wrote in
36.99:

I don't think so, Larry. Only one table at a time can have
IDENTITY_INSERT on. Before an insert you have to set it OFF for
whatever table it's on for, and on for the table you're using.
This is best done by having your inserts be handled with stored
procedures.


Yes, that was a completely brain fart on my part. I ended up very
confused over the subject.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
  #8  
Old May 9th, 2009, 07:39 PM posted to microsoft.public.access
JAmes
external usenet poster
 
Posts: 904
Default what the heck does this mean?

Before an insert you have to set it OFF for
whatever table it's on for, and on for the table you're using. This
is best done by having your inserts be handled with stored
procedures.


how do I turn IDENTITY_INSERT on or off? I looked in the properties and
couldn't find it. thanks

  #9  
Old May 9th, 2009, 08:13 PM posted to microsoft.public.access
Larry Linson
external usenet poster
 
Posts: 3,112
Default what the heck does this mean?


"James" wrote

Before an insert you have to set it OFF for
whatever table it's on for, and on for the table you're using. This
is best done by having your inserts be handled with stored
procedures.


how do I turn IDENTITY_INSERT on or off? I
looked in the properties and couldn't find it. thanks


It's not an Access property. Did you look in the properties in the Server
DB?

Larry Linson
Microsoft Office Access MVP



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:06 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.