我是菜鸟,刚接触DELPHI,我做了一个小窗体,但一运行时,就会出现错误提示,"发生未知错误",然后代码就指向了, if not IsCircular and这行,,这是怎么回事啊?我非常迷糊现在,不知道是哪里出了问题,请大家帮看看啊,
解决方案 »
- 发了内部工作推荐帖子马上就被和血了,散分押惊
- 用过SQLDirect的朋友请进!
- 使用主从表还是一个表
- 请教高手!!!我现在急!!!
- application 和clxapplication有什么区别呀!
- 请问哪个OLE DB Provider 支持FoxPro2.6及以上版本的DBF文件?
- 菜鸟提问,简单问题
- 初级问题,我改了编译参数以后不能断点了,可是不知道怎么改回去?救命
- 请问在Delphi中能象vb那样用MSComm控件从串口读取数据吗?
- 由哪位大侠作个在应用程序中内嵌浏览器的,给兄弟发一个例子!
- 能不能通过执行一段代码让控件就显示出hint?
- ***请问如何使进程中的窗体前置,谢谢!*******
if FLookupDisplayAssigned then
Result := FLookupDisplayText
else
begin
S := ListFieldName;
if S = '' then S := KeyFieldName;
if S <> '' then
begin
Pos := 1;
S := ExtractFieldName(S, Pos);
就停到下面这了,,,
if not IsCircular and
(VarEquals(ListSource.DataSet.FieldByName(KeyFieldName).Value, ALookupKeyValue) or
ListSource.DataSet.Locate(KeyFieldName, ALookupKeyValue, [])) then
FLookupDisplayText := ListSource.DataSet.FieldByName(S).DisplayText
else
FLookupDisplayText := '';
end;
FLookupDisplayAssigned := True;
end;
end还有,我的小窗体的名字叫MYDEL,可是一运行时却转到了dxDBEdit这个文件的代码上来了,上面的代码就是dxDBEdit中的,
是怎么回事啊,大家帮分析分析,
(VarEquals(ListSource.DataSet.FieldByName(KeyFieldName).Value, ALookupKeyValue) or
ListSource.DataSet.Locate(KeyFieldName, ALookupKeyValue, [])) then
FLookupDisplayText := ListSource.DataSet.FieldByName(S).DisplayText
else
FLookupDisplayText := '';
end;
================================================
把这句话拆开执行,包括条件里面的东西,用showmessage隔断,看看哪块报错。
(VarEquals(ListSource.DataSet.FieldByName(KeyFieldName).Value, ALookupKeyValue) or
ListSource.DataSet.Locate(KeyFieldName, ALookupKeyValue, [])) then
{and
(VarEquals(ListSource.DataSet.FieldByName(KeyFieldName).Value, ALookupKeyValue) or
ListSource.DataSet.Locate(KeyFieldName, ALookupKeyValue, [])) } then
看看这样行不行,如果行的话就是你另外两个条件有问题了!