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

ID: Q239717


The information in this article applies to:
  • Microsoft SQL Server version 7.0

BUG #: 54689 (SQLBUG_70)

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 version 7.0. This problem has been corrected in U.S. Service Pack 1 for Microsoft SQL Server version 7.0. For information about downloading and installing the latest SQL Server Service Pack, see http://support.microsoft.com/support/sql/.

For more information, contact your primary support provider.

Additional query words:

Keywords : kbbug7.00 kbSQLServ700bug kbSQLServ700sp1fix
Version : winnt:7.0
Platform : winnt
Issue type : kbbug


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