J
jiordano
Unregistered / Unconfirmed
GUEST, unregistred user!
下列程序编译无法通过,提示未定义bindlayerobject,程序如下:
par:=createoleobject('mapx.odbcqueryinfo.4');
par.SqlQuery := 'select * from [sheet1$]';
par.DataSource := 'CS';
par.ConnectString := 'ODBC;';
BindLayerObject:= CoBindLayer.Create;
BindLayerObject.LayerName := 'mytab';
BindLayerObject.FileSpec := 'e:/incoming/project/map/map/mytab.tab'
BindLayerObject.refcolumn1:='longitude';
//excel中的坐标
BindLayerObject.RefColumn2 := 'latitude';
//
BindLayerObject.LayerType := miBindLayerTypeXY;
MyDataset := Map1.Datasets.Add(miDatasetODBC, odbcInfo, 'my', 'longitude', 'latitude', BindLayerObject, EmptyParam, false);
出错在何处??
par:=createoleobject('mapx.odbcqueryinfo.4');
par.SqlQuery := 'select * from [sheet1$]';
par.DataSource := 'CS';
par.ConnectString := 'ODBC;';
BindLayerObject:= CoBindLayer.Create;
BindLayerObject.LayerName := 'mytab';
BindLayerObject.FileSpec := 'e:/incoming/project/map/map/mytab.tab'
BindLayerObject.refcolumn1:='longitude';
//excel中的坐标
BindLayerObject.RefColumn2 := 'latitude';
//
BindLayerObject.LayerType := miBindLayerTypeXY;
MyDataset := Map1.Datasets.Add(miDatasetODBC, odbcInfo, 'my', 'longitude', 'latitude', BindLayerObject, EmptyParam, false);
出错在何处??