Try
http://www.berezniker.com/display/VFP/Windows+Service+Status>OK, I guess now that I think of it, what I also need is a function that tells me if I can "see" the server right now, before I attempt to connect to it, so I can write code to warn the user that either they are not "on" the network or the server PC is "not available".
>
>I tried a simple function in FoxPro, ADIR() like this:
>
>m.nfiles = ADIR(aTempArray,"\\SQLSERVER01") but this doesn't work. Is there another approach that works?
>
>(I tried ANETRESOURCES() but realized that it wouldn't help if no "shares" where created on the SQL Server) and it may to tell me if the server was available...
>
>Thanks!!
>
>
>>>Is there a function or something that I can use to test for the existence of a SQL Server?
>>>
>>>For example, is there something like this:
>>>
>>>m.ifServerExist = SOMEFUNCTION("ABC_SQL01")
>>>
>>>&& Where ABC_SQL01 = the DNS name or IP address of the server.
>>>
>>>Thanks!!
>>
>>Check
List of SQL Servers Thread #
779753.
If it's not broken, fix it until it is.
My Blog