Click or drag to resize

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
Syntax
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
)

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