PRB: ADOX Creates Read Only Linked Tables to Access Databases (276035)
The information in this article applies to:
- ActiveX Data Objects (ADO) 2.5
This article was previously published under Q276035 SYMPTOMS
Programmatically linking an external table to a Microsoft Access database may cause the linked table to have a Read Only status, and the following error message occurs when you try to update the table:
Run-time error '-2147467259 (80004005)':
operation must use an updateable query
CAUSE
This error message may occur because:
- The source table does not have a primary key.
-or-
- You use Microsoft ActiveX Data Objects Extensions for Data Definition Language and Security (ADOX) to create the link without first refreshing the link.
RESOLUTION
To resolve this problem, make sure that the source table has a primary key, and then apply one of the following approaches:
- In Microsoft Access, refresh the link. To refresh the link, from the Tools menu, point to Database Utilities and then click Linked Table Manager. In the Linked Table Manager dialog box,
select the tables that you need to refresh, and then click OK.
- If you are linking new tables by using ADOX, make sure that you refresh the link by setting the Jet OLEDB:Link Provider String property in code again after appending the table to the tables collection as demonstrated in the "More Information" section.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 11/7/2003 |
---|
Keywords: | kbCodeSnippet kbMDACNoSweep kbprb KB276035 |
---|
|