Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best way to check for and/or create connection to DB
Message
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01561620
Message ID:
01561635
Vues:
53
>>Mayhaps I'm overthinking it again,and I'll grant that perhaps part of my problem is that I'm STILL waiting for .Net to become all that much better and I keep getting lost in the stupid dots but here we go.
>>
>>Is it better to
>>a) Create/Open/Close as DB connection everytime I need one,
>>b) can I just create one in the signon screen that will persist through to the DispQuestions screen, or
>>c) Create/Open/Close DB connection on Signon screen and then one for the DispQuestions screen.
>>
>>Thanks
>>
>>Dorris
>
>That gets a good solid 'it depends' answer.
>
>IMO if you are assuming you will be doing a pile of queries in a short amount of time, leave the handle open.
>
>If the queries will be spread out over time (waiting for user action, etc) - open and close as needed.

In the Signon screen, there's a call to get Student Name and Instructor Name from the Student Control Number and another to check password.

In the DispQuestion screen, between each question it

1) 'Scores' the answer
2) Stores QuestionID, Answer, CorrectAnswer, Time Answered
3) Checks to see if the next Question is an Experimental Item, if so, skips #4, selects the next ExpItemID
4) Calculates an Information Function on all possible next questions, based on what's needed next and what gives the most information.
5) Displays the next question.

Would there be any performance hit to create/open for each call...and does a 'Close' clear the connection from memory. IE, I don't want to be creating multiple copies of QConn for each student.
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform