Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Jorrel Detaunan
  Where is Jorrel Detaunan?
 Las Piñas
 Philippines
 Jorrel Detaunan
 To: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
 Tags
Subject: RE: VFP9 Ping, MySql ODBC Driver
Thread ID: 181730 Message ID: 182197 # Views: 39 # Ratings: 0
Version: Visual FoxPro 9 Category: Network and Computer Management
Date: Tuesday, July 08, 2008 3:45:47 AM         
   


> > Hello there! Can someone help me about pinging an ip address? im using MySQL as my backend but everytime the server is down, the MySQL ODBC connection settings always pop up. If i could just ping the ip address on the first place i could control the errors occuring. Or maybe to add additional control in the connection string to block the pop-up window.
> >
> > and one more thing... how can i check if the server is still active? Ex: I am connected to the server and suddenly the connetion broke.
> >
> > Thank you...
>
>
> Morning from Canada,
> If you need to ping an ip address to verify if the server
> is attached on your network the below code works as I am
> using it all the time.
>
>
* --- PingAPI.prg - Coded as a function.
> * --- Format : lIPthere=PingAPI("10.162.15.75")
> LPARAMETERS lChkIP
> DECLARE INTEGER GetRTTAndHopCount IN Iphlpapi;
> 		INTEGER DestIpAddress, LONG @HopCount,;
> 		INTEGER MaxHops, LONG @RTT
> 
> 	DECLARE INTEGER inet_addr IN ws2_32 STRING cp
> 
> 	LOCAL nHop, nRTT
> 	nIPDest = inet_addr(lChkIP) 
> 
> 	IF GetRTTAndHopCount(nIPDest, @nHop, 1, @nRTT) <> 0
> 		RETURN .T.
> 	ELSE
> 	    RETURN .F.
> 	ENDIF

>
>
> Pete "the IceMan", from the Great White North of Canada.



Thank you for helping me about the ping issues, but recently i have found a new and easier solution.

i just tried adding "OPTION=3" to my connection string, and here it goes:

Driver=MySQL ODBC 3.51 Driver;Server=TheIPAdd;Port=ThePort;Database=TheDatabase;User=Root;Password=Root;Option=3;

There ^_^. the mysql login window won't pop-up.

but pinging the server is more challenging, fun, exiting...
thnk again...



COMPLETE THREAD
VFP9 Ping, MySql ODBC Driver Posted by Jorrel Detaunan @ 7/5/2008 4:08:22 AM
RE: VFP9 Ping, MySql ODBC Driver Posted by Lyrad Bangoy @ 7/5/2008 4:38:24 AM
RE: VFP9 Ping, MySql ODBC Driver Posted by Eric den Doop @ 7/5/2008 7:56:26 AM
RE: VFP9 Ping, MySql ODBC Driver Posted by Lyrad Bangoy @ 7/5/2008 8:13:14 AM
RE: VFP9 Ping, MySql ODBC Driver Posted by Carlos Alloatti @ 7/7/2008 2:59:32 PM
RE: VFP9 Ping, MySql ODBC Driver Posted by Jorrel Detaunan @ 7/8/2008 3:43:57 AM
RE: VFP9 Ping, MySql ODBC Driver Posted by Pete Sass @ 7/7/2008 5:13:01 PM
RE: VFP9 Ping, MySql ODBC Driver Posted by Jorrel Detaunan @ 7/8/2008 3:45:47 AM
RE: VFP9 Ping, MySql ODBC Driver Posted by Patrick McGreevy @ 7/12/2008 4:39:33 AM
RE: VFP9 Ping, MySql ODBC Driver Posted by Pete Sass @ 7/16/2008 7:39:25 PM