 | CGUIIiODBCFileConnect Method (CGXNETCore, String, String, Int32, String) |
Get the connection string for a file database as well as optional table name and FileUsage attribute
Namespace:
Geosoft.Desktop.GXNetX
Assembly:
geosoft.desktop.gxnetx (in geosoft.desktop.gxnetx.dll) Version: 2025.1.0.25
Syntaxpublic static int IiODBCFileConnect(
CGXNETCore gxNetShared,
string file,
ref string connect,
int usage,
ref string table
)
public static int IiODBCFileConnect(
CGXNETCore gxNetShared,
string file,
ref string connect,
int usage,
ref string table
)
Public Shared Function IiODBCFileConnect (
gxNetShared As CGXNETCore,
file As String,
ByRef connect As String,
usage As Integer,
ByRef table As String
) As Integer
Public Shared Function IiODBCFileConnect (
gxNetShared As CGXNETCore,
file As String,
ByRef connect As String,
usage As Integer,
ByRef table As String
) As Integer
public:
static int IiODBCFileConnect(
CGXNETCore^ gxNetShared,
String^ file,
String^% connect,
int usage,
String^% table
)
public:
static int IiODBCFileConnect(
CGXNETCore^ gxNetShared,
String^ file,
String^% connect,
int usage,
String^% table
)
static member IiODBCFileConnect :
gxNetShared : CGXNETCore *
file : string *
connect : string byref *
usage : int *
table : string byref -> int
static member IiODBCFileConnect :
gxNetShared : CGXNETCore *
file : string *
connect : string byref *
usage : int *
table : string byref -> int
Parameters
- gxNetShared
- Type: GeoEngine.Core.GXNetXCGXNETCore
A shared CGXNETCore - file
- Type: SystemString
File Name - connect
- Type: SystemString
Connection string (returned) - usage
- Type: SystemInt32
File Usage (0 - ODBC drivers not queried, 1 - Directory containing tables, 2 - File containing tables) - table
- Type: SystemString
Table name of file (returned if plUsage==1)
Return Value
Type:
Int32
0 - OK
-1 - Cancel
terminates on error
Remarks
If the file extension is "mdb" or "xls" then a Microsoft Access
or Excel database is assumed. Otherwise, a dialog appears listing
the installed ODBC file database drivers. If the driver takes a
directory as a database (FileUsage==1) the table name is also
returned. This is needed because the table name may or may not include
the file extension.
See Also