This is a discussion on Behaviour of OpenDatabase method when SQL Server is shut down within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> Here is the sequence (using DAO and connecting to SQL Server with ODBC): 1) SQL server is running. 2) ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Here is the sequence (using DAO and connecting to SQL Server with ODBC): 1) SQL server is running. 2) OpenDatabase() works great. 3) Stop SQL Server. 4) OpenDatabase() still works and shows no error. 5) Restart the application, the method throws the error. Perhaps the method picks up the info from the local cache. This is related to DBEngine session which is created per application instance. Now how to ensure that this method throws an error while the server is down? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
| |||
| Thanks Mary for writing. Well... the question is how to get this list of open connections so that these can be closed before the OpenDatabase() call. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
| ||||
| It depends on how you're opening the connections now. If you're creating linked tabledef objects, then you need to delete them. If you have a global connection object, then you need to close/dispose it and set the variable to nothing. -- Mary Microsoft Access Developer's Guide to SQL Server http://www.amazon.com/exec/obidos/ASIN/0672319446 On Thu, 18 Sep 2003 04:03:20 -0700, Achal Bhargava <achalbhargava@yahoo.co.in> wrote: >Thanks Mary for writing. Well... the question is how to get this list of >open connections so that these can be closed before the OpenDatabase() >call. > > > >*** Sent via Developersdex http://www.developersdex.com *** >Don't just participate in USENET...get rewarded for it! |