hi all,just old problem, but uncle google doesn't find solution. my code generate error 'system recouses exceeded' when i try to open old dbase file.the file is categories by date like file one at table 01-01-2002 inc to now, and saved at folder 2002 til 2007. please help me, and tank's alot for your experience.this is the code=========================Adoquery2.ConnectionString := strproduksi; //=====> connect to mySQL adoquery2.SQL.Text :='SELECT NOMOR, TGL_MSK, NON_ACT, KD_SEL FROM tbl_order WHERE NOMOR>''100000'' '+ ' order by TGL_MSK DESC'; Adoquery2.open; Adoquery2.First;While not(Adoquery2.Eof) do begin Tanggal := Adoquery2.fieldbyname('TGL_MSK').AsDateTime; nomor := Adoquery2.fieldbyname('NOMOR').AsString; While tanggal < now do begin Polder := 'E:\TC\TC'+formatdatetime('yyyymm',tanggal)+'\'; pile :='TC'+FormatDatetime('ddmmyy',tanggal)+'.dbf'; If not(fileexists(polder+pile)) then goto bablas; Adoquery1.Active := false; AdoQuery1.ConnectionString := 'Driver={Microsoft dBASE Driver (*.dbf)};DriverID=277;Dbq='+Polder+';'; AdoQuery1.SQL.Text := 'select * from "'+pile+'" where NO_ORD='+Quotedstr(nomor); try Adoquery1.Active := true; //=============> code stoped here AdoQuery1.first; except Adoquery1.Active := false; AdoQuery1.close; showmessage('salah pas buka ado1 dbase'); end; while not(Adoquery1.eof) do begin AdoQuery2.Filter := 'TGL_MSK <= '+Quotedstr(datetostr(tanggal)); AdoQuery2.Filtered := true; AdoCommand1.CommandText:= 'Insert into Tbl_timeCard SET '+ 'TANGGAL='+QuotedStr(FormatDateTime('yyyy/mm/dd',AdoQuery1.FieldByName('TANGGAL').AsDatetime))+ ',NO_REG='+QuotedStr(AdoQuery1.FieldByName('NO_REG').AsString)+ ',NO_ORD='+QuotedStr(AdoQuery1.FieldByName('NO_ORD').AsString)+ ',NAMA='+QuotedStr(AdoQuery1.FieldByName('NAMA').AsString)+ ',NO_PEG='+QuotedStr(AdoQuery1.FieldByName('NO_PEG').AsString)+ ',JM_AWL='+QuotedStr(jamkejam(AdoQuery1.FieldByName('JM_AWL').AsString))+ ',JM_AKH='+QuotedStr(jamkejam(AdoQuery1.FieldByName('JM_AKH').AsString))+ ',DIVISI='+QuotedStr(AdoQuery1.FieldByName('DIVISI').AsString)+ ',NM_ORD='+QuotedStr(AdoQuery1.FieldByName('NM_ORD').AsString)+ ',JN_BUKU='+QuotedStr(AdoQuery1.FieldByName('JN_BUKU').AsString)+ ',KD_KRJ='+QuotedStr(AdoQuery1.FieldByName('KD_KRJ').AsString)+ ',LOKASI='+QuotedStr(AdoQuery1.FieldByName('LOKASI').AsString)+ ',NM_KRJ='+QuotedStr(AdoQuery1.FieldByName('NM_KRJ').AsString)+ ',STT_KERJA='+QuotedStr(AdoQuery1.FieldByName('STT_KERJA').AsString)+ ',BEBAN='+QuotedStr(AdoQuery1.FieldByName('BEBAN').AsString)+ ',KELOMP='+QuotedStr(AdoQuery1.FieldByName('KELOMP').AsString)+ ',MSN_BMS='+QuotedStr(AdoQuery1.FieldByName('MSN_BMS').AsString)+ ',FX_VAR='+QuotedStr(AdoQuery1.FieldByName('FX_VAR').AsString); if not(AdoQuery1.FieldByName('LAMA').IsNull) then AdoCommand1.CommandText:=AdoCommand1.CommandText+',LAMA='+QuotedStr(AdoQuery1.FieldByName('LAMA').AsString); if not(AdoQuery1.FieldByName('TARIP').IsNull) then AdoCommand1.CommandText:=AdoCommand1.CommandText+',TARIP='+QuotedStr(AdoQuery1.FieldByName('TARIP').AsString); if not(AdoQuery1.FieldByName('HASIL').Isnull) then AdoCommand1.CommandText:=AdoCommand1.CommandText+',HASIL='+QuotedStr(AdoQuery1.FieldByName('HASIL').AsString); If not(AdoQuery1.FieldByName('PROSES').isnull) then AdoCommand1.CommandText:=AdoCommand1.CommandText+(',PROSES='+QuotedStr(AdoQuery1.FieldByName('PROSES').AsString)); If not(AdoQuery1.FieldByName('Orang').isnull) then AdoCommand1.CommandText:=AdoCommand1.CommandText+(',ORANG='+QuotedStr(AdoQuery1.FieldByName('orang').AsString)); AdoCommand1.Execute; lompat: AdoQuery1.Next; end;//adoquery1 bablas: tanggal := tanggal+1; end; //tanggal Adoquery2.Next; end;//eof adoquery2 ==========================best regard Pheeby _______________________________________________ Delphi-DB mailing list Delphi-DB@elists.org http://www.elists.org/mailman/listinfo/delphi-db