Click here to Skip to main content
15,908,013 members
Home / Discussions / C#
   

C#

 
GeneralRe: Calculating execution time less than 1 tick Pin
Dave Kreskowiak22-Oct-06 12:44
mveDave Kreskowiak22-Oct-06 12:44 
AnswerRe: Calculating execution time less than 1 tick Pin
Dave Kreskowiak22-Oct-06 2:25
mveDave Kreskowiak22-Oct-06 2:25 
QuestionSimple Byte.Parse question Pin
eggie521-Oct-06 16:09
eggie521-Oct-06 16:09 
AnswerRe: Simple Byte.Parse question Pin
Sean Michael Murphy21-Oct-06 16:25
Sean Michael Murphy21-Oct-06 16:25 
GeneralRe: Simple Byte.Parse question Pin
Vega0221-Oct-06 17:20
Vega0221-Oct-06 17:20 
QuestionHow to detect CPU usage or computer idle time... Pin
shultas21-Oct-06 16:05
shultas21-Oct-06 16:05 
QuestionThe old ADO double play Pin
davecove21-Oct-06 15:27
davecove21-Oct-06 15:27 
QuestionWhich Db connection is better? Pin
Mark0621-Oct-06 13:08
Mark0621-Oct-06 13:08 
Hi,
whats the preferred method of connecting to a database.

a)
create a static SqlConnection object
or
b)
using Sqlconnection = new... {}
having a Using section in every Add, Get, Delete function.

My question is, is having a static object connection open for the duration of the application, a major overhead?

Or is it better (all be it, more code) to have a Using statement, that connects, executes, then disconnects from the database? Thus no permanent connection.

Any thoughts?

Mark
AnswerRe: Which Db connection is better? Pin
Rob Graham21-Oct-06 16:17
Rob Graham21-Oct-06 16:17 
AnswerRe: Which Db connection is better? Pin
Rob Graham21-Oct-06 16:21
Rob Graham21-Oct-06 16:21 
QuestionGetProcesses Error Pin
Inkyskin_UK21-Oct-06 12:50
Inkyskin_UK21-Oct-06 12:50 
AnswerRe: GetProcesses Error Pin
S. Senthil Kumar23-Oct-06 8:50
S. Senthil Kumar23-Oct-06 8:50 
QuestionReading VB6 PropertyBag using C#? Pin
marcel.toledo21-Oct-06 12:41
marcel.toledo21-Oct-06 12:41 
AnswerRe: Reading VB6 PropertyBag using C#? Pin
LongRange.Shooter23-Oct-06 4:30
LongRange.Shooter23-Oct-06 4:30 
QuestionMouse button click... Pin
new_phoenix21-Oct-06 11:19
new_phoenix21-Oct-06 11:19 
QuestionWhat's the meaning of the following code? Pin
Ming Luo21-Oct-06 10:46
Ming Luo21-Oct-06 10:46 
AnswerRe: What's the meaning of the following code? Pin
Tamimi - Code21-Oct-06 19:59
Tamimi - Code21-Oct-06 19:59 
QuestionHow to detect Attempt to connect? Pin
FlyOnIT21-Oct-06 9:52
FlyOnIT21-Oct-06 9:52 
AnswerRe: How to detect Attempt to connect? Pin
LongRange.Shooter23-Oct-06 4:32
LongRange.Shooter23-Oct-06 4:32 
QuestionNeed To license source or component. Pin
hdv21221-Oct-06 8:44
hdv21221-Oct-06 8:44 
QuestionHow to identify whether or not a control object has been instantiated... [modified] Pin
new_phoenix21-Oct-06 7:46
new_phoenix21-Oct-06 7:46 
AnswerRe: How to identify whether or not a control object has been instantiated... Pin
Guffa21-Oct-06 8:59
Guffa21-Oct-06 8:59 
GeneralRe: How to identify whether or not a control object has been instantiated... [modified] Pin
new_phoenix21-Oct-06 9:28
new_phoenix21-Oct-06 9:28 
GeneralRe: How to identify whether or not a control object has been instantiated... Pin
Guffa21-Oct-06 11:56
Guffa21-Oct-06 11:56 
QuestionForm Updating within Loops Pin
Jethro6321-Oct-06 6:06
Jethro6321-Oct-06 6:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.