All Cadcorp SIS API Methods

CreateOpenGisSqlOverlay Method

Description

Creates an overlay using an Open Geospatial Consortium (OGC) conformant database.

Syntax

Visual Basic
Public Function CreateOpenGisSqlOverlay( _
   ByVal pos As Integer, _
   ByVal connect As String, _
   ByVal ftable As String, _
   ByVal dtable As String _
) As Integer

Parameters

pos

The position in the overlays list at which to insert the overlay. If this argument specifies a position in the existing overlays then the new overlay will not replace the existing overlay at the given position, but will shuffle any other overlays down the list.

 
connect

The connect argument enables SIS to connect to the database containing the data to be mapped. The methods you can use to connect to a database are:

  • DAO (Microsoft Data Access Objects) Note: DAO is not available in 64-bit SIS.
  • ODBC (Open Database Connectivity)
  • Oracle (direct driver)
  • ADO (Microsoft ActiveX Data Objects)

Using DAO connect should be DAO, followed by a semi-colon, followed by the pathname of the database.

Using ODBC connect should be ODBC, followed by a semi-colon, followed by a combination of the following components:

DSN=DataSourceName
DATABASE=DatabasePathName
UID=UserName
PWD=Password
LOGINTIMEOUT=seconds

Components should be separated by semi-colons.

  • If the DSN exists a connection will be established. The UserName and Password components are only necessary if the database to which the DSN refers requires them. If they are not required, you can omit these components altogether, or provide an empty string.
  • If the DSN does not exist you can create one "on-the-fly" by providing full connection details:
  • ODBC;DSN=Anything;DATABASE=C:\test.mdb;UID=MyName;PWD=topsecret
  • If insufficient information is provided then the standard Windows ODBC dialog will be displayed for you to enter the required information.
  • Using Oracleconnect should be Oracle, and the following components:
    Server=HostString
    User=UserName
    Password=Password

Components should be separated by semi-colons.

Using ADOconnect should be ADO, followed by a semi-colon, followed by the ADO Connection string.

TIP: For details on creating ADO connection strings refer to your programming language's documentation.

 
ftable
The OGC feature table. Note This is not the same as a SIS Feature Table.
 
dtable
The OGC geometry table.

Remarks

Available: GEO D OM OD SISpy

Groups:

Example

sis.CreateOpenGisSqlOverlay 2(connect, "Resources", "Geometry")