can i open another connection within an open close conn?
Printable View
can i open another connection within an open close conn?
Reuse a closed connection? Yup you can, just change whatever property needs to be changed and .Open the connection.
What do you mean by a open close conn?Quote:
Originally posted by Goh
can i open another connection within an open close conn?
wat i mean is within an open conn1(load_form) and close conn1(unload_form) ,in between i open a new conn2 ..is it ok?
or can i reopen a conn (conn1) that is yet to close..?
Close it first before reopening
then can i : open conn1(load_form) and close conn1(unload_form) in between i open a new conn2 ..is it ok?
ie. 2 different conns..
if its 2 different connection objects then you can close open them independent of the status of the other.
There is no need for your connection to be constantly open.
Open it, use it, then close it.
In fact your recordsets, you don't even need a connection object.
VB Code:
Private Const CONN_STRING As String = 'your conn string to your DB Dim adoRec As Recordset Set adoRec = New Recordset With adoRec .Open "SELECT * FROM Users", CONN_STRING 'blah blah blah