views:

32

answers:

2

Hi all,

I am developing a project for one of my clients.

The project goes like this.

There is a client to a Webservice which inserts a command to database(Command is inserted through webservice to DB).

There is server application which reads the command and updates that the server has finished executing the command.

How can I notify the client application know that the command inserted is executed?

I thought of looping on client side and keep checking if command is executed. But not satisfied with that solution.

Can any one please suggest some other option?

Thanks,

A: 

You can make the web service code blocked until the command is finished. The client will call the web service in asynchronous manner and register to the event of CommandCompleted.

Itay
A: 

Can I ask why you're depending on a seperate server-application for database actions? Why don't you update the database from within the webservice.

Anyway, you could call the webservice asynchronous and wait, inside the webservice, for completion before raising the commandcompleted event or wait, inside the webservice, for the completion and call the webservice synchronous.

One way or the other - when you're determined to wait for the command to complete, I'd wait for it inside the webservice, not from the client.

riffnl
The reason is Server executes the command what ever the client has put in the database. And there can be any number of clients.
Sandeep