Microsoft Knowledge Base Email Alertz

When you try to insert a row into an Access 97 Design Master or Replica database with either the Microsoft Access ODBC Driver or the Microsoft OLE DB Provider for Jet that ships with MDAC 2.1 GA, the following error occurs:

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 230152 - Last Review: August 23, 2001 - Revision: 1.0

PRB: Cannot Add Rows to a Replica Database with ADO

This article was previously published under Q230152

On This Page

SYMPTOMS

When you try to insert a row into an Access 97 Design Master or Replica database with either the Microsoft Access ODBC Driver or the Microsoft OLE DB Provider for Jet that ships with MDAC 2.1 GA, the following error occurs:
Operation not supported on replicable databases that have not been converted to the current version.

RESOLUTION

The current workaround is to use the Microsoft Jet OLE DB 3.51 Provider.

For additional information about another possible workaround, please click the article number below to view the article in the Microsoft Knowledge Base:
240377  (http://kbalertz.com/Feedback.aspx?kbNumber=240377/EN-US/ ) HOWTO: Insuring Jet 3.5 Is Installed Correctly (Part I)

STATUS

This behavior is by design. MDAC 2.1 and later service packs for MDAC 2.1 use the Microsoft Jet Engine 4.0. The Microsoft Jet Engine 4.0 allows read/write access only to design master or replica databases in the Microsoft Access 2000 format. If you open a design master or replica database using version 4.0 and the database format is Microsoft Access 97 format (or an earlier format) the database will be read-only.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Start Access 97.
  2. Open an Access 97 .MDB.
  3. Choose Tools, Replication, and then Create Replica from the menus.
  4. Follow the steps to create a Design Master and Replica database.
  5. Start Visual Basic and choose a Project type of Standard EXE. Form1 is created by default.
  6. Add a Project Reference to Microsoft ActiveX Data Objects 2.1 Library.
  7. Paste the following code into the default form's Load method:
    Dim cn As New ADODB.Connection
    Dim rs As New ADODB.Recordset
    
    'The following two Connection Strings will fail.
    'Make sure the path to the MDB points to the Design Master or Replica
    cn.ConnectionString = "DRIVER={Microsoft Access Driver (*.mdb)}" & _
                           ";DBQ=<path to Design Master or Replica>"
    'cn.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0" & _
                           ";DATA SOURCE=<path to Design Master or Replica>"
    'Uncomment this Connection String for a work around
    'cn.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.3.51" & _
                          ";DATA SOURCE=<path to Design Master or Replica>"
    cn.Open
    
    rs.ActiveConnection = cn
    rs.Open "select * from authors", , adOpenDynamic, adLockOptimistic, adCmdText
    rs.AddNew
    rs.Update
    
    cn.Close
    Set cn = Nothing
    					
  8. Save the Project and then execute by pressing the F5 key.

APPLIES TO
  • Microsoft ActiveX Data Objects 2.1
  • Microsoft ActiveX Data Objects 2.1 Service Pack 1
  • Microsoft ActiveX Data Objects 2.1 Service Pack 2
  • Microsoft ActiveX Data Objects 2.5
  • Microsoft ActiveX Data Objects 2.6
  • Microsoft ActiveX Data Objects 2.7
  • Microsoft OLE DB Provider for Jet 4.0
  • Microsoft Open Database Connectivity Driver for Access 4.0
Keywords: 
kbdatabase kbdriver kbjet kbprb KB230152
Retired KB ArticleRetired KB Content Disclaimer
This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered "as is" and will no longer be updated.
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate