Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3441146
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:31:02+00:00 2026-05-18T08:31:02+00:00

We have an Access database migrated from Access 97 to Acces 2007 with some

  • 0

We have an Access database migrated from Access 97 to Acces 2007 with some linked tables to an SQL Server 2008 database.
We are using a File DSN in the ODBC Administrator. Connection tests work fine there. In fact, we have a main form in the Access 2007 application that shows the data always correctly.

The problem appears when we execute a task that makes the following call:

Dim dbs As Database
Dim rstAppend As Recordset
Set dbs = CurrentDb
Set rstAppend = dbs.OpenRecordset(strAccessTable, dbOpenDynaset, dbSeeChanges)

OpenRecordset throws the error number 3151 and occurs randomly but it appears quite frequently. It’s sporadic. When we don’t get the error, the task works fine.

  1. It not happens always, mostly we’re fine.
  2. When it happens it happens for all subsequent tasks tried. We have to close and reopen the Access database and pray to the good Lord that it works.
  3. Sometimes, refreshing the tables in the Linked Table Manager solves the problem, but others don’t.
  4. We receive sometimes an error “ODBC–Call Failed” when refreshing the Linked Table Manager. Deleting the File DSN and creating a new one solves the problem.
  5. We have tried with two different drivers (SQL Server and SQL Server Native Client 10) and in both cases the problem remains.
  6. Also we have tried to put the Access File in the same machine than the SQL Server and the problem remains.
  7. We have increased the ODBC Timeout for all the querys from 60 to 180 seconds,but the problem still remains.
  8. We don’t have to wait to see the error, it appears in less than one second after executing the task.

We would be very happy if someone could help us to find a solution to this problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:31:02+00:00Added an answer on May 18, 2026 at 8:31 am

    After two months of research, we found one solution, change from DAO to ADO. This is the answer MS gave me:

    I’d like to make you aware that implementing the workaround (using ADO instead of DAO) could be less time consuming than trying to figure out why DAO doesn’t seem to work.
    Therefore it might be advisable using the workaround instead of trying to find the root cause of this issue, especially as it doesn’t seem to be reproducible.

    However; here is what I’d like to you do next:

    1. Please replace the file DSN by a system or User DSN.
    2. Use the ‘normal’ ODBC driver for SQL- Server instead of the native driver.
    3. After creating the user DSN re link all the tables.
    4. In VBA code use explicit type declarations only instead of implicit declarations. So please replace use DAO. In front of any database type declarations in order to explicitly create DAO objects. For example replace the following:

      Dim dbs As Database
      Dim rstAppend As Recordset
      By
      Dim dbs As DAO.Database
      Dim rstAppend As DAO.Recordset

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have migrated an Access DB to MSSql server 2008 and found some anomalies
I migrated a database from access 2003 to access 2007. It seems to work
I have an access database with these tables: - sequences: it describes the sequences
I have an Access database (in Access 2003) with several tables, and data must
I have an Access 2007 database and when I open it I can copy
I have an Access 2007 database that works asynchronously with a MAS200 database. Due
I have a MS Access database with few tables and a form. When more
We are migrating a database from MySQL to SQL Server. The migration is pretty
i have a asp.net mvc webpage that queries a SQL server database for contact
I have an old Access database that is basically one flat file. I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.