Cadcorp SIS API Methods
CreateDbOverlay Method
Description
Creates an overlay which stores editable Blobs in a database.
Syntax
Visual Basic |
Public Function CreateDbOverlay( _
ByVal As Integer, _
ByVal As Integer, _
ByVal As Integer, _
ByVal As String, _
ByVal As String, _
ByVal As String, _
ByVal As Integer, _
ByVal As Double _
) 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.
-
- dialect
- The dialect to use. This argument is currently ignored, but may be used in future.
-
- bTransact
-
True
|
Use short transactions for updating linked Items (e.g. topology).
|
False
|
Do not use transactions.
|
-
- 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 the connect should be DAO, followed by a semi-colon, followed by the pathname of the database.
Using ODBC the 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 user name 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 the user to enter the required information.
Using Oracle the connect should be Oracle, and the following components:
Server=HostString
User=UserName
Password=Password
Components should be separated by semi-colons.
Using ADO the connect should be ADO, followed by a semi-colon, followed by the ADO Connection string.
For details on creating ADO connection strings refer to your programming language's documentation.
- tableItem
- The name of the table containing Item information, i.e. Blob, spatial reference, etc. Many different tables may be used for different datasets within a single database.
-
- prj
- The named coordinate reference system of the stored Item Blobs.
-
- fmt
-
The format of the Item Blob.
SIS_BLOB_SIS_V6_ASCII
|
0 = Cadcorp SIS format |
SIS_BLOB_OGIS_WKT
|
2 = OGC Well-Known-Text format |
SIS_BLOB_OGIS_GML
|
3 = OGC Geographic Markup Language |
SIS_BLOB_GEOJSON
|
6 = Geographic Objects for JSON format |
-
- span
- The span used in the spatial reference (see GetSpatialReference).
Remarks
Available: GEO MD MM ME OD OM SISpy
Groups:
Example
sis.CreateDbOverlay(1, 0, True, "", "BlobTable", "*APrjNatGrid", _SIS_BLOB_SIS, 2000000)
Creates a DbOverlay at position 1 in the current list of overlays, which uses short transactions and prompts for connection strings, storing items in a table called BlobTable using "*APrjNatGrid coordinate reference system in a 2 000 000m span.
Send comments on this topic.
Click to return to www.cadcorp.com
© Copyright 2000-2017 Computer Aided Development Corporation Limited (Cadcorp).