J
jiordano
Unregistered / Unconfirmed
GUEST, unregistred user!
我的地图已经配准了,怎么把excel表中的经纬度绑定到地图中,我编写了一个程序,但是编译通不过,提示 :variantdo
es not reference an automation object.程序如下
procedure TForm1.Button5Click(Sender: TObject);
var
par:variant;
ds:cmapxdataset;
flds:cmapxfields;
begin
par:=createoleobject('mapx.odbcqueryinfo.4');
par.sqlquery:='select [sheet1$].longitude from [sheet1$]';
//par.datasource:=maindm.CS.aliasname;(此处datasource该如何定义???)
flds:=cofields.create;
flds.Add('longtitude','longitude',miaggregationindividual,mitypefloat);
flds.Add('latitude','latitude',miaggregationindividual,mitypefloat);
ds:=map1.Datasets.Add(midatasetodbc,midatasetodbc,par,'longitude',emptyparam,'building',flds,false);
end;
另,象我这样的例子,该如何绑定数据??
es not reference an automation object.程序如下
procedure TForm1.Button5Click(Sender: TObject);
var
par:variant;
ds:cmapxdataset;
flds:cmapxfields;
begin
par:=createoleobject('mapx.odbcqueryinfo.4');
par.sqlquery:='select [sheet1$].longitude from [sheet1$]';
//par.datasource:=maindm.CS.aliasname;(此处datasource该如何定义???)
flds:=cofields.create;
flds.Add('longtitude','longitude',miaggregationindividual,mitypefloat);
flds.Add('latitude','latitude',miaggregationindividual,mitypefloat);
ds:=map1.Datasets.Add(midatasetodbc,midatasetodbc,par,'longitude',emptyparam,'building',flds,false);
end;
另,象我这样的例子,该如何绑定数据??