If I wrap a SQLConnection in a Using, should I close it or does the end using handle it?
using cn as new system.data.sqlclient.sqlconnection() cn.open '{do a bunch of other stuff with commands and datareaders here} cn.close 'Do I need this? end using
Exiting a using block calls .Dispose() on the object in question (
cnin your example) which for a SqlConnection will close the connection and any open resources.