"Invalid Object Name" Error When Updating by Stored Procedure in Different Database

ID: Q238750


The information in this article applies to:
  • Microsoft Data Access Components versions 2.1 SP1, 2.1 SP2


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.


RESOLUTION

A supported fix that corrects this problem is now available from Microsoft, but it has not been fully regression tested and should be applied only to systems experiencing this specific problem. If you are not severely affected by this specific problem, Microsoft recommends that you wait for the next Microsoft Data Access service pack that contains this fix.

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 on support costs, please go to the following address on the World Wide Web:

http://www.microsoft.com/support/supportnet/overview/overview.asp
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

 

NOTE: If this product was already installed on your computer when you purchased it from the Original Equipment Manufacturer (OEM) and you need this fix, please call the Pay Per Incident number listed on the above Web site. If you contact Microsoft to obtain this fix, and if it is determined that you only require the fix you requested, no fee will be charged. However, if you request additional technical support, and if your no-charge technical support period has expired, or if you are not eligible for standard no-charge technical support, you may be charged a non-refundable fee.

For more information about eligibility for no-charge technical support, see the following article in the Microsoft Knowledge Base:
Q154871 Determining If You Are Eligible for No-Charge Technical Support


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.


MORE INFORMATION




IMPORTANT!

It is not recommended that you install this hotfix on a machine that is currently running MDAC 2.1 SP2 (version 2.12.4202) or later. This hotfix should only be used with machines running MDAC 2.1 SP1 (version 2.10.3711) or earlier.

In order to alleviate memory fragmentation problems, significant code changes were made between MDAC 2.1 SP1 and MDAC 2.1 SP2. While it is not expected that any fatal errors occur if this hotfix is applied to MDAC 2.1 SP2, doing so is strongly discouraged.

A separate hotfix exists to address this problem in MDAC 2.1 SP2.

Please see the REFERENCES section of this article for more information.

Manual Installation

  1. Close or stop any applications or services that are using Msdaprst.dll. This may include Internet Information Server (IIS), Microsoft Transaction Server (MTS), Microsoft Distributed Transaction Coordinator (DTC), and any ADO or OLE DB applications.


  2. Download the hotfix version of Msdaprst.dll into a temporary folder.


  3. Locate and rename the current version of Msdaprst.dll, which should be in the \Program Files\Common files\System\msadc folder.


  4. Copy the hotfix version of Msdaprst.dll into the same location and restart your services and applications.




Important Notice for Microsoft Windows 95/98 Users

If you are installing this fix onto a computer running Windows 95 or a computer with the original release of Windows 98, you might need to install the Windows 98 Migration DLL included with this fix.

NOTE: Read the Migrate_qfe.txt file that is included in the Migration.exe file included with the download.


REFERENCES


For information about this hotfix as it applies to MDAC 2.1 SP2, please refer to the following article found in the Microsoft Knowledge Base:
Q238092 Invalid Object Name Errors When Updating Via Stored Procedure in Different Database


For more information on the memory fragmentation issue referenced above, please refer to the following article found in the Microsoft Knowledge Base::
Q230101 Data Queries Sporadically Return Empty Recordsets

To download and install MDAC 2.1 SP2 GA (version 2.12.4202), please visit the following location: MDAC 2.1.2.4202.3 (GA)

Additional query words: sql server stored procedure recordset out of process disconnected ADO metadata invalid object name mdaprst.dll hotfix

Keywords : kbRDS kbSQLServ kbGrpVCDB kbGrpMDAC kbDSupport kbADO210sp2fix kbMDAC210SP2
Version : WINDOWS:2.1 SP1,2.1 SP2
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: September 20, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.