Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compiling myprogram.cs
Message
From
03/01/2007 16:48:31
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
02/01/2007 17:49:02
General information
Forum:
ASP.NET
Category:
Deployments
Miscellaneous
Thread ID:
01180878
Message ID:
01182012
Views:
10
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform