Arsip: AQ3: Cannot Perform this operation an a closed dataset

more 12 years ago
ade_jm
bantu donk . . ku masih newbie di delphi, and ku lagi bikin program pi ada pesan error AQ3: Cannot Perform this operation an a closed dataset AQ3 itu adoQuery mohon para master, carana gimana ya wat benerin errornya?
procedure TFrmHargaBarang.E2Enter(Sender: TObject);
begin
if AQ3.Locate('Kd_Brg',E1.Text,) then
begin
E2.Text:= AQ3['Hrg_Sat'];
if (AQ2.Locate('Kd_Brg',E1.Text,)) AND (B3.Caption = '&Simpan') then
begin
E4.Text:= AQ2['Hrg_Brg'];
MessageDlg('Harga Barang Ini Telah Tersimpan!',mtInformation,[MBOK],0);
TKosong(Sender);
end
else
if (AQ2.Locate('Kd_Brg',E1.Text,)) AND (B3.Caption = 'Up &Date') then
begin
E4.Text:= AQ2['Hrg_Brg'];
end
else
if (AQ2.Locate('Kd_Brg',E1.Text,)) AND (B3.Caption = '&SimUp') then
E4.Text:= AQ2['Hrg_Brg'];
end;
if Length(Trim(E2.Text)) <> 0 then
begin
hrgbeli:= StrToFloat(E2.Text);
hrgjual:= hrgbeli * 10 / 100;
E3.Text:= FloatToStr(hrgjual);
E4.Text:= FloatToStr(hrgbeli + hrgjual);
end;
end;
tanda merahnya ada di if AQ3.Locate('Kd_Brg',E1.Text,) then
mohon bantuannya
and thanks before . .

more 12 years ago
hendrang67
@ade_jm: bantu donk . . ku masih newbie di delphi, and ku lagi bikin program pi ada pesan error AQ3: Cannot Perform this operation an a closed dataset AQ3 itu adoQuery mohon para master, carana gimana ya wat benerin errornya? procedure TFrmHargaBarang.E2Enter(Sender: TObject); begin if AQ3.Locate('Kd_Brg',E1.Text,) then begin E2.Text:= AQ3['Hrg_Sat']; if (AQ2.Locate('Kd_Brg',E1.Text,)) AND (B3.Caption = '&Simpan') then begin E4.Text:= AQ2['Hrg_Brg']; MessageDlg('Harga Barang Ini Telah Tersimpan!',mtInformation,[MBOK],0); TKosong(Sender); end else if (AQ2.Locate('Kd_Brg',E1.Text,)) AND (B3.Caption = 'Up &Date') then begin E4.Text:= AQ2['Hrg_Brg']; end else if (AQ2.Locate('Kd_Brg',E1.Text,)) AND (B3.Caption = '&SimUp') then E4.Text:= AQ2['Hrg_Brg']; end; if Length(Trim(E2.Text)) <> 0 then begin hrgbeli:= StrToFloat(E2.Text); hrgjual:= hrgbeli 10 / 100; E3.Text:= FloatToStr(hrgjual); E4.Text:= FloatToStr(hrgbeli + hrgjual); end; end; tanda merahnya ada di if AQ3.Locate('Kd_Brg',E1.Text,) then mohon bantuannya and thanks before . .error AQ3: Cannot Perform this operation an a closed dataset AQ3, terjadi karena AQ3 belum di Open. procedure TFrmHargaBarang.E2Enter(Sender: TObject); begin AQ3.Open; //<--- Open query AQ3 if AQ3.Locate('Kd_Brg',E1.Text,) then begin E2.Text:= AQ3['Hrg_Sat']; if (AQ2.Locate('Kd_Brg',E1.Text,)) AND (B3.Caption = '&Simpan') then begin E4.Text:= AQ2['Hrg_Brg']; MessageDlg('Harga Barang Ini Telah Tersimpan!',mtInformation,[MBOK],0); TKosong(Sender); end else if (AQ2.Locate('Kd_Brg',E1.Text,)) AND (B3.Caption = 'Up &Date') then begin E4.Text:= AQ2['Hrg_Brg']; end else if (AQ2.Locate('Kd_Brg',E1.Text,)) AND (B3.Caption = '&SimUp') then E4.Text:= AQ2['Hrg_Brg']; end; if Length(Trim(E2.Text)) <> 0 then begin hrgbeli:= StrToFloat(E2.Text); hrgjual:= hrgbeli 10 / 100; E3.Text:= FloatToStr(hrgjual); E4.Text:= FloatToStr(hrgbeli + hrgjual); end; end;

