carol
04-20-2003, 03:53 AM
Hi i would really appreciate any advice
I am trying to buid a site that uses a hyperlink combined with a query string to pass the information to another asp page
<a href = "showcase.asp?fldShowID=<% = oRS("fldShowID")%>">Veiw this showcase Item
Now this seems to be passing the item to the next asp page but i am using this code to try and access the fields i need by comparing the value of the fldShowID query string value to the Mysql database field of the same name
<% fldShowID = request.querystring("fldShowID")%>
<%dim sql
sql = "SELECT tblshowcase.fldShowID, tblshowcase.fldShowID, tblshowcase.fldShowDescription FROM tblshowcase"
sql = SQL & "WHERE fldShowID = ' " & fldShowID & " ' "
oRS.open sql ,CS %>
<%=oRS("fldShowName")%>
<% = oRS("fldShowDesc")%>
I am using a include file for the database connection that has been tested and works fine
oRS is the recordset
CS is the database connection
I have 2 questions:
First i would like to know as the database field is an autonumber of type int is a query string the right way to pass over the information. And if not how should it be done
Second i seem to have a syntax error in my where clause.(is that because of the query string i am using)
Any help would be greatly appreciated
I am trying to buid a site that uses a hyperlink combined with a query string to pass the information to another asp page
<a href = "showcase.asp?fldShowID=<% = oRS("fldShowID")%>">Veiw this showcase Item
Now this seems to be passing the item to the next asp page but i am using this code to try and access the fields i need by comparing the value of the fldShowID query string value to the Mysql database field of the same name
<% fldShowID = request.querystring("fldShowID")%>
<%dim sql
sql = "SELECT tblshowcase.fldShowID, tblshowcase.fldShowID, tblshowcase.fldShowDescription FROM tblshowcase"
sql = SQL & "WHERE fldShowID = ' " & fldShowID & " ' "
oRS.open sql ,CS %>
<%=oRS("fldShowName")%>
<% = oRS("fldShowDesc")%>
I am using a include file for the database connection that has been tested and works fine
oRS is the recordset
CS is the database connection
I have 2 questions:
First i would like to know as the database field is an autonumber of type int is a query string the right way to pass over the information. And if not how should it be done
Second i seem to have a syntax error in my where clause.(is that because of the query string i am using)
Any help would be greatly appreciated