J
jcc0728
Unregistered / Unconfirmed
GUEST, unregistred user!
TVarData(unusedParam).vType := varError;
// TVarData(unusedParam).vError := DISP_E_PARAMNOTFOUND;
{Create the QueryInfo object and then
set its properties}
param := CreateOleObject('MapX.ODBCQueryInfo.4');
param.SqlQuery := 'select * from USA';
param.DataSource := 'MapStatsV4';
param.ConnectString := 'ODBC;';
fields := CoFields.Create;
fields.Add('GEOABBR','GEOABBR', miAggregationAuto,miTypeString);
fields.Add('GEONAME','GEONAME', miAggregationAuto,miTypeString);
fields.Add('TOTPOP','TOTPOP', miAggregationAuto,miTypeNumeric);
{Add a dataset passing in the QueryInfo object}
ds := Map1.Datasets.Add(miDataSetODBC, param, unusedParam, unusedParam, unusedParam, 'USA', fields, unusedParam);//执行到此句时报错!!!!为何
没分了,请包含!!!!
// TVarData(unusedParam).vError := DISP_E_PARAMNOTFOUND;
{Create the QueryInfo object and then
set its properties}
param := CreateOleObject('MapX.ODBCQueryInfo.4');
param.SqlQuery := 'select * from USA';
param.DataSource := 'MapStatsV4';
param.ConnectString := 'ODBC;';
fields := CoFields.Create;
fields.Add('GEOABBR','GEOABBR', miAggregationAuto,miTypeString);
fields.Add('GEONAME','GEONAME', miAggregationAuto,miTypeString);
fields.Add('TOTPOP','TOTPOP', miAggregationAuto,miTypeNumeric);
{Add a dataset passing in the QueryInfo object}
ds := Map1.Datasets.Add(miDataSetODBC, param, unusedParam, unusedParam, unusedParam, 'USA', fields, unusedParam);//执行到此句时报错!!!!为何
没分了,请包含!!!!