FIX: DMO BulkCopy Fails to Copy Data When Column Names Contain the Space Character (299865)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q299865
BUG #: 351486 (SHILOH_BUGS)
SYMPTOMS
Using the SQL Distributed Management Objects (DMO) BulkCopy object to import data into a SQL Server table that contains a column with a space embedded in the column name may fail with no rows copied.
CAUSE
By default, the BulkCopy object uses a second connection which does not inherit properties, such as QuotedIdentifiers, from the original connection.
RESOLUTIONTo resolve this problem, obtain the latest service pack for SQL Server 2000. For additional information, click the following article number to view the article in the
Microsoft Knowledge Base:
290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack
WORKAROUND
You can work around this problem in the following ways:
- Make sure that the SQL-DMO BulkCopy object reuses the existing connection by setting the UseExistingConnection property to True.
- Remove the embedded space in the column name.
STATUSMicrosoft has confirmed that this is a problem in SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.
Modification Type: | Major | Last Reviewed: | 11/5/2003 |
---|
Keywords: | kbBug kbfix kbSQLServ2000sp1fix KB299865 |
---|
|