Home > Archive > MS SQL Server ODBC > November 2005 > Test Connection failed if "attach database filename" property was set









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Test Connection failed if "attach database filename" property was set
Steffen(i-net software)

2005-11-18, 9:23 am

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\mynorthwin
d.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\\my
northwind_log.ldf'


How can I create a DS that attaches a database?

regards

Steffen

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com