add the total from text fileRSS

4 replies

Last post Oct 04, 2004 10:20 AM by altafingar

  • add the total from text file

    Oct 01, 2004 12:04 PM|Altafingar|LINK

    I have text file created from my aspx page it looks something like this.. Skid Qty Part No: Date <= This is the column 2 1 s9876 sep/9 3 2 f9879 sep/9 2 2 w2134 sep/9 Now what i want to do is that i want to add the quantity of each skid e.g. add how many in skid 2 and how many in skid 3 i want to put this in counter so that if i add something in skid 2 in later it will add into what is the total in skid 2 from previous time... Thanks.
  • Re: add the total from text file

    Oct 01, 2004 04:04 PM|tomkmvp|LINK

    You could open the text file with the filesystemobject and read each line, using Split() to dump the text line into an array (with the space as a delimiter). The second member of each array would hold your Qty, so just add some more logic to add them up as each line of the text file is read. Any reason you can't use a database to store your data?
    Tom Kaminski (former IIS MVP 2002-2010)
    http://mvp.support.microsoft.com/
  • Re: add the total from text file

    Oct 01, 2004 04:08 PM|Altafingar|LINK

    thanks i can use database but how do i change it now and do i have to create the table structure? i guess i can use database.... how would i do it can you let me know... thanks.
  • Re: add the total from text file

    Oct 04, 2004 09:24 AM|tomkmvp|LINK

    Teaching you how to use a database is really beyond the scope of a forum like this. I would suggest finding a good database book ...
    Tom Kaminski (former IIS MVP 2002-2010)
    http://mvp.support.microsoft.com/
  • Re: add the total from text file

    Oct 04, 2004 10:17 AM|Altafingar|LINK

    thanks for replay but I have been using database for a long time.. i do know how to use it may be i did not explain you my question properly. Thanks.