Click or drag to resize
CSQLSRViAttachMDF Method
Attaches an MDF SQL server file to a server.

Available since Oasis montaj version: 5.1.8
License: Available to anyone with an Oasis Montaj license.  

Namespace: Geosoft.Desktop.GXNetX
Assembly: geosoft.desktop.gxnetx (in geosoft.desktop.gxnetx.dll)
Notes
The file's path need to be visible as local files on the server. Network drives and substitutes may not work.
Syntax
public static int iAttachMDF(
	CGXNETCore gxNetShared,
	string server,
	string user,
	string password,
	string db,
	string mdf_file_name,
	string ldf_file_name
)

Parameters

gxNetShared
Type: GeoEngine.Core.GXNetXCGXNETCore
A shared CGXNETCore
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
See Also