looks like i narrowed the problem.
i tried to comment my program one by one using //.
then i found my program work without problem when i // this procedure
procedure TFSewaan.cekloker;
begin
//cek isiloker
zquery1.close;
zquery1.SQL.Clear;
zquery1.SQL.add('select * from uji1 where Noloker = 1 order by Tanggal desc limit 1');
zquery1.open;
while not zquery1.EOF do begin
data1:=zquery1.FieldByName('Isiloker').AsInteger;
zquery1.Next;
end;
zquery1.close;
zquery1.SQL.Clear;
zquery1.SQL.add('select * from uji1 where Noloker = 2 order by Tanggal desc limit 1');
zquery1.open;
while not zquery1.EOF do begin
data2:=zquery1.FieldByName('Isiloker').AsInteger;
zquery1.Next;
end;
zquery1.close;
zquery1.SQL.Clear;
zquery1.SQL.add('select * from uji1 where Noloker = 3 order by Tanggal desc limit 1');
zquery1.open;
while not zquery1.EOF do begin
data3:=zquery1.FieldByName('Isiloker').AsInteger;
zquery1.Next;
end;
zquery1.close;
zquery1.SQL.Clear;
zquery1.SQL.add('select * from uji1 where Noloker = 4 order by Tanggal desc limit 1');
zquery1.open;
while not zquery1.EOF do begin
data4:=zquery1.FieldByName('Isiloker').AsInteger;
zquery1.Next;
end;
zquery1.close;
zquery1.SQL.Clear;
zquery1.SQL.add('select * from uji1 where Noloker = 5 order by Tanggal desc limit 1');
zquery1.open;
while not zquery1.EOF do begin
data5:=zquery1.FieldByName('Isiloker').AsInteger;
zquery1.Next;
end;
zquery1.close;
end;
seems like its the pascal code nature. as i research and learn about pascal code execute each row in the same time , not like C++ that execute 1 by 1 from start to end of the program , Correct me if i am wrong
@getmem