Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Help DAO with network database... :(

Posted on 2002-06-17
13
Medium Priority
?
794 Views
Last Modified: 2008-02-26

Hi,
I have the following problem. I'm using DAO to read a database that is shared on a PC featuring Windows NT 4.00; this only reads a database on a shared directory (network file system). I currently have to support this version (i.e. I can't use ADO or RDO...)
Now, I want to check for network problems. If I disconnect and re-connect the network cable, trying to access the database gives me an error. This error is managed in the error handler like this:

DBEngine.Idle
myDb.Close
set myDb = Nothing
set myDb = OpenDatabase( ... )

But this does not seem to work correctly. I still get the error 3043 "Disk or network error".
Any suggestion about this is greatly appreciated.... Please HELP ME I'm quite desperate :(

Thank you very much in advance.
Marco.
0
Comment
Question by:marconovaro
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
13 Comments
 
LVL 5

Expert Comment

by:rpai
ID: 7083910
Please maintain your open questions:-
Questions Asked 3
Last 10 Grades Given  
Question Grading Record 0 Answers Graded / 0 Answers Received
0
 
LVL 5

Expert Comment

by:rpai
ID: 7083915
0
 
LVL 6

Author Comment

by:marconovaro
ID: 7083925

Dear rpai,
thanks for the reply. I already checked it, and it's fine. Furthermore, I'm using VB6.0 enterprise...
For the open questions, I still didn't received any useful reply, that I can accept as as answer to them. That's why they are still open... :)
Regards
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 5

Expert Comment

by:rpai
ID: 7083964
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 7083991
Two things

1. have you tried to map the share path to a drive or using UNC

2. If the cable is disconnect and then reconnect, when you detect an error occur, try to only access the \\computername and then access the fullpath of database.

ie \\computername\...\mydb.mdb


0
 
LVL 6

Author Comment

by:marconovaro
ID: 7084034

Hi EDDYKT,
thanks for the reply. Answers:

1. the share is mapped as a UNC (\\server\...). Is there any difference using a drive?

2. In which way could I access the \\computername without accessing the database? Sorry if this is a stupid answer! ... Why should I do this, in your opinion?

Thanks again. I really appreciate your help.

P.S. rpai, yes, I checked also that MSKB article... Thanks
0
 
LVL 6

Author Comment

by:marconovaro
ID: 7084044

Hi EDDYKT,
thanks for the reply. Answers:

1. the share is mapped as a UNC (\\server\...). Is there any difference using a drive?

2. In which way could I access the \\computername without accessing the database? Sorry if this is a stupid answer! ... Why should I do this, in your opinion?

Thanks again. I really appreciate your help.

P.S. rpai, yes, I checked also that MSKB article... Thanks
0
 
LVL 6

Expert Comment

by:pierrecampe
ID: 7084646
if you disconnect the cable windows loses the connection to the shared drive/directory
if you reconnect the cable windows may take a long time to reconnect to the shared drive/directory
after reconnecting the cable can you see/access the shared drive/directory ?

0
 
LVL 6

Author Comment

by:marconovaro
ID: 7086138

Ok, here is more information on my system:

the client is talking to a ActiveX EXE on the server via DCOM. This periodically sends events to the client for it to know the network is good.
When the client doesn't receive an event (+ timeout), it blocks saying that the server is unreacheable. When the events are received again, the client restarts working.

When I restart working, I can see the shared directory. In fact if I close the client during the disconnection, and then I open it again, it works correctly. But, the problem arises when I try to "reopen" the database (as explained above).

Thanks to everybody for your contribution.
0
 
LVL 1

Expert Comment

by:Vinda
ID: 7087427
Try this, it worked for me atleast...

myDb.Close
set myDb = Nothing
DBEngine.Idle dbRefreshCache
set myDb = OpenDatabase( ... )

Even we are connecting to a network databse using a UNC path, and we passed the disconnect and re-connect network cable in our test lab.
0
 
LVL 6

Author Comment

by:marconovaro
ID: 7091856

Ok, I found myself the correct answer. Here it is, for everybody who may need it.
In the error handler, I put this code:

DBEngine.Idle dbRefreshCache
DoEvents
myDb.Close
set myDb = Nothing

set myDb = OpenDatabase( ... )
DBEngine.Idle dbRefreshCache
DoEvents

And this works fine! :)
The database was opened correctly, and all subsequent operations was successful.
Thanks to everybody for your replies.
Marco.
0
 

Accepted Solution

by:
ComTech earned 0 total points
ID: 7092481
This qustion will be placed in PAQ, as the answer has been found by User.

Regards,
ComTech
CS @ EE
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question