skip to main content
Drivers for 32-Bit and 64-Bit Platforms : The SQL Server Legacy Wire Protocol Driver : Connection Option Descriptions : AttachDBFileName
 

Try DataDirect Drivers Now
AttachDBFileName

Attribute

AttachDBFileName

Purpose

The name of the primary file of an attachable database.

Valid Values

string
where:
string
is name of the primary file of an attachable database.
Include the full path and escape any slash ( \ ) characters if using a C character string variable:
AttachDBFileName=C:\\MyFolder\\MyDB.mdf
This database is attached and becomes the default database for the connection. To use AttachDBFileName, you must also specify the database name in either the SQLDriverConnnect DATABASE parameter or the SQL_COPT_CURRENT_CATALOG connection attribute. If the database was previously attached, Microsoft SQL Server will not reattach it; it will use the attached database as the default for the connection.

Default

None

GUI Tab

n/a