Classic ASP BasicsFor beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
I have an ASP page in which I need to query an Access database for names. Below, I have the current query I'm using. Unfortunately, it doesn't work for names like O'Malley and D'Amour because I'm using the single-quote to separate my string values in the SQL string.
It's been a while since I've coded ASP and I've forgotten how to escape the ' character so that it will be able to go through the DB.
strSql = "Select * From Students Where FirstName='"&fName&"' AND LastName='"&lName&"'"