 | CGUIIiODBCFileConnect Method (String, String, Int32, Int32, String, Int32) |
Get the connection string for a file database as well as optional table name and FileUsage attribute
Namespace:
Geosoft.Desktop.GXNet
Assembly:
geosoft.desktop.gxnet (in geosoft.desktop.gxnet.dll) Version: 2024.2.0.25
Syntaxpublic static int IiODBCFileConnect(
string file,
ref string connect,
int c_size,
int usage,
ref string table,
int t_size
)
public static int IiODBCFileConnect(
string file,
ref string connect,
int c_size,
int usage,
ref string table,
int t_size
)
Public Shared Function IiODBCFileConnect (
file As String,
ByRef connect As String,
c_size As Integer,
usage As Integer,
ByRef table As String,
t_size As Integer
) As Integer
Public Shared Function IiODBCFileConnect (
file As String,
ByRef connect As String,
c_size As Integer,
usage As Integer,
ByRef table As String,
t_size As Integer
) As Integer
public:
static int IiODBCFileConnect(
String^ file,
String^% connect,
int c_size,
int usage,
String^% table,
int t_size
)
public:
static int IiODBCFileConnect(
String^ file,
String^% connect,
int c_size,
int usage,
String^% table,
int t_size
)
static member IiODBCFileConnect :
file : string *
connect : string byref *
c_size : int *
usage : int *
table : string byref *
t_size : int -> int
static member IiODBCFileConnect :
file : string *
connect : string byref *
c_size : int *
usage : int *
table : string byref *
t_size : int -> int
Parameters
- file
- Type: SystemString
File Name - connect
- Type: SystemString
Connection string (returned) - c_size
- Type: SystemInt32
Size of connection string - 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) - t_size
- Type: SystemInt32
Size of table name
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