B
Brian P. Hammer
All,
I have a MDI application with 15 or so different forms. Each form connects
to the same SQL database via adodb. My question is, is it better to:
1. Just open the connection upon startup, then just reference the connection
throughout each form opening
2. Open and close each connection with the opening and closing of each MDI
form
3. Open and close the connection after each operation use such as load data,
save record and filtering
3. Create and new connection name for each MDI form
The problem as I see it, 1 could have many open connections to the SQL even
when the user doesn't need to be. 2. it gets very difficult to open and
close the connections going from form to form and threads.
I am not in the position to use the built in .Net data connections and
adapters, although I would love to in this app.
Any guidance would be great with this.
Thanks,
Brian
Public Const conData As String = "driver={SQL Server} and so on...."
Public cnnData As New Connection
cnnData.ConnectionTimeout = 10
cnnData.Open(conData)
I have a MDI application with 15 or so different forms. Each form connects
to the same SQL database via adodb. My question is, is it better to:
1. Just open the connection upon startup, then just reference the connection
throughout each form opening
2. Open and close each connection with the opening and closing of each MDI
form
3. Open and close the connection after each operation use such as load data,
save record and filtering
3. Create and new connection name for each MDI form
The problem as I see it, 1 could have many open connections to the SQL even
when the user doesn't need to be. 2. it gets very difficult to open and
close the connections going from form to form and threads.
I am not in the position to use the built in .Net data connections and
adapters, although I would love to in this app.
Any guidance would be great with this.
Thanks,
Brian
Public Const conData As String = "driver={SQL Server} and so on...."
Public cnnData As New Connection
cnnData.ConnectionTimeout = 10
cnnData.Open(conData)