遇到一个奇怪的Undeclared identifier 错误,请各位指点一下(100分)

  • 主题发起人 主题发起人 blackgun
  • 开始时间 开始时间
B

blackgun

Unregistered / Unconfirmed
GUEST, unregistred user!
[Error] UntDynameSqlDemoServer.pas(52): Undeclared identifier: 'VarArrayCreate'<br><br>procedure TDynameSqlDemoServer.GetAllTables(var vTables: OleVariant);<br>var<br>&nbsp; tblList:TstringList;<br>&nbsp; iCount:Integer;<br>begin<br>&nbsp; try<br>&nbsp; &nbsp; tblList:=TstringList.Create;<br>&nbsp; &nbsp; ADOConSql.GetTableNames(tblList);<br>&nbsp; &nbsp; vTables := VarArrayCreate([0,tblList.Count -1],varVariant);<br>&nbsp; &nbsp; for iCount := 0 to tblList.Count -1 do<br>&nbsp; &nbsp; begin<br>&nbsp; &nbsp; &nbsp; vTables[iCount] := tblList.Strings[iCount];<br>&nbsp; &nbsp; end;<br>&nbsp; finally<br>&nbsp; &nbsp; tblList.Free;<br>&nbsp; end;<br>end;<br><br>这是李维分布式多层应用里面第2-27页的代码,今天用delphi7调试了一下。一直出现这个错误,请各位帮忙指正
 
VarArrayCreate是在Variants.pas中定义的<br>你没有引用Variants.pas吧
 
猪头呀猪头,这个都没注意到。谢谢了
 
后退
顶部