下面的代码哪里有错误???帮修改一下.(100分)

  • 主题发起人 主题发起人 wanxin
  • 开始时间 开始时间
W

wanxin

Unregistered / Unconfirmed
GUEST, unregistred user!
Procedure TreeViewDataInit;
var i,j:integer;MyRecPtr: PMyRec;
Begin
begin
with FBugNote,Fdata do
begin
TreeViewStationBlank.Items.BeginUpdate;
TreeViewStationBlank.Items.Clear;
MyRecPtr^.Id:=Fpassword.IdCorp_c;
TreeNodeLayer1:=TreeViewStationBlank.Items.AddObject(nil,Fpassword.WorkCorp.text,MyRecPtr);
QueryStation.Close;
QueryStation.SQL.Clear;
QueryStation.SQL.Add('Select * From Dm_Bds');
QueryStation.SQL.Add(Format('Where dwdm='+'''%s''',[Fpassword.IdCorp_c]));
QueryStation.Open;
QueryBlank.Close;
QueryBlank.SQL.Clear;
QueryBlank.SQL.Add('Select * From blank');
QueryBlank.SQL.Add(Format('Where idBlank Like'+'''%s''',['%'+Fpassword.IdCorp_c+'%']));
QueryBlank.Open;
for i:=0 to QueryStation.RecordCount-1 do
begin
MyRecPtr^.Id:=QueryStation.fieldbyname('bdsdm').asstring;
TreeNodeLayer2:=TreeViewStationBlank.Items.AddObject(TreeNodeLayer1,QueryStation.fieldbyname('bdsmc').asstring,MyRecPtr);
QueryBlank.First;
For j:=0 to QueryBlank.RecordCount-1 do
Begin
if Copy(QueryBlank.FieldByName('IdBlank').AsString,1,11)=Fpassword.IdCorp_c+QueryStation.FieldByName('Bdsdm').AsString then
Begin
MyRecPtr^.Id:=QueryBlank.fieldbyname('IdBlank').asstring;
TreeNodeLayer3:=TreeViewStationBlank.Items.AddObject(TreeNodeLayer2,QueryBlank.fieldbyname('BlankName').asstring,MyRecPtr);
End;
QueryBlank.Next;
End;
QueryStation.Next;
end;
TreeViewStationBlank.Items[0].Selected:=true;
TreeViewStationBlank.FullExpand;
TreeViewStationBlank.Items.EndUpdate;
StDataInit;//过程
BkDataInit;//过程
end;
end;
end;
 

QueryStation.SQL.Add('Select * From Dm_Bds');
QueryStation.SQL.Add(Format('Where dwdm='+'''%s''',[Fpassword.IdCorp_c]));
^插入空格
QueryBlank.SQL.Add('Select * From blank');
QueryBlank.SQL.Add(Format('Where idBlank Like'+'''%s''',['%'+Fpassword.IdCorp_c+'%']));
^插入空格
 
请你把错误消息贴出来,并指明在哪出错

至少不应该是语法错误


这样看好累的
 
后退
顶部