Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Invalid Object Name Errors When Updating Via Stored Procedure in Different Database


View products that this article applies to.

This article was previously published under Q238092

↑ Back to the top


Symptoms

When the following conditions occur
  • A SQL Server stored procedure exists in one database, which 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 recordset to another client application
  • An attempt is made to update the disconnected recordset
the following error message appears
Invalid object name <object name>
where "object name" is the name of the table you are attempting to update.

If the recordset is never marshaled out-of-process, but is instead delivered directly to the process that is attempting to update it, the UPDATE statement succeeds.

↑ Back to the top


Cause

The remote portion of ActiveX Data Objects (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.

If you examine the trace logs, you'll see that the correct database.owner.tablename syntax was used while selecting the records, but only the tablename was used while 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 will be returned.

↑ Back to the top


Resolution

To resolve this problem, you can either obtain and apply the fix that is described in this section or you can update to the latest version of Microsoft Data Access Components (MDAC), which contains the fix, from the following Microsoft Web site: A 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 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 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      Time    Version      Size    File name     Platform
   -------------------------------------------------------------
   7/22/99           2.12.4321    163KB   msdaprst.dll


				

↑ Back to the top


Status

Microsoft 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 version 2.5 and later.

↑ Back to the top


More information

IMPORTANT: It is not recommended that you install this hotfix on a machine that is currently running MDAC 2.1 SP1 GA (version 2.1.1.3711.11) or earlier. This hotfix should only be used with machines running MDAC 2.1 SP2 GA (version 2.1.2.4202.3).

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 will occur if this hotfix is applied to MDAC 2.1 SP1, doing so is strongly discouraged.

Please see the REFERENCES section below for more information.

Manual Installation

Use the following steps to manually install Msdaprst.dll:
  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 directory.
  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 Windows 95 and Windows 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 may need to install the Windows 98 Migration DLL included with this fix. Please carefully read the Migrate_qfe.txt file that is included Migration.exe file included with the download.

REFERENCES

For more information on the memory fragmentation issue referenced above, see the following article in the Microsoft Knowledge Base:
230101� Data Queries Sporadically Return Empty Recordsets

↑ Back to the top


Keywords: KB238092, kbqfe, kbmdac250fix, kbfix, kbdatabase, kbbug, kbado210sp2fix, kbqfe, kbhotfixserver

↑ Back to the top

Article Info
Article ID : 238092
Revision : 9
Created on : 10/7/2005
Published on : 10/7/2005
Exists online : False
Views : 391