Advertisement
Guest User

Untitled

a guest
Aug 15th, 2014
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.55 KB | None | 0 0
  1. procedure TForm6.BitBtn2Click(Sender: TObject);
  2. var
  3.   Cr : TIB_Cursor;
  4. begin
  5.   try
  6.     Cr := TIB_Cursor.Create(nil); //quando estou numa unit utilizo o nil
  7.     with Cr do
  8.       begin
  9.         IB_Connection := Conexao;
  10.         SQL.Text      := 'select first 2 * from usuarios order by id';
  11.         Open;
  12.         while (not eof) do
  13.           begin
  14.             ShowMessage(FieldByName('Nome').AsString);
  15.             Next;
  16.           end;
  17.       end;
  18.   finally
  19.     Cr.Close;
  20.     Cr.UnPrepare;
  21.     FreeAndNil(Cr);
  22.   end;
  23.   ShowMessage('Aqui');
  24. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement