BUG: SQL-DMO: ExportData Method of BulkCopy Object Causes VB Run-Time Error (238558)
The information in this article applies to:
This article was previously published under Q238558
BUG #: 18818 (SQLBUG_65)
SYMPTOMS
When you invoke the SQL Server Distributed Management Object's (SQL-DMO)
ExportData method from within a Visual Basic application, you receive a run-time error -2147211455 (SQL-DMO error 10049) when the source table contains more than 999 rows.
Additionally, the return value from the ExportData method always returns the value 0 instead of the number of rows exported, as stated in the SQL-DMO documentation.
WORKAROUND
To work around this problem, add On Error processing to your project and declare the BulkCopy object using the WithEvents keyword. Doing so also enables you to determine the number of rows exported by evaluating the return value of the ExportData method.
NOTE: This workaround requires the sqlole65.dll file, version 1997.04.02 that is dated 6/16/97.
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 10/9/2003 |
---|
Keywords: | kbBug kbnofix kbpending kbProgramming KB238558 |
---|
|