我刚学delphi 不久,所以一些问题可能很幼稚,
我调试程序时,经常遇到这样一个问题:
[Fatal Error] Could not create output file ‘D:\me\Delphi7\资料管理\Project1.exe'
也不知道是哪里出了问题,用断点调试时,总在application.run;处停下
然后给出:“不能从null到string的转换”。
请给小妹指点一下。先谢了
我调试程序时,经常遇到这样一个问题:
[Fatal Error] Could not create output file ‘D:\me\Delphi7\资料管理\Project1.exe'
也不知道是哪里出了问题,用断点调试时,总在application.run;处停下
然后给出:“不能从null到string的转换”。
请给小妹指点一下。先谢了
一般是因为Project1.exe已经在运行了(不是在你得调试环境下,直接运行得.exe文件),关了它就可以在delphi调试环境下运行了。
1. STING的空是'',不要用NULL
2.把你的程序RESET一下
还有,我用access 2000 做的数据库,在代码里,也没有用类型转换的函数啊
project1.exe raised exception class EAccessViolation with message 'Access violation at address 00456702 in module'RROJECT1.EXE'.Read of address FFFFFFFF'.process stopped. Use step or run to contine.
str=NULL;
应该是
str='';
project project1.exe raised exception class EVariantTypeCastError with message
'could not convert variant of type (null) into type (string)'.process stopped .
use step or run to continue.
然后我按F7继续调试,可以运行了。也不耽误结果的输出,
请问这是怎么回事啊?
var
s:string;
begin
s:='';
str:=vartostr(s);//自己转换一下.
.....end;