Unix Technical Forum

Behaviour of OpenDatabase method when SQL Server is shut down

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) ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > MS SQL ODBC

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 07:23 PM
Achal Bhargava
 
Posts: n/a
Default Behaviour of OpenDatabase method when SQL Server is shut down

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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 07:23 PM
Achal Bhargava
 
Posts: n/a
Default Re: Behaviour of OpenDatabase method when SQL Server is shut down

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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 07:23 PM
Mary Chipman
 
Posts: n/a
Default Re: Behaviour of OpenDatabase method when SQL Server is shut down

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!


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:46 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com