FIX: "Invalid Object Name" Error When Updating by Stored Procedure in Different Database (238750)
The information in this article applies to:
- Microsoft Data Access Components 2.1 SP1
- Microsoft Data Access Components 2.1 SP2
This article was previously published under Q238750 SYMPTOMS
The following error is returned, where object name is the name of the table you are attempting to update:
Invalid object name object name
This error message occurs under the following conditions:
- A SQL Server stored procedure exists in one database that selects records from a table in a different database.
- The resulting recordset is returned to an application or service.
- That recordset is then passed out-of-process as a disconnected ADO (ActiveX Data Objects) recordset to another client application.
- An attempt is made to update the disconnected recordset.
If the recordset is never marshaled out of process but is delivered directly to the process that is attempting to update it instead, the UPDATE statement succeeds.
CAUSE
The remoting portion of ADO (Msdaprst.dll) is inadvertently overwriting portions of the metadata contained in the recordset. When subsequently constructing the UPDATE statement, this metadata is not available and incorrect syntax is generated.
Examination of trace logs show that the correct database.owner.tablename syntax was used when selecting the records, but only the table name was used when constructing the UPDATE statement.
Because the Connection currently points to the database containing the stored procedure and the table does not exist in that database, "Invalid Object Name" errors are returned.
RESOLUTIONA supported fix is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Apply it only to computers that are experiencing this specific problem. This fix may receive additional testing. Therefore, if you are not severely affected by this problem, Microsoft recommends that you wait for the next Microsoft Data Access service pack that contains this hotfix. To resolve this problem immediately, contact Microsoft Product Support Services to obtain the fix. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site: NOTE: In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The typical support costs will apply to additional support questions and issues that do not qualify for the specific update in question.
The English version of this fix should have the following file attributes or later:
Date Version Size File name
-----------------------------------------------------
7/22/99 2.10.4321 203KB msdaprst.dll
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was corrected in MDAC 2.5.
For the latest version of Microsoft Data Access Components (MDAC), see the following Microsoft Web site:
Modification Type: | Minor | Last Reviewed: | 10/7/2005 |
---|
Keywords: | kbHotfixServer kbQFE kbADO210sp2fix kbbug kbfix kbMDAC250fix kbQFE KB238750 |
---|
|