 | CSQLSRViAttachMDF Method |
Attaches an MDF SQL server file to a server.
Namespace:
Geosoft.Desktop.GXNet
Assembly:
geosoft.desktop.gxnet (in geosoft.desktop.gxnet.dll) Version: 2024.2.0.25
Syntaxpublic static int iAttachMDF(
string server,
string user,
string password,
string db,
string mdf_file_name,
string ldf_file_name
)
public static int iAttachMDF(
string server,
string user,
string password,
string db,
string mdf_file_name,
string ldf_file_name
)
Public Shared Function iAttachMDF (
server As String,
user As String,
password As String,
db As String,
mdf_file_name As String,
ldf_file_name As String
) As Integer
Public Shared Function iAttachMDF (
server As String,
user As String,
password As String,
db As String,
mdf_file_name As String,
ldf_file_name As String
) As Integer
public:
static int iAttachMDF(
String^ server,
String^ user,
String^ password,
String^ db,
String^ mdf_file_name,
String^ ldf_file_name
)
public:
static int iAttachMDF(
String^ server,
String^ user,
String^ password,
String^ db,
String^ mdf_file_name,
String^ ldf_file_name
)
static member iAttachMDF :
server : string *
user : string *
password : string *
db : string *
mdf_file_name : string *
ldf_file_name : string -> int
static member iAttachMDF :
server : string *
user : string *
password : string *
db : string *
mdf_file_name : string *
ldf_file_name : string -> int
Parameters
- server
- Type: SystemString
SQL server to use - user
- Type: SystemString
User name (if blank assume NT Integrated Security) - password
- Type: SystemString
Password - db
- Type: SystemString
DB name - mdf_file_name
- Type: SystemString
MDF name - ldf_file_name
- Type: SystemString
LDF name (if blank, tries single db attach)
Return Value
Type:
Int32
0 - OK
1 - DB Operation Canceled
Terminates on Error
Remarks
The file's path need to be visible as local files on the server.
Network drives and substitutes may not work.
See Also