thank you both for the psychological support...
well, what your are saying in short terms is ... add a compare function and you are done ?
Cause i don't know where i will stuck after this with it... is this all that i need, or are more things behind ? (to buy the right helmet)
Currently i am a little bit pressed by time (as we all are also, i suspect) and touching FCL, outside of bug fixes is not an option (for me) right now, i would ruther go on by bypassing the problem (and get rid the VARCHAR(16) from primary keys in db, with all consequences), and pray for an extend in next lazarus version....
and here is my code from my base database form that calls the locate
{
Stores key of current record, refreshes qry and then tries to locate it.
if locate fails then goes to first record.
}
procedure TfrmDb.refreshQry(qry:TSQLQuery);
var kf: string; keyValues: variant;
begin
if Assigned(qry) then with qry do begin
kf:=getKeyFields(qry);
keyValues:=getKeyValues(qry); try
DisableControls; try
Refresh;
if not empty(qry) then begin
Last;
if(kf<>'')
and (VarType(keyValues)<>varempty)
and not Locate(kf,keyValues,[]) then
First;
end;
finally EnableControls end;
finally VarClear(keyValues) end;
end;
end;