Re: Server.URLEncode :-(
From: Aaron Bertrand [MVP] (aaron_at_TRASHaspfaq.com)
Date: 03/18/04
- Next message: Aaron Bertrand [MVP]: "Re: 404 Error reveals ASP code"
- Previous message: Peter Foti: "Re: Parsing a string"
- In reply to: Peter Foti: "Re: Server.URLEncode :-("
- Next in thread: Fawke101: "Re: Server.URLEncode :-("
- Reply: Fawke101: "Re: Server.URLEncode :-("
- Messages sorted by: [ date ] [ thread ]
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). > >
- Next message: Aaron Bertrand [MVP]: "Re: 404 Error reveals ASP code"
- Previous message: Peter Foti: "Re: Parsing a string"
- In reply to: Peter Foti: "Re: Server.URLEncode :-("
- Next in thread: Fawke101: "Re: Server.URLEncode :-("
- Reply: Fawke101: "Re: Server.URLEncode :-("
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
Loading