Cursor.Close

Top  Previous  Next

 

Syntax

function Cursor.Close(Crsr: pointer): boolean

 

Alternative Names

ibec_cr_CloseCursor

 

Description

Closes the cursor Crsr to free up resources and returns TRUE if the cursor was closed, FALSE otherwise.

 

See also

Cursor.Create
Cursor.Open

 

Example

execute UDSBlock

as

begin

  connectstr = 'database=server_fb:c:\data\testdb.fdb;username=SYSDBA;password=masterkey;

                client_library=C:\Program Files (x86)\Firebird\Firebird_4_0\fbclient.dll';

 

  /* create connection */

  FBCon = DB.CreateConnection(__ctFirebird, connectstr);

 

  /* use the connection */

  DB.UseConnection(FBCon);

 

  /* create cursor on the current used connection */

  mydata = Cursor.Create('select employeeid, emp_name, salary, bonus_perc from test_data order by employeeid');

  

  try

    /* additional Cursor calls */

  finally

    /* make sure to close the cursor and free up resources */

    Cursor.Close(mydata);

  end;

end