CreateDbOverlay Method
Description
Creates an overlay which stores editable Blobs in a database.
Syntax
Visual Basic |
---|
Public Function CreateDbOverlay( _ ByVal pos As Integer, _ ByVal dialect As Integer, _ ByVal bTransact As Integer, _ ByVal connect As String, _ ByVal tableItem As String, _ ByVal prj As String, _ ByVal fmt As Integer, _ ByVal span As Double _ ) As Integer |
Parameters
True
|
Use short transactions for updating linked Items (e.g. topology). |
False
|
Do not use transactions. |
- 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
TIP: 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.
- OGC URNs (eg 'urn:ogc:def:crs:OGC:1.3:CRS84')
- EPSG URNs (eg 'urn:ogc:def:crs:EPSG::27700')
- EPSG code strings (eg 'EPSG:27700')
- EPSG URLs (eg 'http://www.example.com/epsg#27700' or 'http://www.example.com/epsg.xml#27700')
- EPSG codes as a simple string (eg '27700')
The format of the Item Blob.
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 |
Remarks
Available: GEO D 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.