ทำได้ แต่อยู่ที่ว่าเราต้องการบันทึกค่าอะไรลงในตารางไหน
ตัวอย่าง Script
fcds3.data:=hosxp_getdataset('select vstdate,vsttime from ovst where vn="'+fvn+'"');
fcds3.open;
if fdepcode<>'' then
if fcds.recordcount=0 then
begin
fcds.insert;
fcds['yindee_diy_id']:=getserialnumber('yindee_diy_id');
fcds['vn']:=fvn;
fcds['loginname']:=fcds2['kskloginname'] ;
fcds['doctor']:= fdoctor;
fcds['depcode']:=fdepcode;
fcds['work_date']:=fcds3['vstdate'];
fcds['work_time']:=fcds3['vsttime'];
fcds['computer_name']:=fcds2['servername'] ;
fcds['ip_computer']:= fcds2['computername'];
end else
begin
fcds.edit;
fcds['vn']:=fvn;
fcds['loginname']:=fcds2['kskloginname'] ;
fcds['doctor']:= fdoctor;
fcds['depcode']:=fdepcode;
fcds['edit_date']:=date;
fcds['edit_time']:=time;
fcds['computer_name']:=fcds2['servername'] ;
fcds['ip_computer']:= fcds2['computername'];
end;
fcds.post;
fcds.datarequest('select * from yindee_diy_workload where vn="'+fvn+'" and loginname="'+fcds2.fieldbyname('kskloginname').asstring+'" ');
ApplyUpdate_fcds(-1);
end;