procedure TCartThread.GetOneUnitInList;
var
IniNum,i:integer;
StackerNum:String;
begin
with MainFrame.ADOQuery3 do
begin
Close;
SQL.Clear;
SQL.Add(Pchar('select top 1 * from 入库给监控机表 where 发送标记=0 and 巷道车号>4 and 小车标志=1'));
for i := 5 to 9 do
if bplcinuse[i]=False then
SQL.Add(Pchar(' and 巷道车号<>'+inttostr(i)));
Open;
end;
if MainFrame.ADOQuery3.RecordCount=0 then exit;
MainFrame.ADOQuery3.First; //取得第一条当前工作的巷道车号的货单
StackerNum := MainFrame.ADOQuery3.FieldValues['巷道车号'];
IniNum := StrtoInt(StackerNum); if IniNum=9 then //旋转货架的货单,要将现有旋转货架的货单的处理标志都置位
begin
with MainFrame.ADOQuery3 do
begin
Close;
SQL.Clear;
SQL.Add('select * from 入库给监控机表 where 巷道车号=9 and 发送标记=0 and 小车标志=1');
Open;
First;
repeat
Edit; //置位处理标志
FieldValues['发送标记'] := True;
Post;
Next;
until Eof;
end;
end;
if IniNum<>9 then //其他下位机的货单,只将当前条的处理标志置位
begin
MainFrame.ADOQuery3.Edit; //置位处理标志
MainFrame.ADOQuery3.FieldValues['发送标记'] := True;
MainFrame.ADOQuery3.Post;
end;
end;
先用一个ADOCONNECTION连接服务器,然后将ADOQUERY3挂在上面,用来查询.
var
IniNum,i:integer;
StackerNum:String;
begin
with MainFrame.ADOQuery3 do
begin
Close;
SQL.Clear;
SQL.Add(Pchar('select top 1 * from 入库给监控机表 where 发送标记=0 and 巷道车号>4 and 小车标志=1'));
for i := 5 to 9 do
if bplcinuse[i]=False then
SQL.Add(Pchar(' and 巷道车号<>'+inttostr(i)));
Open;
end;
if MainFrame.ADOQuery3.RecordCount=0 then exit;
MainFrame.ADOQuery3.First; //取得第一条当前工作的巷道车号的货单
StackerNum := MainFrame.ADOQuery3.FieldValues['巷道车号'];
IniNum := StrtoInt(StackerNum); if IniNum=9 then //旋转货架的货单,要将现有旋转货架的货单的处理标志都置位
begin
with MainFrame.ADOQuery3 do
begin
Close;
SQL.Clear;
SQL.Add('select * from 入库给监控机表 where 巷道车号=9 and 发送标记=0 and 小车标志=1');
Open;
First;
repeat
Edit; //置位处理标志
FieldValues['发送标记'] := True;
Post;
Next;
until Eof;
end;
end;
if IniNum<>9 then //其他下位机的货单,只将当前条的处理标志置位
begin
MainFrame.ADOQuery3.Edit; //置位处理标志
MainFrame.ADOQuery3.FieldValues['发送标记'] := True;
MainFrame.ADOQuery3.Post;
end;
end;
先用一个ADOCONNECTION连接服务器,然后将ADOQUERY3挂在上面,用来查询.
解决方案 »
- 请问这样的按钮效果要怎么实现呢?
- 请问如何判断TCPExecute里面传来的是HTTP命令,TCP监听:17700端口,比如地址栏访问127.0.0.1:17700,那么在TCPExecute里面如何判断是HTTP的访问呢?
- 压缩数据库中的jpg图片 急
- 求救 VCLUnZip 解压问题~
- 如何以TListView中的内容作报表
- 又有问题
- 用什么样的方法解决这个问题com?Dcom?!!!
- 如何判断两个日期之间的天数
- 想征求大家学什么好?
- 我想注册一个ocx文件,但注册成功后,在工具条上看不到它的图标?
- 关于时间的问题
- 当显示的查询项目很多的时候,dbgrid怎么只能自动生成垂直滚动条,而没有水平滚动条呢?
MainFrame.ADOQuery3.Fieldbyname['发送标记'].asboolean := True好?我看帮助上说是MainFrame.ADOQuery3.FieldValues['发送标记'] := True好点.