Click here to Skip to main content
15,905,912 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionBinding Navigator Pin
5fingers17-Oct-08 2:36
5fingers17-Oct-08 2:36 
AnswerRe: Binding Navigator Pin
Dave Kreskowiak17-Oct-08 6:14
mveDave Kreskowiak17-Oct-08 6:14 
AnswerRe: Binding Navigator Pin
Paul Conrad17-Oct-08 6:30
professionalPaul Conrad17-Oct-08 6:30 
AnswerRe: Binding Navigator Pin
Mycroft Holmes17-Oct-08 23:13
professionalMycroft Holmes17-Oct-08 23:13 
QuestionPermanent Connection ? Pin
thesum16-Oct-08 22:53
thesum16-Oct-08 22:53 
AnswerRe: Permanent Connection ? Pin
Ashfield17-Oct-08 1:16
Ashfield17-Oct-08 1:16 
AnswerRe: Permanent Connection ? Pin
jzonthemtn17-Oct-08 1:18
jzonthemtn17-Oct-08 1:18 
AnswerRe: Permanent Connection ? Pin
Dave Kreskowiak17-Oct-08 2:02
mveDave Kreskowiak17-Oct-08 2:02 
Best practice depends on how often your going to the database to retrieve stuff and the number of users you have.

Connections to SQL Servers are expensive, money wise that is, so hanging onto a connection for the life of your apps runtime can be VERY expensive. If you did this, say you have 10 users who run your app. If all 10 run at the same time, you need 10 connection licenses on your SQL Server, multiplied by the cost of your connection licenses.

Now, if you use best practice, and only open a connection for as long as you need to retrieve a block of data or do an update, then you can get away with using fewer connection licenses. An application spends 95%+ of its life idle, not doing anything with the database. So, that same 10 users running your app could share, say 1 to 3 connection licenses. It just become much cheaper to run your application.

What you do depends on your applications requirements. You need to find a happy balance between these two and the performance benefits you gain, from your own testing of course.


A guide to posting questions on CodeProject[^]



Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007, 2008




GeneralRe: Permanent Connection ? Pin
Mycroft Holmes17-Oct-08 23:21
professionalMycroft Holmes17-Oct-08 23:21 
GeneralRe: Permanent Connection ? Pin
Guffa18-Oct-08 1:29
Guffa18-Oct-08 1:29 
GeneralRe: Permanent Connection ? Pin
Mycroft Holmes18-Oct-08 3:01
professionalMycroft Holmes18-Oct-08 3:01 
GeneralRe: Permanent Connection ? Pin
Guffa18-Oct-08 6:53
Guffa18-Oct-08 6:53 
GeneralRe: Permanent Connection ? Pin
Mycroft Holmes18-Oct-08 12:56
professionalMycroft Holmes18-Oct-08 12:56 
GeneralRe: Permanent Connection ? Pin
Dave Kreskowiak18-Oct-08 3:28
mveDave Kreskowiak18-Oct-08 3:28 
GeneralRe: Permanent Connection ? Pin
Mycroft Holmes18-Oct-08 3:35
professionalMycroft Holmes18-Oct-08 3:35 
GeneralProblem with Excel Formula... Need some help Pin
Golden Jing16-Oct-08 22:48
Golden Jing16-Oct-08 22:48 
GeneralRe: Problem with Excel Formula... Need some help Pin
Dave Kreskowiak17-Oct-08 6:15
mveDave Kreskowiak17-Oct-08 6:15 
GeneralRe: Problem with Excel Formula... Need some help Pin
Golden Jing19-Oct-08 16:02
Golden Jing19-Oct-08 16:02 
GeneralRe: Problem with Excel Formula... Need some help Pin
Dave Kreskowiak19-Oct-08 18:09
mveDave Kreskowiak19-Oct-08 18:09 
GeneralRe: Problem with Excel Formula... Need some help Pin
Golden Jing19-Oct-08 18:26
Golden Jing19-Oct-08 18:26 
QuestionRuntime instance creation Pin
SelvaShankar16-Oct-08 19:59
SelvaShankar16-Oct-08 19:59 
AnswerRe: Runtime instance creation Pin
Steven J Jowett16-Oct-08 22:44
Steven J Jowett16-Oct-08 22:44 
AnswerRe: Runtime instance creation Pin
Mycroft Holmes17-Oct-08 23:24
professionalMycroft Holmes17-Oct-08 23:24 
GeneralRe: Runtime instance creation Pin
SelvaShankar20-Oct-08 19:06
SelvaShankar20-Oct-08 19:06 
AnswerRe: Runtime instance creation Pin
SelvaShankar31-Oct-08 2:06
SelvaShankar31-Oct-08 2: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.