R
Rob
Rather new to vb.net...
I am wondering if the following is possible and sounds reasonable...
Can connection objects and datasets be defined once (at program load) and be
available for the life of the program ? Posssible ? Bad idea ? Over
simplistic ?
Regarding Connections...
I am not saying that the conncetion should be left open, just defined... in
other words, have it such that...
When Program loads...
Public strConn as String = "define the cnn here"
Public cnn as New SqlConnection(strConn )
When I want to use the connection...
cnn.Open()
' Do whatever
cnn.Close()
Does Auto garbage collection destroy cnn periodically ?
Regarding Datasets....
Also, may I establish a dataset in the same manner ?
Let's say I have 4 forms that use the same data set in the sasme program....
may I just establish it once, fill it, then use the data from that "fill" on
several forms ? Maybe have a button that would "re-fill" it upon a user's
request ? Would user changes to data within the dataset synch across all
the forms as well since it is the same data set (object) ?
Thanks
I am wondering if the following is possible and sounds reasonable...
Can connection objects and datasets be defined once (at program load) and be
available for the life of the program ? Posssible ? Bad idea ? Over
simplistic ?
Regarding Connections...
I am not saying that the conncetion should be left open, just defined... in
other words, have it such that...
When Program loads...
Public strConn as String = "define the cnn here"
Public cnn as New SqlConnection(strConn )
When I want to use the connection...
cnn.Open()
' Do whatever
cnn.Close()
Does Auto garbage collection destroy cnn periodically ?
Regarding Datasets....
Also, may I establish a dataset in the same manner ?
Let's say I have 4 forms that use the same data set in the sasme program....
may I just establish it once, fill it, then use the data from that "fill" on
several forms ? Maybe have a button that would "re-fill" it upon a user's
request ? Would user changes to data within the dataset synch across all
the forms as well since it is the same data set (object) ?
Thanks