Advertisement
Guest User

Untitled

a guest
Aug 15th, 2014
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.59 KB | None | 0 0
  1. procedure TForm6.BitBtn1Click(Sender: TObject);
  2. begin
  3.   try
  4.     with TIB_Cursor.Create(nil) do //Criando o Cursor
  5.       begin
  6.         IB_Connection := Conexao;
  7.         SQL.Text      := 'select first 2 * from usuarios order by id';
  8.         Open; //Aqui o SQL aparece na tabela MON$STATEMENTS do firebird
  9.         while (not eof) do
  10.           begin
  11.             ShowMessage(FieldByName('Nome').AsString);
  12.             Next;
  13.           end;
  14.       end;
  15.   finally
  16.     Free; //Destruindo o Cursor - //Aqui o SQL desaparece na tabela MON$STATEMENTS do firebird
  17.   end;
  18.   ShowMessage('Aqui');
  19. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement