get the select statement without hex value using post method

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • eddie wang

    get the select statement without hex value using post method

    When I use the following to post my value, I got SQL like this:
    SELECT+A%2ECMPL %5FFIELD%5FID%2 C+A%2ECMPL%5FFA CILITY%.
    How to get the SELECT without those hex value. THanks.


    <FORM NAME='formname' METHOD=POST
    ACTION='ExcelEx port.asp?noIncl udes=yes'>
    <INPUT TYPE='Hidden' NAME='strSQL'
    VALUE="<%=repla ce(server.urlen code(strsql),"' ","`")%>">
    <tr><td BGCOLOR=E4E4E4 ID='bodytext' COLSPAN='8' align='center'> <input
    TYPE=SUBMIT value='export'> </td></tr>
    </form>




    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • Ray at

    #2
    Re: get the select statement without hex value using post method

    Why are you server.urlencod ing it when you're not passing it through the
    url? Just don't server.urlencod e it.

    Also, instead of replacing ' with `, replace ' with ''. (That's two
    apostrophes.)


    If my name were Jim O'Brien, I'd be pretty irritated that I showed up as Jim
    O`Brien. Actually, I wouldn't be, because I would have died in a
    parachuting accident in the 80s, but that's beside the point.

    Ray at work

    "eddie wang" <ewang@kmg.co m> wrote in message
    news:uQ0DNzPwDH A.1196@TK2MSFTN GP12.phx.gbl...[color=blue]
    > When I use the following to post my value, I got SQL like this:
    > SELECT+A%2ECMPL %5FFIELD%5FID%2 C+A%2ECMPL%5FFA CILITY%.
    > How to get the SELECT without those hex value. THanks.
    >
    >
    > <FORM NAME='formname' METHOD=POST
    > ACTION='ExcelEx port.asp?noIncl udes=yes'>
    > <INPUT TYPE='Hidden' NAME='strSQL'
    > VALUE="<%=repla ce(server.urlen code(strsql),"' ","`")%>">
    > <tr><td BGCOLOR=E4E4E4 ID='bodytext' COLSPAN='8' align='center'> <input
    > TYPE=SUBMIT value='export'> </td></tr>
    > </form>
    >
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it![/color]


    Comment

    • Peter Foti

      #3
      Re: get the select statement without hex value using post method

      "eddie wang" <ewang@kmg.co m> wrote in message
      news:uQ0DNzPwDH A.1196@TK2MSFTN GP12.phx.gbl...[color=blue]
      > When I use the following to post my value, I got SQL like this:
      > SELECT+A%2ECMPL %5FFIELD%5FID%2 C+A%2ECMPL%5FFA CILITY%.
      > How to get the SELECT without those hex value. THanks.[/color]

      Use HTMLEncode instead of URLEncode, since you're not writing a URL.
      [color=blue]
      >
      >
      > <FORM NAME='formname' METHOD=POST
      > ACTION='ExcelEx port.asp?noIncl udes=yes'>
      > <INPUT TYPE='Hidden' NAME='strSQL'
      > VALUE="<%=repla ce(server.urlen code(strsql),"' ","`")%>">
      > <tr><td BGCOLOR=E4E4E4 ID='bodytext' COLSPAN='8' align='center'> <input
      > TYPE=SUBMIT value='export'> </td></tr>
      > </form>[/color]

      Try this:
      <form name="formname" method="post" action="ExcelEx port.asp?noIncl udes=yes">
      <input type="hidden" name="strSQL" value="<%=Serve r.HTMLEncode(st rsql)%>">

      Note, there's no need to replace ' with `, so don't.

      Regards,
      Peter Foti


      Comment

      • eddie wang

        #4
        Re: get the select statement without hex value using post method

        Yes, server.urlencod e is the problem. Thanks for the help!

        *** Sent via Developersdex http://www.developersdex.com ***
        Don't just participate in USENET...get rewarded for it!

        Comment

        Working...