koreksi coding simpan file tabel...

 
user image
more 8 years ago

idhiel

tolongin lagi dong master.. aq pux code pesan error muncul Syntak Error procedure Tsimpan.sButton4Click(Sender: TObject); begin ssavedialog1.FileName := sedit1.Text; if ssavedialog1.Execute then begin if scheckbox1.Checked = true then if sgroupbox2.Caption ='Process Date' then begin ssavedialog1.FileName := sedit1.Text; dm.ADOsimpan.Active := false; dm.ADOsimpan.SQL.Text := 'create table '+Quotedstr(sedit1.Text) +'(Seqno char(15)' +'Nama Char(25),Alamat Char(35),ch_receive date,Receiver_n Char(25),receiver_s Char(30), ' +'TglUpl Date,Flag Char(1),ch_return Date,koderecv Char(2),cycle Integer(6)) '; dm.ADOsimpan.ExecSQL ; dm.ADOsimpan.SQL.Text := 'CREATE UNIQUE INDEX Field1Index ON '+QuotedStr(sedit1.Text) +'(Seqno)'; dm.ADOsimpan.ExecSQL ; dm.ADOsimpan.Active := True; dm.ADOsimpan.Refresh ; dm.ADOsukses.Active := false; dm.ADOsukses.SQL.Text := 'select a.noref,a.nama,a.addrs,a.upload,a.cycle,a.bank,b.nama_p,b.proses,b.kode,b.terima,b.flag,b.status from data a,sukses b ' +'where data.noref = sukses.noref ' +'and bank like '+QuotedStr('%'+sedit5.Text) +'and DTOS(proses) = '+QuotedStr(Formatdatetime('yyyymmdd',dtp.Date)); showmessage(dm.ADOsukses.SQL.Text); dm.ADOsukses.ExecSQL ; dm.ADOsukses.Active := true; dm.ADOsukses.Refresh ; while NOT dm.ADOsukses.Eof do begin dm.ADOsimpan.Append ; dm.ADOsimpan['Seqno'] := dm.ADOsukses['noref']; dm.ADOsimpan['Nama'] := dm.ADOsukses['nama']; dm.ADOsimpan['Alamat'] := dm.ADOsukses['addrs']; dm.ADOsimpan['Ch_receive'] := dm.ADOsukses['terima']; dm.ADOsimpan['receiver_n'] := dm.ADOsukses['status']; dm.ADOsimpan['receiver_s'] := dm.ADOsukses['nama_p']; dm.ADOsimpan['tglupl'] := dm.ADOsukses['upload']; dm.ADOsimpan['Flag'] := dm.ADOsukses['flag']; dm.ADOsimpan['ch_return'] := dm.ADOsukses['proses']; dm.ADOsimpan['koderecv'] := dm.ADOsukses['kode']; dm.ADOsimpan['cycle'] := dm.ADOsukses['cycle']; dm.ADOsimpan.Post ; dm.ADOsimpan.Refresh ; dm.ADOsimpan.Next; end; end; dm.ADOsimpan.SaveToFile(ssavedialog1.FileName+'.dbf'); end; end; tolong koreksix dong master...
user image
more 8 years ago

halimanh

errornya di line yg mana?
@idhiel: tolongin lagi dong master.. aq pux code pesan error muncul Syntak Error procedure Tsimpan.sButton4Click(Sender: TObject); begin ssavedialog1.FileName := sedit1.Text; if ssavedialog1.Execute then begin if scheckbox1.Checked = true then if sgroupbox2.Caption ='Process Date' then begin ssavedialog1.FileName := sedit1.Text; dm.ADOsimpan.Active := false; dm.ADOsimpan.SQL.Text := 'create table '+Quotedstr(sedit1.Text) +'(Seqno char(15)' +'Nama Char(25),Alamat Char(35),ch_receive date,Receiver_n Char(25),receiver_s Char(30), ' +'TglUpl Date,Flag Char(1),ch_return Date,koderecv Char(2),cycle Integer(6)) '; dm.ADOsimpan.ExecSQL ; dm.ADOsimpan.SQL.Text := 'CREATE UNIQUE INDEX Field1Index ON '+QuotedStr(sedit1.Text) +'(Seqno)'; dm.ADOsimpan.ExecSQL ; dm.ADOsimpan.Active := True; dm.ADOsimpan.Refresh ; dm.ADOsukses.Active := false; dm.ADOsukses.SQL.Text := 'select a.noref,a.nama,a.addrs,a.upload,a.cycle,a.bank,b.nama_p,b.proses,b.kode,b.terima,b.flag,b.status from data a,sukses b ' +'where data.noref = sukses.noref ' +'and bank like '+QuotedStr('%'+sedit5.Text) +'and DTOS(proses) = '+QuotedStr(Formatdatetime('yyyymmdd',dtp.Date)); showmessage(dm.ADOsukses.SQL.Text); dm.ADOsukses.ExecSQL ; dm.ADOsukses.Active := true; dm.ADOsukses.Refresh ; while NOT dm.ADOsukses.Eof do begin dm.ADOsimpan.Append ; dm.ADOsimpan['Seqno'] := dm.ADOsukses['noref']; dm.ADOsimpan['Nama'] := dm.ADOsukses['nama']; dm.ADOsimpan['Alamat'] := dm.ADOsukses['addrs']; dm.ADOsimpan['Ch_receive'] := dm.ADOsukses['terima']; dm.ADOsimpan['receiver_n'] := dm.ADOsukses['status']; dm.ADOsimpan['receiver_s'] := dm.ADOsukses['nama_p']; dm.ADOsimpan['tglupl'] := dm.ADOsukses['upload']; dm.ADOsimpan['Flag'] := dm.ADOsukses['flag']; dm.ADOsimpan['ch_return'] := dm.ADOsukses['proses']; dm.ADOsimpan['koderecv'] := dm.ADOsukses['kode']; dm.ADOsimpan['cycle'] := dm.ADOsukses['cycle']; dm.ADOsimpan.Post ; dm.ADOsimpan.Refresh ; dm.ADOsimpan.Next; end; end; dm.ADOsimpan.SaveToFile(ssavedialog1.FileName+'.dbf'); end; end; tolong koreksix dong master...
user image
more 8 years ago

idhiel

line errorx kagak tau gan... soalx pesan errorx muncul setelah aplikasi dijalankan...
more ...
  • Pages:
  • 1

Random Topic

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com