saya baru aja coba pake MySQL, dan saya coba buat program Insert ke
tabel barang: sourece codenya =
procedure TFbarang.BitBtn1Click(Sender: TObject);
begin
WITH UDM1.DM DO
BEGIN
barang.Insert;
barang.FieldByName('id_barang').AsString:=edit1.Text;
barang.FieldByName('nama_brg').AsString:=edit2.Text;
barang.FieldByName('NAME').AsString:=ComboBox1.Text;
barang.FieldByName('qty').AsInteger:=strtoint(edit4.Text);
barang.FieldByName('gambar').AsString:=edit6.Text;
barang.FieldByName('rupiah').AsFloat:=strtofloat(edit3.Text);
barang.FieldByName('dollar').AsFloat:=strtofloat(edit8.Text);
barang.FieldByName('euro').AsFloat:=strtofloat(edit14.Text);
barang.FieldByName('supplier').Value:=edit7.Text;
barang.FieldByName('tgl_masuk').AsDateTime:=strtodate
(maskedit1.Text);
barang.FieldByName('W').AsFloat:=strtofloat(edit10.Text);
barang.FieldByName('D').AsFloat:=strtofloat(edit12.Text);
barang.FieldByName('H').AsFloat:=strtofloat(edit13.Text);
barang.FieldByName('Volume').AsFloat:=strtofloat
(edit15.Text);
barang.Post;
END;
END;
pada awalnya bisa berjalan mulus, pada pengisian hari berikutnya
muncul pesan ERROR ketika simpan yaitu :
"barang:dataset not edit or insert mode "
padahal mode insert dan postnya kan ada, trus pas kita tutup program
muncul pesan ERROR sbb :
"exception EDatabseError in module Penjualan.exe ata 00009d4cb
barang:cannot perform trhis operation on a closed dataset
"
padahal tabel barang dalam keadaan Active nya TRUE, Mohon Pencerahan
dari rekan2 delphindo..
trim's
Berlangganan: [EMAIL PROTECTED]
Stop Berlangganan: [EMAIL PROTECTED]
Keluhan Milis(Unbouncing,spam,dll): [EMAIL PROTECTED]
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/Delphindo/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
