Search for: KB10783 - Connecting to an ESRI ArcSDE or ArcSDE Raster database layer and supported features. TatukGIS Developer Kernel Enterprise version and desktop GIS Editor products support the ESRI ArcSDE SQL spatial database vector data structure and features and ArcSDE Raster layers. The support bypasses ArcSDE services and is independent of any ESRI middleware. Support is for the following ArcSDE product versions: ArcSDE for MS SQL Server (ArcGIS 9.1 and later versions). ArcSDE Personal for MS SQL Express Edition (ArcGIS 9.2). ArcSDE Workgroup for MS SQL Express Edition (ArcGIS 9.2). ArcSDE Enterprise for MS SQL Standard, Workgroup, Enterprise Edition (ArcGIS 9.2). ArcSDE for Oracle (ArcGIS 9.1 and later versions). ArcSDE support includes: Direct ArcSDE SQL layer direct access for map display. Utilization of ArcSDE spatial indexes for fast spatial queries. Editing of attribute values and structure. Geometric object deletion. ArcSDE layer running on MSSQL Server, Oracle, or other server database compatible with the ArcSDE standard. Some examples of connecting to ArcSDE layer are presented below. A more complete and detailed description of TatukGIS support for ESRI ArcSDE layer class and data structures is found in the Developer Kernel documentation web site at: http://docs.tatukgis.com/DK11 Connecting to an ArcSDE layer: A TatukGIS product can be connected to an ArcSDE layer by opening a *.ttkls file with the name: name_of_layer.ttkls. A *.ttkls file is a TatukGIS stub file that contains the connection settings to a SQL vector database map layer. The *.ttkls file for a SQL vector layer can be constructed i) manually using any text editor (such as Note Pad) or ii) using the SQL connection Wizard feature in the TatukGIS Editor product (refer to the help topic for menu item: Layer/Add SQL Layer). The connection to a ArcSDE layer can also be established without the use of a *.ttkls file by i) embedding all the *.ttkls file parameters into the Path property as a CRLF or '\n' sting (as a new line) or ii) assigning the *.ttkls file parameters to the SQLParameters property using SQLParameters[‘KEY’] = VALUE. The structure of a *.ttkls file for an ArcSDE layer must be: [TatukGIS Layer] Storage=SdeBinary|SdeOgcWkb Layer=name|name;schema|name;schema;catalog Features=table/view name; if provided will replace standard features table Dialect=MSSQL|ORACLE|INTERBASE ReadOnly=True|False ADO=ADO connection string; if not exist, then DBX connection will be used LoginPrompt=1|0 Synonyms=override standard ArcSDE synonyms for Oracle and MS SQL Server DriverName=see DBExpress help for TSQL Connection GetDriverFunc=see DBExpress help for TSQL Connection VendorLib=see DBExpress help for TSQL Connection LibraryName=see DBExpress help for TSQL Connection ... Parameters key=value ... The layer key is formatted based on the OpenGIS standard. The ArcSDE equivalent based on a database table structure (SDE_Layers) can look like: Layer=table_name| table_name;owner| table_name;owner;database_name EXAMPLE 1 ArcSDE running on MSSQL server [TatukGIS Layer] Storage=SdeBinary LAYER=AIRPORTS;SDE;TRAFFIC_STUDY DIALECT=MSSQL ADO=Provider=SQLOLEDB.1;Password=XXX;Persist Security Info=True;User ID=sa; Initial Catalog=traffic_study;Data Source=TEST-DB\SQLEXPRESS ;If you use ArcSDE for MS SQL Server, comment out the following line Synonyms=SDE.SDE_LAYERS=LAYERS;SDE.SDE_SPATIAL_REFERENCES=SPATIAL_REFERENCES; SDE.SDE_GEOMETRY_COLUMNS=GEOMETRY_COLUMNS EXAMPLE 2 ArcSDE running on Oracle database using ActiveX VB application Environment: TatukGIS DK : ActiveX Edition Oracle : 8.1.7 ArcSde for Oracle8i (9.1) Program Language : VB.NET Oracle account : geouser / geouser Oracle Service : demoserver ArcSDE vector layer name : GEOUSER.EMD (User Name.Layer Name) My ttkls file [TatukGIS Layer] Storage=SdeBinary LAYER=EMD;GEOUSER DIALECT=ORACLE ADO=Provider=MSDAORA.1;Password=GEOUSER;User ID=GEOUSER;Data Source=demoserver;Persist Security Info=True Synonyms=SDE.SDE_LAYERS=SDE.LAYERS; SDE.SDE_SPATIAL_REFERENCES=SDE.SPATIAL_REFERENCES; SDE.SDE_GEOMETRY_COLUMNS=SDE.GEOMETRY_COLUMNS Check the following points when creating the TTKLS file: Verify that the Provider (driver) is correctly installed and works with binary data (blobs) Verity the database connect string. Verify that the layer name configuration is valid with the schema name|name;schema|name;schema;catalog. In this example LAYER=EMD;GEOUSER Check carefully the synonyms. Check if synonym table exists in SDE schema. Do not forget to add your license key to the application in the initialization part using GISKeyList object. In this example: utils.GisKeyList.Add("SDO", "PASS", "Your License") Sample application code to add ArcSDE layer to DK viewer: // License check Dim utils As New XGIS_Utils utils.GisKeyList.Add("SDO", "PASS", "Your License") Dim pLocation As New clsOpenFileDialog(DiagFOpen.FileName, False) Dim ll As TatukGIS_DK.XGIS_LayerSqlSdeAdo ll = New TatukGIS_DK.XGIS_LayerSqlSdeAdo ll.Path = DiagFOpen.FileName ll.Name = pLocation.FileName ll.UseConfig = False ll.Params.Line.OutlineWidth = 0 ll.Params.Line.Width = 3 ll.Params.Line.Color = RGB(0, 0, 255) ll.UseRTree = True ll.CodePage = 949 ll.OutCodePage = 949 ll.Transparency = 60 Try GIS.Add(ll) Catch ex As Exception MsgBox("Error", MsgBoxStyle.Information, "ERR") Exit Sub End Try GIS.CtlUpdate() Opening a SDE Raster layer The TatukGIS DK (Enterprise 9.0 and later versions of the VCL, ActiveX, and .NET editions), TatukGIS Internet Server (9.0 and later versions), and TatukGIS Editor (2.0 and later versions) products support reading (opening and display) the ESRI ArcSDE Raster layer format. Connection f the TatukGIS product to the ArcSDE Raster layer is performed by opening a *.ttkps stub file with the file name_of_layer.ttkps. As noted above, the *ttkps file can be created using any text editor (such as Note Pad.) The structure of this file must be: [TatukGIS Layer] Dialect=MSSQL Storage=SdeRaster Layer=name|name;schema|name;schema;catalog ADO=ADO connection string if not exist then DBX connection will be used LoginPrompt=1|0 DriverName=see DBExpress help for TSQL Connection GetDriverFunc=see DBExpress help for TSQL Connection VendorLib=see DBExpress help for TSQL Connection LibraryName=see DBExpress help for TSQL Connection ... Parameters key=value ... Sample .ttkls file: [TatukGIS Layer] Storage=SdeRaster Dialect=MSSQL Layer=ZDJ6;DBO;PERSONAL ADO="" Created: January 15, 2008, Modified: February 10, 2017