FIX: SQLDMO - Setting BULKCOPY.SuspendIndexing = True May Fail

Article translations Article translations
Article ID: 239717 - View products that this article applies to.
This article was previously published under Q239717
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 54689 (SQLBUG_70)
Expand all | Collapse all

Symptoms

When using SQLDMO BULKCOPY object in a Visual Basic application, BULKCOPY.ImportData fails if BULKCOPY.SuspendIndexing = True. The symptoms are different depending on whether or not there are indexes on the destination table.

With no index on the destination table, the application terminates with the following exception access violation:
Run time error '-2147221499 (80040005):
[SQL-DMO]Code Execution Exception:
EXCEPTION_ACCESS_VIOLATION
With an existing index, the application terminates with the following message:
Run time error '-2147221296 (800400d0):
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'table'
where 'table' is the name of the destination table into which the data is imported.

Workaround

Set BULKCOPY.SuspendIndexing = False. Then in the Visual Basic code, explicitly drop and recreate the indexes on the table.

Status

Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 1 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
232570INF: How to Obtain Service Pack 1 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, contact your primary support provider.

Properties

Article ID: 239717 - Last Review: November 2, 2013 - Revision: 3.0
Applies to
  • Microsoft SQL Server 7.0 Standard Edition
Keywords: 
kbnosurvey kbarchive kbbug kbfix kbqfe kbsqlserv700sp1fix KB239717

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com