![](../icons/Help.png) | 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.GXNetXAssembly: 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.
Syntaxpublic static int iAttachMDF(
CGXNETCore gxNetShared,
string server,
string user,
string password,
string db,
string mdf_file_name,
string ldf_file_name
)
Public Shared Function iAttachMDF (
gxNetShared As CGXNETCore,
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(
CGXNETCore^ gxNetShared,
String^ server,
String^ user,
String^ password,
String^ db,
String^ mdf_file_name,
String^ ldf_file_name
)
static member iAttachMDF :
gxNetShared : CGXNETCore *
server : string *
user : string *
password : string *
db : string *
mdf_file_name : string *
ldf_file_name : string -> int
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