DB.UseConnection

Top  Previous  Next

 

Syntax

function DB.UseConnection(Con: pointer): boolean

 

Alternative Names

ibec_UseConnection

 

Description

Sets the script to use the connection Con, previously created by DB.CreateConnection or by retrieving the default connection.

 

Returns TRUE.

 

See Also

DB.CreateConnection
DB.GetDefaultConnection
DB.UseDefaultConnection

 

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