I have the following procedure
procedure TFHotInventariosIngresaTarifas.cxButton1Click(Sender: TObject);
var
FecMod : TDateTime;
begin
FecMod := EditFecIni.Date;
while Fecmod <= EditFecFin.Date do
begin
FHotInventarios.TTarifas.Locate('fecpre',DateTimeToUnix(FecMod),[]);
FecMod := IncDay(Fecmod,1);
end; //while
end;
But in the locate line it raise an Access Violation, I think perhaps I´m using the wrong way the locate method (I have many hours with this problem) the DateTimetoUnix was a try to see if this thing works, but doesn´t
The main idea is locate a certain date, and if it does not exist the insert a record or if exists, then update the record.
somebody has an idea?
Thank you
Using the Locate with a Table
The Result is the same,
"Access violation at address 0041D233"
FHotInventarios.TTarifas.Locate('fecpre',FecMod,[]);
I have even tryed to use the locate with other fields, with the same access violation.
Could it be a bug in the TMyTable? I´m using Delphi 2005 with windows XP and the mySQL database is remotelly connected
"Access violation at address 0041D233"
FHotInventarios.TTarifas.Locate('fecpre',FecMod,[]);
I have even tryed to use the locate with other fields, with the same access violation.
Could it be a bug in the TMyTable? I´m using Delphi 2005 with windows XP and the mySQL database is remotelly connected