Program Logic Question

Discussion in 'ASP General' started by Derek Timothy, Jun 30, 2003.

  1. Hello All,

    I have written a little VB program to send packets of data to my web server
    every 5 seconds in the form of a small csv file. The idea is to have a live
    (or almost live) "call status" web page running in ASP making use of the
    data in the csv file.

    So what I have done it to write a service in VB on the server that looks for
    the csv file every 5 seconds and if it is found it creates a new asp page
    with an autorefresh meta tag and copies it to wwwroot. It is virtually live
    and my manager from anywhere in the world can see the status of service

    I think it is a good idea but my programs hang after half an hour and I am
    beginning to wonder if I have some sort of locking issue or if I am going
    about this the right way.

    I had thought of scrapping the service part altogether and just using a
    single ASP page with an autorefresh that reads in the csv file data using
    the FileSystem object, but surely that could be at risk of locking problems
    as well (if the FTP were trying to overwrite the existing file, while the
    asp page is trying to read it). Perhaps not, I'm not sure. Really I'm just
    looking for re-assurance that my new idea will work before I go too far down
    the wrong path. If not, any other ideas or tips would be much appreciated.

    Best Regards,
    Derek Timothy, Jun 30, 2003
    1. Advertisements

  2. maybe a memory leak in your VB app? Task manager - Performance tab will
    show you if this is the case. Maybe the event log can tell you what is
    happening? Personally I would have chosen the .asp and filesystemobject
    route myself. Easy enough to tell if the file is locked for updating and try
    again later.

    John Blessing - Help Desk software at affordable prices - Completely free help desk software ! - Remove Duplicates from MS Outlook - Synchronize two Outlook Personal Folders
    John Blessing, Jul 1, 2003
    1. Advertisements

  3. I would agree, it sounds like you are using more and more memory without
    releasing it. If you are using array's and whatnot make sure to kill
    them once you are done with em.


    * * * Sent via DevBuilder * * *
    Developer Resources for High End Developers.
    Andrew Durstewitz, Jul 1, 2003
  4. John,

    Thanks for the reassurance, I'll check the vb app to make sure I destroy the
    objects cleanly and I'll give the ASP route a try.

    You mention that it is easy enough to check if the file is locked for
    update. Can you tell me how to check this?

    Many thanks in advance.
    Best Regards,
    Derek Timothy, Jul 1, 2003
  5. Andrew,

    Thanks for the tip. I'll check out the VB app and make sure I cleanly
    destroy the objects.

    All the best,
    Derek Timothy, Jul 1, 2003
  6. Derek Timothy

    Tim Williams Guest

    Are you sending too much data to just stuff it in a querystring and send it
    directly to an ASP page which can create the "static" page?
    That would save you from having to run another VB component on the

    Tim Williams, Jul 2, 2003
  7. Tim,

    I'm certainly not sending a lot of data and I hadn't considered this option,
    how would it work?

    Derek Timothy, Jul 2, 2003
  8. Derek Timothy

    Tim Williams Guest

    If you can just create a single string containing all of your data (joined
    with appropriate delimitors and urlencoded) then you can send it to your ASP
    page using the xmlhttp component and a GET request.


    GET: update.asp?info=blahblahblah

    the asp page just reformats the value of request.querystring("info") and
    using the FSO either overwrites the existing "static" page with the new info
    or overwrites an include file used in the static page. That way you don't
    need a component on the server.

    Tim Williams, Jul 2, 2003
  9. Tim,

    This is an excellent idea, I really hadn't thought of this. It would avoid
    me having to use the Internet Transfer control and FTP, it always seems a
    bit flakey. Thanks a lot for this suggestion, I'm going to give it a go.

    All the best,
    Derek Timothy, Jul 3, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.