Solved

Having trouble adding a record to a SQL Server table.... Error 3622

Posted on 2011-09-07
2
264 Views
Last Modified: 2012-05-12
I am using an access front end to add a record to a Sql Server table using a variation of the code below.   The record is not added and the following error is returned:

Error 3622: You must use the dbSeeChanges option with OpenRecordset when accessing a SQL Server table that has an IDENTITY column.

What do I need to change to make this work please?
With CurrentDb.OpenRecordset("SELECT * FROM dbo_TimeSheets WHERE 1=2", 2, 8)
                   .AddNew
                     !TPID = Me.TPID
                     !EmployeeID = Me.EmployeeID
                     !Labor_Date = Me.Labor_Date
                     !No_Of_Hours = Me.No_Of_Hours
                     !Labor_Code = Me.Labor_Code
                   .Update
                   .Close
    End With

Open in new window

0
Comment
Question by:snyperj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 36500431

try this

With CurrentDb.OpenRecordset("SELECT * FROM dbo_TimeSheets WHERE 1=2",dbopendynaset, dbseechanges)
0
 

Author Comment

by:snyperj
ID: 36500461
thanks...
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question