菜问题,大家帮忙 马上给分

zykj_2000 2003-02-26 02:01:40
procedure TY_test.ApplyDates(CusVar: OleVariant);
var
Errcount:integer;
begin
Database1.StartTransaction;
try
if not VarIsNull(CusCar) then
begin
CusVar:=DataSetProvider1.ApplyUpdates(CusVar,0,ErrCount);
if ErrCount>0 then
SysUtils.Abort;
end;
Database1.Commit;
except
Database1.Rollback;
end;
end;
编译通不过,它竟然就不认识VarIsNull

[Error] Unit2.pas(50): Undeclared identifier: 'VarIsNull'
[Fatal Error] Project1.dpr(7): Could not compile used unit 'Unit2.pas'

怎么回事啊 ,
...全文
49 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
307 2003-02-26
  • 打赏
  • 举报
回复
把netwolfds(晓竹)和: skyclin() 的回答加在一起就行了!!!
有问题请发信息到我的E-mail:guangbowang@163.com
yutaocool 2003-02-26
  • 打赏
  • 举报
回复
这么快,我上面怎么多了一个!
在uses中加上Variants

能给分吗?
linyingxu2002 2003-02-26
  • 打赏
  • 举报
回复
这是在调试环境中:[Fatal Error] Project1.dpr(7): Could not compile used unit 'Unit2.pas',没有影响!
yutaocool 2003-02-26
  • 打赏
  • 举报
回复
我想说的,楼上的已经回答了!
linyingxu2002 2003-02-26
  • 打赏
  • 举报
回复
uses unit2
skyclin 2003-02-26
  • 打赏
  • 举报
回复
少了uses 中的 Variants
slley 2003-02-26
  • 打赏
  • 举报
回复
uses system
bluemeteor 2003-02-26
  • 打赏
  • 举报
回复
在文件头
uses 里面加上 Variants

嗯,给分吧
netwolfds 2003-02-26
  • 打赏
  • 举报
回复
uses system

5,391

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