I'm creating an ASP site that accesses a database full of product descriptions, and this particular page shows all the products from a certain category. it doesn't work at the moment, because of something to do with the "WHEre Category=" part. The category names are in the format "13 - Tooling Storage Carts" when i start the page, i get an error message of either
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'Category=01 - Quick Disconnects'.
depending on the number of words in the category i send to the page.
here is the code:
Dim SQL, Connect, OnSubCat, ThisCategory, Query
Set Connect = Server.CreateObject("ADODB.Connection")
ThisCategory = Request.Querystring("Category_Name")
Query = "SELECT DISTINCT Sub_Category, Category FROM ItemMasterPriceData WHERE Category=" & ThisCategory & " "