Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2002

    Unanswered: HOWTO Run a Query asynchronously

    Is there a possibility to execute a Query (with browsable recordsets after opening) asynchronously?

    E.g. something like ...
    while not rs.complete
    response.write "Opening..."
    and then...
    while not rs.eof
    response.write rs("id") & "<br>" & vbcrlf

    I know that I can do that trough "...",3,1,16
    and loop trough the rs.state afterwards - the problem is that IIS freezes until that query has finished, whatever I do...

    Is there another possibility than to schedule snapshot-table-creator on sql?

    thanks for any post!!
    best regards
    Last edited by coroner; 07-09-03 at 10:01.

  2. #2
    Join Date
    Feb 2002
    San Francisco, CA
    I don't belive so, but I may be wrong...I have never come accross it or ever really needed it.

    With regards to scheduling a snapshot-table-creator on sql?

    Firstly I take it you mean in Microsoft SQL Server, not in SQL?

    If you do I guess you can. I know that you should be able to do this in Oracle with a DBMS_job and some PL/SQL code - it should be fairly easy. I don't really know how I would do it in Microsoft SQL Server, but I am sure it can be done, just schedule a job (I know you can do this) and write some code to create/populate a tempory table every now and then.

    NB, you will probably need to have two tempory tables, being pointed at by a view (that shows all the records from one); this will allow your code to update one table, whilst still allowing the data in the other to be read from, once the table is updated the view would be changed to point to the updated table. If you don't do this, you will have to find a solution for the senario of someone requesting a page/doing something which used that table (which could be empty/locked etc)...

  3. #3
    Join Date
    Jul 2002
    Hello Russel,
    Im doint it trough hourly generated tables currently (as a step to the perfect solution ).

    I just meant - is there no possibility to stop IIS from working on ASPS while doint a

    E.g. if I'm waiting in the original loop until rs.state=4, no other ASP page will work - everything freezes until the long-query-asp is finished...

    Best Regards...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts