如题,大家帮忙啊。
流水号用作该记录的唯一标识。
流水号用作该记录的唯一标识。
解决方案 »
- 关于DELPHI 串口接收数据包问题
- 请教已知RGB数值快速获得指定调色板中与之最接近的颜色的索引值
- 无聊 散点小分
- 请教有关异常处理的问题!
- crystal水晶报表几个个非常棘手的问题,请帮个忙!感激不尽!!
- 寻求 科学计算 方面的包
- 如何打开最大化打开两MDIChild窗口?
- 请教高手关于sql语句的问题.请进...
- dspack制作的简单视频播放功能中的stop的问题
- BitBtn的Glyph所用的位图是好几个图像合并起来的,使用起来很麻烦,而且不知道怎样设计,因为普通的ICON、BMP等在Enabled为True时能显示,但在False时就不能了,不像微软的产品这样,只要一个就搞定了,能告诉我如何处理,谢谢?
- delphi中两个web service之间可以直接进行HTTP通讯吗?如何进行通讯?
- 请高手们进来看一吧,Dcom 客户端的编写
B0101字段的值为‘2003-03-21001’var str : string; //用以存储生成的流水号;
ado: tadoquery;
begin
ado := tadoquery.create(self);
try
ado.connection := adoconnection1;
ado.sql.text := 'select max(B0101) from B01 group by B01';
ado.open;
if strtodate(leftstr(ado.fieldbyname('B0101').asstring,10)) <> date() then
begin
str := datetostr(date()) + '001';
end
else begin
str := rightstr(ado.fieldbyname('B0101').asstring,3);
str := inttostr(strtoint(str) + 1);
str := datetostr(date()) + str;
end;
finally ado.free;
end;
end;
//取得服务器的日期
qry_cx.Close;
qry_cx.SQL.Clear;
qry_cx.SQL.Add('SELECT DISTINCT CURRENT_DATE FROM table1');
qry_cx.Open;
//显示出库单号
qry_xxcx.Close;
qry_xxcx.SQL.Clear;
qry_xxcx.SQL.Add('SELECT MAX(AUTO_CODE) FROM table2 ');
qry_xxcx.SQL.Add('WHERE SUBSTR(AUTO_CODE,1,6)=:Aauto_Code');
qry_xxcx.ParamByName('Aauto_Code').AsString:=
formatdatetime('YYYYMM',qry_cx.Fields[0].asdatetime);
qry_xxcx.Open;
if qry_xxcx.Fields[0].AsString<>'' then
lbl_ysdbh.Caption:=formatdatetime('YYYYMM',qry_cx.Fields[0].AsDATETIME)+
copy(floattostr(strtofloat(copy(qry_cx.Fields[0].AsString,7,4))+10001),2,4)
else
lbl_ysdbh.Caption:=formatdatetime('YYYYMM',qry_cx.Fields[0].AsDATETIME)+
'0001';