472,342 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,342 software developers and data experts.

DAO OpenDatabase

Hi,

I'm opening a database using the following code:

Set m_dbDatabase = OpenDatabase("", False, False, strOdbc)

Works OK and connects to the database with no problem. If however
while I'm connected the connection is lost (i.e. the server goes down)
and I try to reconnect to the database using the above method I get
success even if the server is still down. But when I try and open a
recordet I get the error message "...closed/terminated".

It seems to me it is still using the previous connection, since the
OpenDatabase connection the second time around is instantaneous. I
have treied setting the database object, workspace object and even the
dbengine object to Nothing but has made no difference.

Has anyone any ideas why this is happening and how I can re-establish
a connection to the server?

Any help would be greatly appreciated.

Regards

Simon
Jul 17 '05 #1
0 9493

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: AR Hall | last post by:
This code goes through 3 work sheets in the same XL workbook, day, eve and night shift in each sheet their are columns representing production...
5
by: Les Desser | last post by:
Spent hours till I pinned down that on an XP machine the OpenDatabase method causes MDE creation to fail while a compile produces no error. A...
2
by: MLH | last post by:
Access tells me it can't find deadpest.mdb when ran. What's wrong?
2
by: Jozef | last post by:
Hello, I have a database that I have passworded. When I try to use OpenDatabase with the Connect parameter filled in, I keep getting "Not a...
4
by: kids_pro | last post by:
Hi there, I am using DAO to read data from MDB file I try the following command to open database. DBEngine dbEng = new DBEngineClass();...
0
by: mo. | last post by:
I need some help in accessing Jet database using DAO. I have just started to learn c# and am trying to rewrite a program I have in vb.net to c#....
1
by: Henry Stockbridge | last post by:
Hi, My computer just hiccuped, so if this went through already, my apologies. I am attempting to have a User access a report in a separate...
1
by: Sunray | last post by:
I have a form called the sales form and i have 2 sets of listboxes So what happens is. i add items form the bottom set of list boxes which are bound...
0
by: paulcybulski | last post by:
I am converting my VB 6 code which works fine with FoxPro2.5 to VB.NET...and I am unable to Open the database...I am pretty sure I have all the...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.