Click here to Skip to main content
15,902,112 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionI have a VB.Net Windows application Pin
indian14318-Mar-08 9:55
indian14318-Mar-08 9:55 
GeneralRe: I have a VB.Net Windows application Pin
AliAmjad18-Mar-08 10:15
AliAmjad18-Mar-08 10:15 
GeneralRe: I have a VB.Net Windows application Pin
Dave Kreskowiak18-Mar-08 10:27
mveDave Kreskowiak18-Mar-08 10:27 
GeneralRe: I have a VB.Net Windows application Pin
Dave Kreskowiak18-Mar-08 10:25
mveDave Kreskowiak18-Mar-08 10:25 
GeneralRe: I have a VB.Net Windows application Pin
indian14318-Mar-08 20:52
indian14318-Mar-08 20:52 
GeneralPublic set in VB 6.0 Pin
leaveu18-Mar-08 9:30
leaveu18-Mar-08 9:30 
AnswerRe: Public set in VB 6.0 Pin
Arjun Marwaha18-Mar-08 21:38
Arjun Marwaha18-Mar-08 21:38 
GeneralRe: Public set in VB 6.0 Pin
Dave Kreskowiak19-Mar-08 1:34
mveDave Kreskowiak19-Mar-08 1:34 
It's bad practice to open a connection to a database for the life of your application. You normally opnly keep the connection open for as long as it takes to execute your query, then close it.

Soemthing like this would usuallu be done in a class, possibly using shared (static) methods, or if your design requires it, instance methods. These methods would return a specific set of data, each getting a connection to the database, executing it's own query, then closing the connection. Other methods would do the same thing, but update the database.



A guide to posting questions on CodeProject[^]



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




GeneralAuto Clicking Pin
mykingdomforanewusername18-Mar-08 6:58
mykingdomforanewusername18-Mar-08 6:58 
GeneralRe: Auto Clicking Pin
Dave Kreskowiak18-Mar-08 8:52
mveDave Kreskowiak18-Mar-08 8:52 
GeneralRe: Auto Clicking Pin
Luc Pattyn18-Mar-08 12:38
sitebuilderLuc Pattyn18-Mar-08 12:38 
GeneralRe: Auto Clicking Pin
Smithers-Jones19-Mar-08 2:32
Smithers-Jones19-Mar-08 2:32 
Generaldata base or file Pin
DavidProg18-Mar-08 5:54
DavidProg18-Mar-08 5:54 
GeneralRe: data base or file Pin
Dave Kreskowiak18-Mar-08 8:54
mveDave Kreskowiak18-Mar-08 8:54 
Questionplz help with datetime stored procedure in vb.net Pin
saša198318-Mar-08 4:45
saša198318-Mar-08 4:45 
GeneralRe: plz help with datetime stored procedure in vb.net Pin
Guffa18-Mar-08 6:51
Guffa18-Mar-08 6:51 
Questionreceive data from microcontroller(CPLD coolrunner II) Pin
Beginner KS18-Mar-08 4:41
Beginner KS18-Mar-08 4:41 
GeneralRe: receive data from microcontroller(CPLD coolrunner II) Pin
Dave Kreskowiak18-Mar-08 8:57
mveDave Kreskowiak18-Mar-08 8:57 
QuestionRe: receive data from microcontroller(CPLD coolrunner II) Pin
khaiseng18-Mar-08 12:38
khaiseng18-Mar-08 12:38 
GeneralRe: receive data from microcontroller(CPLD coolrunner II) Pin
Luc Pattyn18-Mar-08 12:44
sitebuilderLuc Pattyn18-Mar-08 12:44 
GeneralRe: receive data from microcontroller(CPLD coolrunner II) Pin
khaiseng18-Mar-08 22:03
khaiseng18-Mar-08 22:03 
GeneralVBA Help Needed Pin
Brendan Vogt18-Mar-08 0:13
Brendan Vogt18-Mar-08 0:13 
QuestionRe: VBA Help Needed Pin
Brendan Vogt18-Mar-08 2:11
Brendan Vogt18-Mar-08 2:11 
GeneralVB.NET MySQL Pin
Socheat.Net17-Mar-08 22:44
Socheat.Net17-Mar-08 22:44 
GeneralRe: VB.NET MySQL Pin
Christian Graus17-Mar-08 22:50
protectorChristian Graus17-Mar-08 22:50 

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.