FIX: SQLDMO ExportData Method Fails If There Is a Space in the Database Name (308860)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q308860
BUG #: 351436 (SHILOH_BUGS)
SYMPTOMS
When you use the ExportData method of the table object from SQL Server Distributed Management Objects (DMO), if the name of the source database contains a space, an error occurs. For example, if "My Database" is the name of the source database, this run-time error message appears:
Run-time error '-2147221348(8004009c)':
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'Database'.
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'Database'.
If you examine the SQL Profiler trace, you see the statements that follow. Note that there are no brackets to delimit the database name.
EXEC sp_bcp_dbcmptlevel My Database
SET FMTONLY ON
SELECT * FROM [dbo].[myTable]
SET FMTONLY OFF
EXEC My Database..sp_tablecollations 'My Database.[dbo].[myTable]'
RESOLUTION
To resolve this problem, obtain the latest service pack for SQL Server 2000 or the latest service pack for MDAC 2.6.
For additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack
For additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
300635 INFO: How to Obtain the Latest MDAC 2.6 Service Pack
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article. This problem was first corrected in Microsoft SQL Server 2000 Service Pack 2 and MDAC 2.6 Service Pack 2.
Modification Type: | Major | Last Reviewed: | 10/16/2003 |
---|
Keywords: | kbbug kbfix kbmdac260sp2fix KB308860 |
---|
|