Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Check a computer in LAN

Author  Topic 

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-06-25 : 05:20:08
Hi all!

Need a quickly working way to determine from VBA code is a LAN's computer active?
In Sub Form_Timer() each 3 sec I try to open recordset of a FoxPro linked table (just
for to check is it blocked or not?). All is OK till the computer is turned off. Then my
code drastically slows down (because of attempts of my computer to establish LAN
connection with another one on which the linked table resides).

Thanks

robvolk
Most Valuable Yak

15732 Posts

Posted - 2003-06-25 : 07:09:46
Ummmmm, why not just put the FoxPro database on a computer that never gets turned off? Even better, why not import the data into Access and use it as the standard for that data?

Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-06-25 : 07:39:41
Heh... C'est la vie... :)
Those Foxpro 2.0 tables are populated from a foxpro-based native 'ancient' *.exe program.
I just retrieve data from within my Access DB. A bit terrible combination. But it is
better than to start a rewriting that DOS-based program. :)

Thank you.

Go to Top of Page

MichaelP
Jedi Yak

2489 Posts

Posted - 2003-06-25 : 13:57:23
I think if you are using ADO to connect to the FoxPro tables, you could set your connection timeout to something really small (5 seconds or lower) and that should help you out methinks. I htink th edefault is 30 seconds. That's the "slowdown" you are seeing methinks. It tries for 30 seconds to connect, then fails, then returns.

Michael

<Yoda>Use the Search page you must. Find the answer you will.</Yoda>
Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-06-25 : 17:56:24
Hm... interesting... thank you, Michael. Yet I use something like this (Access 97):

Dim rs as DAO.Recordset
Set rs=CurrentDB.OpenRecordset("FoxPro Linked Table")
...
...
I thought this connection timeout should be decreased somewhere
in Windows registry. Yet when the remote computer is turned off
and you try to open a linked table just clicking on its icon in DB
window then Access sends 'Path not found' message pretty quickly.

Go to Top of Page

MichaelP
Jedi Yak

2489 Posts

Posted - 2003-06-25 : 18:12:56
Oh, it's a linked table into access and you connect with DAO.

I could not find any way to set the connection timeout programatically with a Linked Table in Access.

I don't think there's a "non-blocking" call that you can do in VBA that will satisfy your requirements. You need a "Ping" method or something, and I'm pretty sure VBA does not have PING. You could maybe write / buy a COM DLL that would ping that server.

Sorry Man!

Michael

<Yoda>Use the Search page you must. Find the answer you will.</Yoda>
Go to Top of Page

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-06-26 : 04:12:04
I agree with you, Michael.

Luckily for me this feature in my DB is not crucial at all.
So, I just can easily throw it away (and not write DLL). :)

Go to Top of Page
   

- Advertisement -