Solved

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

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

813 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now