SQL Server manages auto-incremented fields differently than Access does. I believe you have to go into SQL Server Enterprise Manager and modify that field in the table so that SQL Server knows it is an autonumber field.
  ----- Original Message -----
  From: Donna French
  To: CF-Talk
  Sent: Wednesday, August 18, 2004 1:17 PM
  Subject: Access > SQL Question

  I have a table that I transferred from Access to SQL and had a field
  setup as auto number. Now I am getting an error message when I try to
  submit new info to the table in SQL.

  Here's the error:

  ODBC Error Code = 23000 (Integrity constraint violation)
  [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert the value
  NULL into column 'id', table 'mydatabase.user.tblMemo'; column does not
  allow nulls. INSERT fails.
  The error occurred while processing an element with a general identifier
  of (CFINSERT), occupying document position (6:1) to (11:28).

  Here's the CFInsert code:
  <cfinsert dbname="mydbname"
              username="myusername"
              password="mypassword"
              datasource="mydsn"
              tablename="tblMemo"
              formfields="subject, memo">

  Any help appreciated.

  Thank you,

  Donna French
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to