Writing form output to file

Discussion in 'ASP General' started by Ken, Aug 21, 2003.

  1. Ken

    Ken Guest

    Hi ,

    I need to be able to write results from a form picklist to a file. I know I
    can append the output at the end of the file but is there a way to add the
    output to a certain place in the file. i.e
    Form output = PM.
    Here is file sample that needs to be written to.
    Session("dbFields") = "*"
    Session("dbRs") = "Action"
    Session("dbWhere") = "Category_Code=' This is where PM needs to be ' AND
    Current_Status='Open'"
    Session("dbGroupBy") = ""
    Session("dbOrderBy") = "ID"

    Thanks
    Ken
    Ken, Aug 21, 2003
    #1
    1. Advertising

  2. Ken

    Alan Guest

    I don't know what your code below has to do with a file but can you can
    store a placeholder in your file/variable and use replace:

    ....
    Session("dbWhere") = "Category_Code='@FORMVAR@' AND Current_Status='Open'"
    ....
    Dim FormVar
    FormVar = Request.Form("AmPm")
    Session("dbWhere") = Replace (Session("dbWhere"), "@FORMVAR@", FormVar)
    ....

    Give that a go.

    Alan


    "Ken" <> wrote in message
    news:uvyzEL#...
    > Hi ,
    >
    > I need to be able to write results from a form picklist to a file. I know

    I
    > can append the output at the end of the file but is there a way to add the
    > output to a certain place in the file. i.e
    > Form output = PM.
    > Here is file sample that needs to be written to.
    > Session("dbFields") = "*"
    > Session("dbRs") = "Action"
    > Session("dbWhere") = "Category_Code=' This is where PM needs to be ' AND
    > Current_Status='Open'"
    > Session("dbGroupBy") = ""
    > Session("dbOrderBy") = "ID"
    >
    > Thanks
    > Ken
    >
    >
    Alan, Aug 21, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lily
    Replies:
    1
    Views:
    632
    Amontec Team
    May 19, 2004
  2. HNguyen
    Replies:
    4
    Views:
    2,385
    HNguyen
    Dec 21, 2004
  3. icedragon
    Replies:
    0
    Views:
    636
    icedragon
    Jul 13, 2010
  4. drew
    Replies:
    6
    Views:
    166
  5. Mav
    Replies:
    22
    Views:
    356
Loading...

Share This Page