KB10418 - Using DK.ActiveX with VB.NET, how to open multiple ADO layers and build a new ADO layer.
- The proper way using the ttkls file:
ll = New XGIS_LayerSQL_ADO
ll.Path = 'lwaters.ttkls'
GIS.Add( ll )
ll = New XGIS_LayerSQL_ADO
ll.Path = 'lwaters2.ttkls'
GIS.Add( ll )
ll = New XGIS_LayerSQL_ADO
ll.Path = 'lwaters3.ttkls'
GIS.Add( ll )
- The proper way using SQLParams:
llSQL = New TatukGIS_DK.XGIS_LayerSQL_ADO()
llSQL.SQLParameter("LAYER") = "lwaters"
llSQL.SQLParameter("DIALECT") = "MSJET"
llSQL.SQLParameter("ADO")= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=gistest.mdb"
GIS.Add(llSQL)
(The above is valid only with the DK v. 8 and later versions.)
- The proper way to build a new ADO layer:
a)
llNew = New TatukGIS_DK.XGIS_LayerSQL_ADO()
llNew.Build("lwaters.ttkls", some_extent, TatukGIS_DK.XGIS_ShapeType.XgisShapeTypeArc)
If you know the desired extent, use the following:
Utils = New XGIS_Utils
some_extent = Utils.GisNoWorld ;
b) (Valid in the DK 8)
lSQL = New TatukGIS_DK.XGIS_LayerSQL_ADO()
llSQL.SQLParameter("LAYER") = "lwaters"
llSQL.SQLParameter("DIALECT") = "MSJET"
llSQL.SQLParameter("ADO") = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=gistest.mdb"
llSQL.Build( "", some_extent, TatukGIS_DK.XGIS_ShapeType.XgisShapeTypeArc)
Created: November 21, 2003, Modified: July 27, 2015