By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,456 Members | 1,505 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,456 IT Pros & Developers. It's quick & easy.

Program Logic Question

P: n/a
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
calls.

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

Jul 19 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
"Derek Timothy" <de***@leonas.demon.co.uk> wrote in message
news:en**************@TK2MSFTNGP10.phx.gbl...
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
calls.

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


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
http://www.LbeHelpdesk.com - Help Desk software at affordable prices
http://www.free-helpdesk.com - Completely free help desk software !
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook
http://www.lbesync.com - Synchronize two Outlook Personal Folders

Jul 19 '05 #2

P: n/a
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.

hth,
Andrew

* * * Sent via DevBuilder http://www.devbuilder.org * * *
Developer Resources for High End Developers.
Jul 19 '05 #3

P: n/a
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
"John Blessing" <ntlnews@**REMOVETHIS**lbehelpdesk.com> wrote in message
news:24**************@newsfep4-winn.server.ntli.net...
"Derek Timothy" <de***@leonas.demon.co.uk> wrote in message
news:en**************@TK2MSFTNGP10.phx.gbl...
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
calls.

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


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
http://www.LbeHelpdesk.com - Help Desk software at affordable prices
http://www.free-helpdesk.com - Completely free help desk software !
http://www.lbetoolbox.com - Remove Duplicates from MS Outlook
http://www.lbesync.com - Synchronize two Outlook Personal Folders

Jul 19 '05 #4

P: n/a
Andrew,

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

All the best,
Derek

"Andrew Durstewitz" <ad******@devbuilder.org> wrote in message
news:3f*********************@news.frii.net...
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.

hth,
Andrew

* * * Sent via DevBuilder http://www.devbuilder.org * * *
Developer Resources for High End Developers.

Jul 19 '05 #5

P: n/a
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
server....

tim
"Derek Timothy" <de***@leonas.demon.co.uk> wrote in message
news:en**************@TK2MSFTNGP10.phx.gbl...
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
calls.

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


Jul 19 '05 #6

P: n/a
Tim,

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

TIA,
Derek

"Tim Williams" <sa******@pacbellremovethis.net> wrote in message
news:eC**************@TK2MSFTNGP10.phx.gbl...
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
server....

tim
"Derek Timothy" <de***@leonas.demon.co.uk> wrote in message
news:en**************@TK2MSFTNGP10.phx.gbl...
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
calls.

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



Jul 19 '05 #7

P: n/a
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.

eg:

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


"Derek Timothy" <de***********@bull.co.uk> wrote in message
news:uk**************@tk2msftngp13.phx.gbl...
Tim,

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

TIA,
Derek

"Tim Williams" <sa******@pacbellremovethis.net> wrote in message
news:eC**************@TK2MSFTNGP10.phx.gbl...
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
server....

tim
"Derek Timothy" <de***@leonas.demon.co.uk> wrote in message
news:en**************@TK2MSFTNGP10.phx.gbl...
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 calls.

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




Jul 19 '05 #8

P: n/a
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
"Tim Williams" <sa******@pacbellremovethis.net> wrote in message
news:#k**************@TK2MSFTNGP12.phx.gbl...
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.

eg:

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


"Derek Timothy" <de***********@bull.co.uk> wrote in message
news:uk**************@tk2msftngp13.phx.gbl...
Tim,

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

TIA,
Derek

"Tim Williams" <sa******@pacbellremovethis.net> wrote in message
news:eC**************@TK2MSFTNGP10.phx.gbl...
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
server....

tim
"Derek Timothy" <de***@leonas.demon.co.uk> wrote in message
news:en**************@TK2MSFTNGP10.phx.gbl...
> 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 > calls.
>
> 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
>
>
>
>
>



Jul 19 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.