SQLExpress - AttachDBFilename and mdf files

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
tripunkt

SQLExpress - AttachDBFilename and mdf files

Post by tripunkt » Fri 03 Mar 2006 14:04

Hello NG,

is there a way to configure the dbExpress driver using mdf-files from SQL Server 2005 Express?

In .NET I use something like:
Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\myDB.mdf

How will the connection string look like for dbExpress?

best regards
Sebastian May

--
tripunkt GbR
http://www.tripunkt.de

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 03 Mar 2006 16:04

MS SQL doesn't allow connecting to the database file directly. dbExpress driver doesn't know about database files at all and needs server to be started. To connect to MS SQL Server you should set HostName, DatabaseName, User_Name, Password and some other parameters.

Post Reply