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