more 12 years ago
ade_jm
[Warning] FHBarang.pas(7): Unit 'FileCtrl' is specific to a platform
kalo ini error napa ya kk?
and yang tadi malah keluar pesan error lagi tapi beda
is not valid integer value . .

more 12 years ago
hendrang67
@ade_jm: [Warning] FHBarang.pas(7): Unit 'FileCtrl' is specific to a platform kalo ini error napa ya kk? and yang tadi malah keluar pesan error lagi tapi beda is not valid integer value . .untuk [warning] FHBarang.pas(7): Unit 'FileCtrl' is specific to a platform Apa Anda pakai OS bukan Windows ? kalau program nya proses dgn benar warning ini bisa diabaikan. is not valid integer value . . Apa muncul di AQ3.OPEN ? Kalau muncul di open coba cek di syntax SQL apa ada perintah StrToInt, kalau ada berarti ada nilai String yg tdk bisa di convert ke Integer. Misal nya nilai yg ada desimal nya. Contoh Kalau string StrToInt('20.34') akan muncul error spt itu.

more 12 years ago
tomxpatra
Cannot Perform this operation an a closed dataset biasanya tabelnya tidak aktif.
kalau table berarti belum menjalankan perintah OPEN.
kalau FileCtrl' is specific to a platform
kan cuman warning, bukan berarti error. mungkin yah uses FileCtrl hanya bisa jalan dispesifik sistem operasi
misalnya hanya bisa jalan di windows saja.
mudah2an membantu
more ...
- Pages:
- 1
reply |
Report Obsolete
AI Forward

🚀 We're thrilled to partner with Alibaba Cloud for "AI Forward - Alibaba Cloud Global Developer Summit 2025" in Jakarta! Join us and explore the future of AI. Register now:
https://int.alibabacloud.com/m/1000400772/
#AlibabaCloud #DeveloperSummit #Jakarta #AIFORWARD
Last Articles
Last Topic
- PascalTalk #6: (Podcast) Kuliah IT di luar negeri, susah gak sih?
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #5: UX: Research, Design and Engineer
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #4: Obrolan Ringan Seputar IT
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #2: Membuat Sendiri SMART HOME
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #3: RADically Fast and Easy Mobile Apps Development with Delphi
by LuriDarmawan in Tutorial & Community Project more 4 years ago - PascalTalk #1: Pemanfaatan Artificial Intelligence di Masa Covid-19
by LuriDarmawan in Tutorial & Community Project more 4 years ago - Tempat Latihan Posting
by LuriDarmawan in OOT more 5 years ago - Archive
- Looping lagi...
by idhiel in Hal umum tentang Pascal Indonesia more 12 years ago - [ask] koneksi ke ODBC user Dsn saat runtime dengan ado
by halimanh in FireBird more 12 years ago - Validasi menggunakan data tanggal
by mas_kofa in Hal umum tentang Pascal Indonesia more 12 years ago
Random Topic
- Enskripsi n Deskripsi
by lord_kimm in Tip n Trik Pemrograman more 18 years ago - tentang validasi nich ? please !
by jajang in Tip n Trik Pemrograman more 16 years ago - ASK komponen delphi
by zethic in Hal umum tentang Pascal Indonesia more 15 years ago - Aplikasi Window onLinux
by reminder2k1 in Reporting more 17 years ago - Aplikasi Penjadwalan Perkuliahan / Tugas AKhir
by syntax_error in Bedah Kasus more 16 years ago - form nutup sendiri kayak screen saver
by mbahdien in Tip n Trik Pemrograman more 17 years ago - Bagi yang jago algoritma: Repeating Pattern Recognition
by danieljun in Tip n Trik Pemrograman more 17 years ago - Nanya... nilai 0 tidak kesimpan ke dalam tabel database
by debby in Tip n Trik Pemrograman more 17 years ago - Error RLINK32
by daeng in Multimedia & Graphic Enhancement more 13 years ago - extract icon
by bboyz in Tip n Trik Pemrograman more 17 years ago