Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to test for the existance of a SQL Server
Message
 
 
À
27/02/2007 15:50:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01199067
Message ID:
01199298
Vues:
18
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform