Re: Server.URLEncode :-(

From: Aaron Bertrand [MVP] (aaron_at_TRASHaspfaq.com)
Date: 03/18/04


Date: Thu, 18 Mar 2004 15:56:49 -0500

I think if Fawke101 were to use real column/parameter names instead of
kludging it up with this COL1/COL2 nonsense we'd get to the bottom of this a
lot quicker.

-- 
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Peter Foti" <peter@Idontwantnostinkingemailfromyou.com> wrote in message
news:105jum4k6j5jb6e@corp.supernews.com...
> "Fawke101" <guy@ANTIbradflack.SPAMcom> wrote in message
> news:ejFaFVRDEHA.2600@TK2MSFTNGP09.phx.gbl...
> > that doesnt work tho, it completely ignores it and still generates a '
> > i cant get this damn thing to work, its not your fault, im sure im doing
> > something wrong here.
> >
> > The page with the link (with the apostrophy) -
> > ****page1.asp****
> >
> > Function SQL_QUOTE (str)
> >  SQL_QUOTE = Replace(str,"'","''")
> > End Function
> >
> > Set RS = DataConnection.Execute("SELECT COL1, COL2 FROM view1 WHERE
> > view1.COL3='" & SQL_QUOTE(session("lstbox")) & "'")
> >
> > 'incorrect link looks like - St Mathew's - when clicked -
> >
> > <a href= "page2.asp?VALUE=<% =server.urlencode(RS("value1"))%>"><%
> > =RS("value1")%></a>
> >
> > ****************
> > Then on page2.asp
> >
> > Function SQL_QUOTE (str)
> >  SQL_QUOTE = Replace(str,"'","''")
> > End Function
> >
> > Set RS = DataConnection.Execute("SELECT COL1, COL2 FROM view2 WHERE
> > view1.COL3='" & SQL_QUOTE(request.querystring("value1")) & "'")
> > ****************
> > and so on like that.........................
>
>
> You're making this difficult to debug... which is the correct querystring
> variable name, "value" or "value1"?  On page1.asp you called it "value"
and
> on page 2 you are trying to reference "value1".  In addition, you used the
> fieldnames "COL1" and "COL2" in the query above that.  WHICH IS IT???
Also,
> your query on page2.asp is pulling from table "view2", but using a value
> from "view1"????  Are these cut and paste errors?
>
> Peter
> PS- Odd naming convention (giving the sql_quote function all uppercase
> letters... very strange).
>
>


Relevant Pages

  • Re: Server.URLEncode :-(
    ... > that doesnt work tho, it completely ignores it and still generates a ' ... > i cant get this damn thing to work, its not your fault, im sure im doing ... > Function SQL_QUOTE (str) ... fieldnames "COL1" and "COL2" in the query above that. ...
    (microsoft.public.inetserver.asp.general)
  • Re: Server.URLEncode :-(
    ... > that doesnt work tho, it completely ignores it and still generates a ' ... > Function SQL_QUOTE (str) ... and displays the entries (inc. the one with the apostrophy). ... > "Peter Foti" wrote in message ...
    (microsoft.public.inetserver.asp.general)
  • Re: cant get join on two large tables to use_nl or indexes
    ... In the mean time hear is the plan for the query. ... ccp is the ... and sid column is not a bitmap index. ... TABLE ACCESS OF STR (Cost=60153 Card=1293923 ...
    (comp.databases.oracle.misc)
  • Re: Server.URLEncode :-(
    ... > apostrophe. ... >> that doesnt work tho, it completely ignores it and still generates a ' ... >> Function SQL_QUOTE (str) ... >> from my email address before emailing me. ...
    (microsoft.public.inetserver.asp.general)
  • RE: Modifying/Appending Record Between Subforms
    ... left to a subform on the right I am not exactly sure what you are doing i am ... IF the record already exists in table B run Query Q_AddtoUIC_B ... Query Append Forms!MainForm!Subform2.UnboundUIC to table B's UIC), ... UIC, Para, Line, Auth Str, Req Str ...
    (microsoft.public.access.formscoding)

Loading