Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having a problem passing a variable!

Status
Not open for further replies.

ydiduc1

Technical User
Jul 19, 2000
1
US
I have a opened table that was created from a SQL Query which when displayed has links that will open another page.<br>When the new page is displayed the URL has the correct info for the Vessel that I am looking for<br><br>/Reports/VesselHistory.asp?Vessel+Name=Paradise+2002<br><br>but I am having a problem passing it to the new SQL query for VesselHistory.asp and Vessel Name of Paradise 2002<br><br>Alan
 
you can use a form if you want, to submit it then use Request.Form(&quot;VariableName&quot;) to get it, also be sure to use the Server.URLEncode before appending it after the ?<br><br>the basic rules is that all Alphanumeric charaters remain the same, spaces are changed to + and anything else is represented by %XX where XX is the 2 digit (hex) ascii code.<br><br>URLEncode will change it for you, so that any problems will not occur. see if that helps. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
 
you have problem in passing the value to new asp page or generating sql statement with new value in VesselHistory.asp .<br><br>for fist karl replied.<br><br>suppose you have to make SQLStr in VesselHistory.asp <br><br>SQLStr = &quot;Select * from TABLENAME Where [Vessel Name] = '&quot; Request(&quot;Vessel Name&quot;) & &quot;'&quot;<br><br>it is always recomended name data field should be single word or more word with _<br><br>Hope this will solve your problem.<br><br>Anand
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top