在看李维的"Delphi 5.X 分布式多层应用系统篇"
开始的一个例子里的一段程序.
procedure TDynamicSQLDemo.GetAllTables(var vTables: OleVariant);
var
tblList:TStringList;
iCount:Integer;
begin
try
tblList:=TstringList.Create;
adocSQL.GetTableNames(tblList);
vTables := VarArrayCreate([0,tblList.Count - 1],varVariant);
for iCount:=0 to tblList.Count - 1 do
begin
vTables[iCount]:=tblList.Strings[iCount];
end;
finally
tblList.free;
end;
end;编译出现这样的错误:
[Error] urdmDynamicSQLServer.pas(52): Undeclared identifier: 'VarArrayCreate'这个问题是不是说我还要写"VarArrayCreate"这个函数的啊,原本是不存在的啊!
开始的一个例子里的一段程序.
procedure TDynamicSQLDemo.GetAllTables(var vTables: OleVariant);
var
tblList:TStringList;
iCount:Integer;
begin
try
tblList:=TstringList.Create;
adocSQL.GetTableNames(tblList);
vTables := VarArrayCreate([0,tblList.Count - 1],varVariant);
for iCount:=0 to tblList.Count - 1 do
begin
vTables[iCount]:=tblList.Strings[iCount];
end;
finally
tblList.free;
end;
end;编译出现这样的错误:
[Error] urdmDynamicSQLServer.pas(52): Undeclared identifier: 'VarArrayCreate'这个问题是不是说我还要写"VarArrayCreate"这个函数的啊,原本是不存在的啊!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货