J
jim corey
I inherited some code that looks like this:
mConnection = New OdbcConnection(GetConnectionString())
mConnection.Open()
mAdapter.SelectCommand.Connection = mConnection
'Can execute reader or execute nonquery
mAdapter.Fill(mDataSet, mTable)
...
mConnection.Dispose()
I've just read here that the adapter will handle the opening and
closing of the connections.
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=OZDN7OmwCHA.968@TK2MSFTNGP12
My assumption is that the code above is still just opening one
connection, so that's there no real need to change it.
Is this correct?
TIA,
Jim
mConnection = New OdbcConnection(GetConnectionString())
mConnection.Open()
mAdapter.SelectCommand.Connection = mConnection
'Can execute reader or execute nonquery
mAdapter.Fill(mDataSet, mTable)
...
mConnection.Dispose()
I've just read here that the adapter will handle the opening and
closing of the connections.
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=OZDN7OmwCHA.968@TK2MSFTNGP12
My assumption is that the code above is still just opening one
connection, so that's there no real need to change it.
Is this correct?
TIA,
Jim