Click or drag to resize
CGUIiImportDatabaseSQL Method (CGXNETCore, String, String, String, String, Int32)
Create template to import an external database table, created using SQL.

Available since Oasis montaj version: 5.0
License: Available to anyone with an Oasis Montaj license.  
Limitations: May not be available if running outside of a Oasis Montaj or from a command line program.  

Namespace: Geosoft.Desktop.GXNetX
Assembly: geosoft.desktop.gxnetx (in geosoft.desktop.gxnetx.dll)
Notes
1. This is used to build an Oasis montaj group (line) from one or more database tables and fields, by selecting from one or more SQL selection queries. The list of queries is read from a text file with the following syntax: Query_Name_1 Query... Query... (continued) ... ... END_QUERY Query_Name_2 etc. 2. Each query has a title line, the query itself, then the "END_QUERY" line to finish. The title of a subsequent query is on the line after an "END_QUERY" line. 3. If the text file parameter is left blank (""), then selection queries in the database itself are listed. In addition to the pre-defined queries, there is a "User Defined" query which may be filled in by the user. 4. This function DOES NOT import the table itself, but creates an import template which may be used to import the data (see ImportDAO_DU). 5. If connection string is of type "FILENAME=..." the connection will attempt to resolve it as a file database. (see also ODBCFileConnect_GUI)
Syntax
public static int iImportDatabaseSQL(
	CGXNETCore gxNetShared,
	string name,
	string sql,
	string temp,
	ref string line,
	int size
)

Parameters

gxNetShared
Type: GeoEngine.Core.GXNetXCGXNETCore
A shared CGXNETCore
name
Type: SystemString
External database file name
sql
Type: SystemString
Text file with SQL queries to use, ("" - get from database)
temp
Type: SystemString
Import template to make
line
Type: SystemString
Name of table imported (returned)
size
Type: SystemInt32
Size of table string

Return Value

Type: Int32
0 - OK -1 - Cancel
See Also