DB.CloseConnection

Top  Previous  Next

 

Syntax

function DB.CloseConnection(var Con: pointer): boolean

 

Alternative Names

ibec_CloseConnection

 

Description

Removes the connection Con from the available connections and sets the variable to NULL.

 

Returns TRUE.

 

See Also

DB.CreateConnection
DB.UseConnection

 

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';

 

  FBCon = DB.CreateConnection(__ctFirebird, connectstr);

 

  DB.UseConnection(FBCon);

  try

    /* perform queries */

  finally

    DB.CloseConnection(FBCon);

  end

end