I am fairly new to .Net and would like to understand a "best practice" of 
using Firebird in my .Net project.

I have a web application that we are converting from CGI to .NET.  The CGI 
application establishes a connection for every request.  When architecting 
the .Net application, would the best approach be to create a connection for 
every session and assign the resulting connection as an object of the 
session, or is there a better approach.

We are using RAD Studio 2007 and currently I have the connection object 
created in the Global.asax unit of our project in the Session_Start event. 
Subsequently, the connection is closed and resources are released in the 
Session_End event.  Code in Session_Start below:

------------
dbReactorNet := FirebirdSql.Data.FirebirdClient.FbConnection.Create;

dbReactorNet.ConnectionString := 
'User=SYSDBA;Password=masterkey;Database=c:\dev\reactornet\db\reactornet.fdb;DataSource=Localhost;Port=3050;Dialect=1;Charset=NONE;Role=;Connection
 
lifetime=0;Connection timeout=15;Pooling=True;Packet Size=8192;Server 
Type=0';

dbReactorNet.Open;
Session['DBConnection'] := dbReactorNet;
--------------




-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to