Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Revisiting the global connection object
Message
De
30/04/2007 14:16:14
 
 
À
30/04/2007 11:42:53
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01220816
Message ID:
01221224
Vues:
19
>Queue is better, anyway:
>
>public static MyConnection[100] connections;
>// init connections
>
>if (!MyConnection[nIndex].IsInUse) { OleDbConnection con = MyConnection[nIndex].Connection; ... }
>
>public class MyConnection
>{
> OleDbConnection con;
> Bool isInUse;
>
> public MyConnection(OleDbConnection con)
> {
>   this.con = con;
> }
> public bool IsInUse {get {return this.isInUse;} set {this.isInUse = value;}}
> public OleDbConnection Connection { get {return this.con;} }
>}
>
Thanks, I will try the Queue approach.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform