Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use Sql commands in Sql Server Procedure
Message
De
06/02/2005 09:12:29
 
 
À
06/02/2005 07:15:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
00984276
Message ID:
00984301
Vues:
22
Hi Abdulla

>is there any possible way to do the same checking and messaging from inside the procedure, rather than checking it from Vfp. Ie, like 'seek' command in Vfp, How will i use it in procedure for
>finding records.

Its really very different to VFP. In the code I gave you before, that effectively did the SEEK. It selected based on the lookup value. If it found something, it returned a record set containing a record. If it found nothing, then you have an empty record set. You test for that on the client side. As to the "messaging", you must remember that all off this activity is happening on the server, not the user's workstation. All, the server does in this scenario is pass back the dataset (or maybe a return value through an ouput parameter). If an error condition occured, then you can create custom error message in SQL server and raise them. However, not finding a record is not an error - its just a matter of fact <s>.

When you program in a client/server environment like this, the client application (Fox) can only respond to the result of the execution on the server. The server can do the SEEK but the client side application must react to the result and inform the user accordingly.

HTH

Regards,
-=Gary
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform