大侠好!
为何这段语句:
if query1.fields[0].value<>null.....
在delphi7中编译有误,而在delphi5中可以编译成功呢?
delphi7提示错误为:Undeclared identifier: 'null'
还请高手指点阿!
谢谢!
为何这段语句:
if query1.fields[0].value<>null.....
在delphi7中编译有误,而在delphi5中可以编译成功呢?
delphi7提示错误为:Undeclared identifier: 'null'
还请高手指点阿!
谢谢!
解决方案 »
- (delphi)access数据库不用adoquery能不能实现 单价*数量=金额?
- 这样的图表怎么做,用TEECHART,谢谢!100分...
- 两个datetimepicker中,如何算出相差的天数??
- delphi更新ACCESS数据表出错!!(在线等待)
- 请教高手小问题?谢啦!
- 谁能告诉我这是个什么错误? Excepted '=' but '(' found.
- 把手写笔当作普通鼠标使用,发现当作鼠标效果写出来的效果跟手写笔的效果相差,很远,有解决方法吗?(详细内容请进)
- Timer能否用来测量时间?
- 请问高手,冰盾的端口扫描是怎么原理?用delphi能实现吗?
- 如何生成字体有边框的效果?
- 急急急!!!关于DELPHI+ADO+SQL2000
- 请问这句话什么意思?来者有分!
...
query1.fields[0].isnotnull....?
...
只有Fields[0].IsNull,没有IsNotNull, 如果你要使用NULL,请先
Use "Variants"这个单元.
但是delphi的NIL和c的NULL有区别
c的NULL表示NULL表示0表示""
但是delphi的NIL就是NIL,不能表示0不能表示''
你应该用query1.fields[0].IsNull NIL不能用=符号比较但是可以:=负值void __fastcall func () {
TButton * MyButton;
MyButton = new TButton(NULL);
...
delete MyButton;
}换成delphi就是procedure func ();
var
MyButton: TButton;
begin
MyButton := TButton.Create(NIL);
...
MyButton.Free;
MyButton := NIL; //彻底释放
end;
除非
type
NULL = NIL;