' use request.querystring to pass the ID
' number from the previous page to the
' sql statement so we get the right record
Cultivar = request.querystring ("ID")
' note how the Cultivar name is added to the sql
'sqlstmt = "SELECT * from Flowers WHERE Cultivar = 'Alaqua'"
sqlstmt = "SELECT * from Flowers WHERE Cultivar =" &[Cultivar]
rs.open sqlstmt, connectme
' now get all the variables from the database
The commented out sql statement works, the second one that attempts to use a variable does not.
The output of the response.writes are as follows:
response.write Cultivar should display the value in URL
And it does...
response.write sqlstmt should display the sql statement, and it does
SELECT * from Flowers WHERE Cultivar =Amadeus
I used the brackets since some of the Cultivar variables will contain a space. I had this working fine passing a number variable, but I can't make it work with text.