The information in this article applies to:
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. 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. STATUSMicrosoft has confirmed this to be a problem in SQL Server version 6.5. MORE INFORMATIONSQL-DMO error 10049 is an informational message from DB-Library informing the caller every 1000 rows that 1000 rows have been successfully exported. However, the run-time error triggered in the Visual Basic application depends on if and how an error-handler has been implemented. To get the SQL-DMO error-number you need to subtract the constant vbObjectError from the value of Err.Number as in the following example from SQL Server Books Online:
Using WithEvents, you get two new Visual Basic event procedures added automatically to your Visual Basic project: BatchImported and RowsCopied. You may use the RowsCopied event procedure to monitor the progress of the export.Additional query words: DMO SQLOLE SQLDMO ExportData ImportData BulkCopy object WithEvents 80042741
Keywords : kbprg SSrvDMO SSrvProg SSrvVisB kbbug6.50 kbSQLServ650bug |
Last Reviewed: November 9, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |