|
-
Aug 10th, 2004, 08:30 PM
#1
Thread Starter
New Member
ASP.NET - Wait for Db to Populate?
Hello all,
Here's the (relatively) short version. I have some ASP.NET intranet apps that i've made that interact with a 3rd party data system. After this datasystem is populated with a new "batch", the system then checks for any "alarms" and then (if there ARE any alarms) it puts in one or more records for this "batch" into an "alarms" table.
I'm not sure of any way of finding out when, exactly, the 3rd party system's processing is complete. For example, after populating a record into the database, I don't have any way of telling if there are any "alarms" or not unless I query the alarms table over and over again until either 1) I find a record that matches my criteria, or 2) some time elapses.
With VB.NET I can just do a thread.sleep for about 30 seconds after the population has been initiated and it is enough time for the3rd party system to fully do its thing. However, i cannot for the life of me figure out how to make an ASP.NET app pause for 30 seconds before continuing processing.
Thread.sleep in the ASP.NET app seems to do absolutely nothing.
Is there any way I can:
1) Implement some way of notifying my ASP app that the 3rd party system is done processing ? (runs on SQL Server which I have full access to)
or
2) Pause the ASP app after initiating the 3rd party population, and wait 30 seconds before continuing with my SQL query of the "alarms" table?
thanks........ (sorry this is so long!)
-
Aug 11th, 2004, 08:08 AM
#2
Retired VBF Adm1nistrator
1) If you can modify any of the SQL statements its running, then you can have it update some table upon completion. So your app would just keep checking if that table has been updated yet.
2) Either execute a seperate application (i.e. vb.net) to do it, or, send a piece of js to the client browser to refresh every 3..4..5 seconds or so. Each time the page is refreshed, check if the data's there or not.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Aug 11th, 2004, 09:14 AM
#3
Thread Starter
New Member
thanks plenderj, these are good suggestions.. i will check with the vendor about that ..
I'm not too well-versed on javascript, so i'd need to do a little digging on that one ... i'm using vb.net for asp.net apps within visual studio and i havnt been able to figure out exactly how to get javascript to interact in there..
thanks much
-
Aug 11th, 2004, 09:52 AM
#4
Retired VBF Adm1nistrator
Basically it would be on the html side of your aspx page.
So you would browse to the page the first time, and maybe authenticate or something like that, and then the app would check if the update is completed. If it isn't, then you sent to the client the html page but with a javascript refresh - or - easier still - a META refresh.
Look up on google for doing META refreshes.
Anyway. For each requery to your page, if the update is complete then carry on, otherwise send the client back the meta refresh.
You could have in the HTML something like an image that's scrolling or changing or something to make it look like your asp.net page is actively doing some work - when all its doing is checking every 5/10/15 seconds because the browser is requerying it
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
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
|