Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Compiling myprogram.cs
Message
De
03/01/2007 16:48:31
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
02/01/2007 17:49:02
Information générale
Forum:
ASP.NET
Catégorie:
Déploiements
Divers
Thread ID:
01180878
Message ID:
01182012
Vues:
11
>Hi Cetin.
>Once I have made connection, is it good practce in C# to 1) pass these connection to other functions (like in your example, can I pass variable cn and cmd to other functions) or 2) should I create more connections as I need them in my functions and close them as I finish.
>
>BTW: I haven't tried the former yet... don't know if I can.
>
>Thanks.
>

Sam,
You can pass the references to other methods. However in .Net you work with disconnected sets. IOW open/close them as needed (many methods automatically open/close them w/o you explicitly saying cn.Open()).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform