BMS-HOSxP Community

HOSxP => แจ้งข้อผิดพลาดการทำงานของ HOSxP V3 => ข้อความที่เริ่มโดย: nillada ที่ ตุลาคม 10, 2006, 05:10:26 AM

หัวข้อ: รายงาน 0110 รง 5 ใน 10.4
เริ่มหัวข้อโดย: nillada ที่ ตุลาคม 10, 2006, 05:10:26 AM
ฝาก อ. ช่วยดู Code ของ รายงาน 5 ด้วยครับ ส่วนของส่ง Refer พึ่งพบ v2.49.9.1X
ปัจจุบันผมใช้ 9.13
ทดสอบใน 10.4 ก็เป็นเหมือนกันครับ
หัวข้อ: Re: รายงาน 0110 รง 5 ใน 10.4
เริ่มหัวข้อโดย: doramon ที่ ตุลาคม 10, 2006, 05:22:43 AM
referout
referin

มีข้อมูลหรือเปล่าครับ
หัวข้อ: Re: รายงาน 0110 รง 5 ใน 10.4
เริ่มหัวข้อโดย: nillada ที่ ตุลาคม 10, 2006, 07:00:15 AM
มีครับ
หัวข้อ: Re: รายงาน 0110 รง 5 ใน 10.4
เริ่มหัวข้อโดย: manoi ที่ ตุลาคม 11, 2006, 04:57:31 AM
ทำการตรวจสอบและแก้ไขให้แล้วครับ

2.49.10.10

และให้เรียกใช้ โปรแกรมย่อยนี้เพื่อทำการแก้ไขข้อมูล Pttype ในตาราง referout ครับ

โค๊ด: Delphi
  1. Unit Script;
  2.  
  3. Procedure Main;
  4. var
  5.   tc:tclientdataset;
  6. begin
  7.  
  8.  tc:=tclientdataset.create(nil);
  9.  tc.data:=HOSxP_GetDataset('select * from referout where pttype = "" or pttype is null');
  10.  tc.first;
  11.  while not tc.eof do
  12.  begin
  13.    tc.edit;
  14.    if length(tc.fieldbyname('vn').asstring)=12 then
  15.      tc.fieldbyname('pttype').asstring:=vartostr(getsqldata('select pttype from ovst where vn = "'+tc.fieldbyname('vn').asstring+'"')) else
  16.  
  17.      tc.fieldbyname('pttype').asstring:=vartostr(getsqldata('select pttype from ipt where an = "'+tc.fieldbyname('vn').asstring+'"')) ;
  18.    tc.post;
  19.    tc.next;
  20.  end;
  21.  
  22.  if tc.changecount>0 then hosxp_updatedelta(tc.delta,'select * from referout where pttype = "" or pttype is null');
  23.  tc.free;
  24.  
  25.  showmessage('done');
  26.  
  27. end;
  28.  
  29.  
  30.  
  31.  
  32.  
  33. end.
  34.  
  35.  
  36.  
  37.