Posted on 2005-04-01
Medium Priority
Last Modified: 2011-12-02
I have a SQL table with an Identity field linked into an Access database.  I am trying to execute the delete SQL statement below, but I am receiving a 3622 run time error.

set dbs = currentdb
dbs.Execute "delete * from tbl10_MonthlyMDExtract"

I found a reference to the error, but I am not sure how to fix it since I am not using an OpenRecordset command.  

Note   If you attempt to access a SQL Server 6.0 table that includes an identity column, you can trigger an erroneous 3622 error. To prevent this problem, use the dbSeeChanges option with the Options property or OpenRecordset method.

Any ideas?

Question by:klb37777
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
LVL 15

Expert Comment

ID: 13684349
sql server delete syntax does not have the asterisk:

set dbs = currentdb
dbs.Execute "delete from tbl10_MonthlyMDExtract"
LVL 18

Accepted Solution

Data-Man earned 1000 total points
ID: 13684362
If that doesn't solve your problem, then do this.

set dbs = currentdb
dbs.Execute "delete from tbl10_MonthlyMDExtract", dbSeeChanges



Author Comment

ID: 13684428
I had already tried taking the asterisk out and still received the error.  I had also tried adding the dbSeeChanges to the statement but I put it inside the quotes instead of outside.  

It worked when I put it outside the quotes.  Thanks for the help.
LVL 18

Expert Comment

ID: 13684449


Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

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…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

777 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