|
-
Jun 24th, 2004, 04:18 AM
#1
WebServices question. Sould be yes or no answer...I think.
I have a web service. This has a function called Fetch. This function returns a dataset of data that has been taken from a DB table.
Now if this is a few records then this takes a few ms. But if it's about 2-4 meg of data then this function takes quite a bit of time as it has to "collect it slowly"/"get it" over the LAN.
What I want to know is, is there a way to monitor how much data has been retrieved as I would like to have a prog bar on a form.
is this possible?
Woof
-
Jun 24th, 2004, 06:50 AM
#2
Hyperactive Member
The short answer is no, it's not possible because in order to notify your client that a given amount of progress has been made, you would need to be able to raise events. This cannot be done with a web service. There may be some creative ways around this such as placing your function call in a separate thread and then creating another function that gathers the amount of progress made and returning it to the client.
I feel your pain, I have spent several weeks on just this type of problem. I have a workable solution, but it's not a web service, I ended up creating a remote component on the server and having that raise events to all "Logged in" clients.
If you want more detail just ask
-
Jun 24th, 2004, 07:23 AM
#3
More detail 
WEoof
-
Jun 24th, 2004, 11:36 PM
#4
All Web service methods are natively Asynchronous thanks to the IDE and the wrapper class it creates. The problem really is there is no way to get progress from the default delegate it creates. If you don't mind faking progress then you can increment a progress every couple of seconds to show progress although there is no way to tell total number of bytes or the current byte count. It only tells you when its done.
To revist the previous Woka client example I did I have added an async call to get the dataset and beefed up the size of the dataset. It still runs fast for me since I'm local but it should be a decent example - providing you don't mind faking progress.
I beefed up the dataset data even more on the actual web service I'm running too. So the file on the actual web server is 911K so you know for testing.
Last edited by Edneeis; Jun 24th, 2004 at 11:41 PM.
-
Jun 25th, 2004, 03:20 AM
#5
Thank you very much 
Gonna have a look at it now while suffering a bad hangover and the sorrow of being knocked out of Euro 2004 by Portugal 
*sulks*
Woka
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|