473,396 Members | 2,034 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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%2C+A%2ECMPL%5FFACILIT Y%.
How to get the SELECT without those hex value. THanks.
<FORM NAME='formname' METHOD=POST
ACTION='ExcelExport.asp?noIncludes=yes'>
<INPUT TYPE='Hidden' NAME='strSQL'
VALUE="<%=replace(server.urlencode(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!
Jul 19 '05 #1
3 3130
Why are you server.urlencoding it when you're not passing it through the
url? Just don't server.urlencode 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" <ew***@kmg.com> wrote in message
news:uQ**************@TK2MSFTNGP12.phx.gbl...
When I use the following to post my value, I got SQL like this:
SELECT+A%2ECMPL%5FFIELD%5FID%2C+A%2ECMPL%5FFACILIT Y%.
How to get the SELECT without those hex value. THanks.
<FORM NAME='formname' METHOD=POST
ACTION='ExcelExport.asp?noIncludes=yes'>
<INPUT TYPE='Hidden' NAME='strSQL'
VALUE="<%=replace(server.urlencode(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!

Jul 19 '05 #2
"eddie wang" <ew***@kmg.com> wrote in message
news:uQ**************@TK2MSFTNGP12.phx.gbl...
When I use the following to post my value, I got SQL like this:
SELECT+A%2ECMPL%5FFIELD%5FID%2C+A%2ECMPL%5FFACILIT Y%.
How to get the SELECT without those hex value. THanks.
Use HTMLEncode instead of URLEncode, since you're not writing a URL.


<FORM NAME='formname' METHOD=POST
ACTION='ExcelExport.asp?noIncludes=yes'>
<INPUT TYPE='Hidden' NAME='strSQL'
VALUE="<%=replace(server.urlencode(strsql),"'","`" )%>">
<tr><td BGCOLOR=E4E4E4 ID='bodytext' COLSPAN='8' align='center'><input
TYPE=SUBMIT value='export'></td></tr>
</form>


Try this:
<form name="formname" method="post" action="ExcelExport.asp?noIncludes=yes">
<input type="hidden" name="strSQL" value="<%=Server.HTMLEncode(strsql)%>">

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

Regards,
Peter Foti
Jul 19 '05 #3
Yes, server.urlencode is the problem. Thanks for the help!

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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Stephen Witter | last post by:
I have a multiple select list and I am trying to post to a page where I have no option to use the request.form or vbscript to iterate through the control. The page is a sql server reporting...
3
by: Matt | last post by:
The ASP page has a combo box with id list, and when user click the particular id, it will show the name in the text box. My attempt was when the user have event on combo box, it will call...
3
by: Tcs | last post by:
My backend is DB2 on our AS/400. While I do HAVE DB2 PE for my PC, I haven't loaded it yet. I'm still using MS Access. And no, I don't believe this is an Access question. (But who knows? I...
6
by: jjturon | last post by:
Can anyone help me?? I am trying to pass a Select Query variable to a table using Dlookup and return the value to same select query but to another field. Ex. SalesManID ...
11
by: pmarisole | last post by:
I am using the following code to split/join values in a multi-select field. It is combining all the values in All the records into one long string in each record in recordset. Example: I have a...
29
by: pb648174 | last post by:
I have the following basic statements being executed: Create a temp table, #TempPaging Insert Into #TempPaging (Col1, Col2) Select Col1, Col2 From SomeOtherTable Order By Col2, Col1 Select...
7
by: Steven Bethard | last post by:
I've updated PEP 359 with a bunch of the recent suggestions. The patch is available at: http://bugs.python.org/1472459 and I've pasted the full text below. I've tried to be more explicit about...
19
by: Steve | last post by:
ASP error number 13 - Type mismatch with SELECT...FOR UPDATE statement I got ASP error number 13 when I use the SELECT...FOR UPDATE statement as below. However, if I use SELECT statement without...
4
by: Ian Richardson | last post by:
Hi, The function I've put together below is a rough idea to extend a SELECT list, starting from: <body> <form name="bambam"> <select id="fred"> <option value="1">1</option> <option...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.