Hi there,
I have a ASP/SQL 7 application that displays data from various SQL7 Views
onto a ASP page.
A column of this data is displayed in ASP as hyperlinks and the relevent
data is put into a URL query string - so that the linked page is based on
this data ( a kind of "drill-down" effect) -
***
PAGE1.asp
<%Dim RS
Set RS = DataConnection. Execute("SELECT col1, col2, col3 FROM view1 WHERE
view1.col4='" & Session("listbo x1") & "'")
do until RS.EOF
%>
<a href= "PAGE2.asp?col1 =<% =RS("col1")%>"> <% =RS("col1")%></a>
............... ......and so on
***
***
PAGE2.asp
Set RS = DataConnection. Execute("SELECT col1, col2, col3 FROM view2 WHERE
view2.col4='" & request.queryst ring("col1") & "'")
do until RS.EOF
............... ......you get the idea
***
The problem is that a few entries in "col1" contain an apostrophy ( ' )
which results in a bad syntax error upon clicking the hyperlink. How can i
avoid this? without changing the SQL side of things or entering another
column into the querystring?
Any ideas much appreciated.
Thanks in advance
--
F
Please remove ANTI and SPAM from my
email address before sending me an email.
I have a ASP/SQL 7 application that displays data from various SQL7 Views
onto a ASP page.
A column of this data is displayed in ASP as hyperlinks and the relevent
data is put into a URL query string - so that the linked page is based on
this data ( a kind of "drill-down" effect) -
***
PAGE1.asp
<%Dim RS
Set RS = DataConnection. Execute("SELECT col1, col2, col3 FROM view1 WHERE
view1.col4='" & Session("listbo x1") & "'")
do until RS.EOF
%>
<a href= "PAGE2.asp?col1 =<% =RS("col1")%>"> <% =RS("col1")%></a>
............... ......and so on
***
***
PAGE2.asp
Set RS = DataConnection. Execute("SELECT col1, col2, col3 FROM view2 WHERE
view2.col4='" & request.queryst ring("col1") & "'")
do until RS.EOF
............... ......you get the idea
***
The problem is that a few entries in "col1" contain an apostrophy ( ' )
which results in a bad syntax error upon clicking the hyperlink. How can i
avoid this? without changing the SQL side of things or entering another
column into the querystring?
Any ideas much appreciated.
Thanks in advance
--
F
Please remove ANTI and SPAM from my
email address before sending me an email.
Comment