Hi All,
The following link shows usage of ‘Using’ statement to declare SQLConnection.
http://msdn.microsoft.com/en-us/library/wydd5hkd.aspx
Can we use also use ‘Using’ statement to declare and dispose a DB2 Connection as well? We have a web application with huge number of users access it at the same time. The application brought down the database during its peak usage and we found that there we lot of open connections.
We are using IBM.Data.DB2.DB2Connection class to connect to DB2 database. Can ‘Using’ handle this DB2 Connection in the same way as SQLConnection as explained in the link above. Do we explicitly need to dispose the connection as we used to perform with try..catch..finally. Can we rely on ‘Using’ statement when we have large set of users requesting for connection simultaneously?
Please clarify.
Thanks,
Ramya