I'm doing a simple locate in an ado table and the locate returns True but it doesn't move to the right record. this is my code:
for i:= 0 to db_grid.Columns.Count -1 do
dm_ppp.tmyadotable.First;
busqueda := trim(db_grid.Columns.FieldName);
if dm_ppp.Tmyadotable.Locate('campo',busqueda,[]) then
{some code}
else
ShowMessage('Error');
end;
this is driven me crazy, i've tried:
- changing the locate options
- closing and opening the table
- changing and taking off all indexes of the table
i dont know what else to do, and im sure it has a very simple solution, but i can't find it.
Help? Thanks
for i:= 0 to db_grid.Columns.Count -1 do
dm_ppp.tmyadotable.First;
busqueda := trim(db_grid.Columns.FieldName);
if dm_ppp.Tmyadotable.Locate('campo',busqueda,[]) then
{some code}
else
ShowMessage('Error');
end;
this is driven me crazy, i've tried:
- changing the locate options
- closing and opening the table
- changing and taking off all indexes of the table
i dont know what else to do, and im sure it has a very simple solution, but i can't find it.
Help? Thanks