Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-08

mysql

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

kleber

hi,

I've a problem with the mysql_data_seek procedure with fpc 1.0.10.
If I call this function in the main program block it runs correctly but
if I call this one into a function or procedure this moves the row
pointer to nil, except if all the procedures or functions that call
mysql_data_seek uses the cdecl convension.
I've created this procedure replacing the original from mysqldb.pas:
-------------------------------------------------------------------------------------------------------------------------------------
procedure mysql_data_seek(local_res: PMYSQL_RES; local_row:my_ulonglong);
var
  base,
  cursor : PMYSQL_ROWS;
begin
  with local_res^ do begin
    base := data^.data;
    cursor := base;
    while local_row > 0 do begin
      if cursor  nil then
        cursor := cursor^.next;
      dec(local_row);
    end;
    data_cursor := cursor;
  end;
end;
----------------------------------------------------------------------------------------------------------
This is very simple but runs correctly.

Kleber Hermsdorff

Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with http://shopnow.netscape.com/

Reply by email