Jim,
That's why I have the routine. It lets me know if the server is available or not.
The first thing you need to know is if the user has access to the server. If not, then your code may crash. Even worse, you can't trap that error, it just shows up (since it is not a VFP error.)
Once you know if it is a connection problem or not, you can then figure out what you need to do to fix it.
But I am glad you found and have addressed the problem.
Take care,
Fletcher
-----Original Message----- From: profoxtech-bounces .AT. leafe .D.OT com [mailto:profoxtech-bounces@leafe.com] On Behalf Of Jim Winter Sent: Thursday, June 30, 2005 9:23 AM To: profoxtech .AT. leafe .D.OT com Subject: RE: Compiled EXE crashes attempting to access SQL Server
>I had a similar problem when the server was unavailable. There is code somewhere that uses windows api calls to check with the server to see if it is on line and available. If you can't find it here, let me know and I will see if I can dig it up for you.
>The problem is that the error occurs outside of VFP - ie from the ODBC driver, etc. So your standard error trap won't catch it, much less help you fix it.
>By querying the server directly, you can confirm that it is online and available and that the ODBC stuff is right - before VFP tries to use it.
Hi Fletcher,
Thanks for the reply. It turned out that the ODBC stuff wasn't even installed. Figured that out real quick when I started checking Bill's laundry list.
Regards, Jim
[excessive quoting removed by server]
©2005 Johnson, Fletcher S (N-Superior Technical Resources Inc.) |