Solved

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

Posted on 2011-09-07
2
262 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
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

756 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