URL Links and Dynamic SQL Statements

Results 1 to 2 of 2

Thread: URL Links and Dynamic SQL Statements

  1. #1
    Nadeem Aslam Guest

    Default URL Links and Dynamic SQL Statements

    Hello<BR><BR> iwould like to dynamically genrate an sql statement by obtaining paramters from the browser url. <BR><BR>ie browser url= http://www.xyz.com/index.asp?type=os&cat=rs<BR><BR>What i would like to do is extract the letter os an rs so i can use them in an sql query and return results according to this criteria.<BR><BR>But as the type and cat will be diffrent i would like to genrate the sql dynamically all i want to know is how to obtain the letters adn discard the rest of the url<BR><BR><BR>Thank you in advance

  2. #2
    Mike B Guest

    Default RE: URL Links and Dynamic SQL Statements

    In the file www.xyz.com/index.asp try using<BR><BR>request.querystring("type") to access the type value and<BR>request.querystring("cat") to access the cat value. You can then use those values to generate a sql statement which can then be submitted.<BR><BR>Note if you are doing this in client side code you must use <BR>&#060;%=request.querystring("type")%&#062; and<BR>&#060;%=request.querystring("rs")%&#062; so that the information is gotten from the server<BR><BR>Hope this helps<BR><BR>Mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts