|
-
May 3rd, 2005, 10:22 AM
#1
MS SQL Server database path rules
I am using ODBC SQL Server Driver to read data into an app from a database on an MS SQL Server. The user is responsible for providing the full path and filename by selecting it themselves. The code then attaches the database to the server and opens it for reading. For testing purposes I have been using "C:\TestTest\database.mdf". If I use that path everything works correctly, however, if I use
"C:\Test Test\database.mdf" I receive the following COM error:
80004005
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database requested in login '<databasename>.mdf'. Login fails
Unspecified error
Microsoft OLE DB Provider for ODBC Drivers
This is all being done in C++/MFC/COM. The user has the Microsoft SQL Server Desktop Engine 2000A on their system and we use it, along with the ODBC driver, to read information in from the provided database. In attempting to track down if the whitespace in the path is indeed the problem, or if it's something else, I have been trying to find information on what the naming convention is for database names and their full paths but have not been able to find any resources on this issue. If anyone has any URLs on such information, or any thoughts, could you please post them. thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|