procedure TFrmSyst_Code_Hand.fromshow;
var
BID,WHID:integer;
RID:integer;
begin
Rid:=12;
BID:=12;
WHID:=1;
with dm_code.QrySystCode_Hand do
begin
close;
sql.Clear;
//sql.add('select * from syst_Code_hand where resid=%D and BillID='%s' and WareHouseID=%D',[Rid,BID,WHID]);
sql.Add(format('selcet * from syst_Code_hand where resid=%D and BillID=''%S'' and WareHouseID=%D ,[Rid,BID, WHID]));
Open;
Active:=true;
end;
while not dm_code.QrySystCode_Hand.Eof do
begin
LstBxCode_hand.Items.Add(dm_code.QrySystCode_Hand.fieldbyname('codeID').AsString);
dm_code.QrySystCode_Hand.Next;
end;end;
上米那的过程市我在onshow事件里用的。sql语句那错了。怎么办。马上结贴。
var
BID,WHID:integer;
RID:integer;
begin
Rid:=12;
BID:=12;
WHID:=1;
with dm_code.QrySystCode_Hand do
begin
close;
sql.Clear;
//sql.add('select * from syst_Code_hand where resid=%D and BillID='%s' and WareHouseID=%D',[Rid,BID,WHID]);
sql.Add(format('selcet * from syst_Code_hand where resid=%D and BillID=''%S'' and WareHouseID=%D ,[Rid,BID, WHID]));
Open;
Active:=true;
end;
while not dm_code.QrySystCode_Hand.Eof do
begin
LstBxCode_hand.Items.Add(dm_code.QrySystCode_Hand.fieldbyname('codeID').AsString);
dm_code.QrySystCode_Hand.Next;
end;end;
上米那的过程市我在onshow事件里用的。sql语句那错了。怎么办。马上结贴。
sql.Add(format('selcet * from syst_Code_hand where resid=%D and BillID=''%S'' and WareHouseID=%D',[Rid,BID, WHID]));不行的话,你再发消息
sql.Add(format('selcet * from syst_Code_hand where resid=%D and BillID=''%S'' and WareHouseID=%D ,[Rid,BID, WHID]));
这一句有点问题,
sql.Add(format('selcet * from syst_Code_hand where resid=%D and BillID=''%S'' and WareHouseID=%D',[Rid,BID, WHID]));
少了一个分号
sql.Add(format('selcet * from syst_Code_hand where resid=''%D'' and BillID=''%S'' and WareHouseID=''%D''' ,[Rid,BID, WHID]));