This is a discussion on Test Connection failed if "attach database filename" property was set within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> we use SQL Server 2005 Express.(download from 17.november.) and tried to create a DSN that attaches a database file ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| we use SQL Server 2005 Express.(download from 17.november.) and tried to create a DSN that attaches a database file to server. I created the datasource with the following configuration: >Microsoft SQL Native Client Version 09.00.1399 > >Data Source Name: sds >Data Source Description: sds >Server: (local) >Use Integrated Security: No >Database: mynorthwind >Language: (Default) >Data Encryption: No >Trust Server Certificate: No >Multiple Active Result Sets(MARS): No >Mirror Server: >Translate Character Data: Yes >Log Long Running Queries: No >Log Driver Statistics: No >Use Regional Settings: No >Use ANSI Quoted Identifiers: Yes >Use ANSI Null, Paddings and Warnings: Yes >Attach Database Filename: c:\porta\mynorthwind.mdf A click on test connection results in the following error message: >Microsoft SQL Native Client Version 09.00.1399 > >Running connectivity tests... > >Attempting connection >[Microsoft][SQL Native Client][SQL Server]Could not open new database 'mynorthwind'. >CREATE DATABASE is aborted. >[Microsoft][SQL Native Client][SQL Server]Could not attach file 'c:\porta\mynorthwind.mdf' >as database 'mynorthwind'. > >TESTS FAILED! The presence of original _log.LDF has no influence on the error message. If I use stored procedures to attach database, everything is ok.(same user for login) >EXEC sp_attach_db 'mynorthwind',N'c:\\porta\\mynorthwind.mdf',N'c:\\ porta\\mynorthwind_log.ldf' How can I create a DS that attaches a database? regards Steffen |