Arsip: filter untuk menghitung record

more 12 years ago
idhiel
para master delphi knpa waktu aplikasix aq Run muncul pesan
'Index based on unknown field "="'
kodex sebagai berikut
procedure TForm7.sBitBtn1Click(Sender: TObject);
begin
Application.CreateForm(Tdetail,detail);
detail.sPanel2.Caption :=spanel4.Caption ;
dm.Dbf3.Filter := 'kode_kurir = '+QuotedStr(sedit7.text)
+'and bank = '+QuotedStr('BRI')
+'and antar = '+QuotedStr(sedit5.Text) ;
dm.Dbf3.Filtered := true;
detail.sEdit3.Text := inttostr(dm.Dbf3.RecordCount);
end;
mohon koreksinya para master....
dan apa sudah benar tuh kode menghitung recordx...???
Tb4 atas masukannya.... :D :D :D :D
more 12 years ago
hendrang67
@idhiel: para master delphi knpa waktu aplikasix aq Run muncul pesan 'Index based on unknown field "="' kodex sebagai berikutCoba kasih spasi di 'and bank dan 'and antar dm.Dbf3.Filter := 'kode_kurir = '+QuotedStr(sedit7.text) +' and bank = '+QuotedStr('BRI') +' and antar = '+QuotedStr(sedit5.Text) ;mohon koreksinya para master.... dan apa sudah benar tuh kode menghitung recordx...??? Tb4 atas masukannya.... :D :D :D :Dprocedure TForm7.sBitBtn1Click(Sender: TObject); begin Application.CreateForm(Tdetail,detail); detail.sPanel2.Caption :=spanel4.Caption ; dm.Dbf3.Filter := 'kode_kurir = '+QuotedStr(sedit7.text) +'and bank = '+QuotedStr('BRI') +'and antar = '+QuotedStr(sedit5.Text) ; dm.Dbf3.Filtered := true; detail.sEdit3.Text := inttostr(dm.Dbf3.RecordCount); end;

more 12 years ago
idhiel
aq dah kasih spasi but
pesan errorx masih muncul gan...
"index based on unknown field '=' "

more 12 years ago
hendrang67
@idhiel: aq dah kasih spasi but pesan errorx masih muncul gan... "index based on unknown field '=' "Seharusnya code nya udh benar, Errornya di index, coba cek properties Index yang di isi di komponen TDBF nya (Dbf3). mungkin salah ketik di propertiesnya, kalau di isi di run time coba cek di source codenya yang men-set nilai properties index dari TDBF (Dbf3).

more 12 years ago
hendrang67
@hendrang67: [quote:fb685c7525="idhiel"]aq dah kasih spasi but pesan errorx masih muncul gan... "index based on unknown field '=' "[/quote:fb685c7525] Seharusnya code nya udh benar, Errornya di index, coba cek properties Index yang di isi di komponen TDBF nya (Dbf3). mungkin salah ketik di propertiesnya, kalau di isi di run time coba cek di source codenya yang men-set nilai properties index dari TDBF (Dbf3).Kalau tidak set index nya coba sederhanakan expresi : dm.Dbf3.Filter := 'kode_kurir = '+QuotedStr(sedit7.text) +'and bank = '+QuotedStr('BRI') +'and antar = '+QuotedStr(sedit5.Text) ; menjadi 1. dm.Dbf3.Filter := 'kode_kurir = '+QuotedStr(sedit7.text); 2. dm.Dbf3.Filter := 'bank = '+QuotedStr('BRI'); 3. dm.Dbf3.Filter := 'antar = '+QuotedStr(sedit5.Text) ; untuk trace bagian mana yg menyebabkan error.

more 12 years ago
halimanh
Bisa dicoba:
1. indexnya sesuai dgn filternya
2. pake tanda kurung ( ) di filternya, jadi bentuk filternya kayak gini:
( field1 = "....." ) AND ( field2 = "....") AND (field3 = ".....")

more 12 years ago
idhiel
setelah di coba 2 cara yang agan2 kasih...
akhirnya pesan errornya masih muncul...
index based on unknown field '='
karena g ketemu caranya akhirnya aq pake query
setelah di run muncul pesan
file data.dbf does not exist.
mohon pencerahannya lagi master
soalnya belum terlalu dekat dengan query
kodex seperti ini
procedure TForm7.sBitBtn1Click(Sender: TObject);
begin
Application.CreateForm(Tdetail,detail);
detail.sPanel2.Caption :=spanel4.Caption ;
dm.ADOQuery1.Close ;
dm.ADOQuery1.SQL.Text := 'select kode_kurir,bank,antar from data where kode_kurir ='''+sedit7.Text+''' and bank =''BRI'' and antar =+datetostr(date())';
dm.ADOQuery1.ExecSQL ;
dm.ADOQuery1.Open ;
detail.sEdit3.Text := inttostr(dm.ADOQuery1.RecordCount);
end;

more 12 years ago
hendrang67
@idhiel: setelah di coba 2 cara yang agan2 kasih... akhirnya pesan errornya masih muncul... index based on unknown field '=' karena g ketemu caranya akhirnya aq pake query setelah di run muncul pesan file data.dbf does not exist. mohon pencerahannya lagi master soalnya belum terlalu dekat dengan query kodex seperti inifile data.dbf does not exist ada 2 kemungkinan : 1. Data.DBF tidak ada. 2. AdoQuery mencari Data.DBF di directory yang salah, untuk yang ini coba lht Adoconnection properties Cconnectionstring nya apa DefaultDir sudah berisi nama directory tempat data.dbf berada, kalau salah di edit dan diganti nama directorynya.procedure TForm7.sBitBtn1Click(Sender: TObject); begin Application.CreateForm(Tdetail,detail); detail.sPanel2.Caption :=spanel4.Caption ; dm.ADOQuery1.Close ; dm.ADOQuery1.SQL.Text := 'select kode_kurir,bank,antar from data where kode_kurir ='''+sedit7.Text+''' and bank =''BRI'' and antar =+datetostr(date())'; dm.ADOQuery1.ExecSQL ; dm.ADOQuery1.Open ; detail.sEdit3.Text := inttostr(dm.ADOQuery1.RecordCount); end;

more 12 years ago
idhiel
masalahnya ada di connstring nya gan dan dah selesai..
but masalah baru muncul yaitu
data yg di filter tadi jumlahnya tidak muncul di sedit3.text (lihat kode di atas)...
apa ada masalah ma kodenya gan..??
mohon pencerahannya lagi gan...
more ...
- Pages:
- 1
- 2
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
- Audio Reccorder
by w11 in Lain-lain more 14 years ago - Bernial Nol pada suatu Node yg tidak pernah kita klik
by onsir in MySQL more 17 years ago - Drag & Drop DBGRID
by Brams in Lain-lain more 17 years ago - Create Multiple Worksheet Excel
by abad21 in Tip n Trik Pemrograman more 19 years ago - total jumlah bulan??
by darkwind in MySQL more 16 years ago - Proses Database MDB......
by fissas in FireBird more 16 years ago - Membuat Save File Data Base
by xenvook in Bedah Kasus more 15 years ago - menurunkan performance aplikasi
by nurez in Tip n Trik Pemrograman more 17 years ago - SMS Gateway with Delphi
by tipatkey in Hal umum tentang Pascal Indonesia more 15 years ago - nangkap gambar dari webcam
by Shaf in Network, Files, I/O & System more 17 years ago