Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-09-07
2
Medium Priority
?
266 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 2000 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
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…
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.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

718 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