jasonkeller
Programmer
I have an Access database populated with information such as an autonumber,name,productid,category,subcategory.
I need to use a pull down on an admin page to select which category to edit. This is just my form for pulling up active categories. The User then selects from the list and submits. The next page populates all the products in that category. See the next code example
Admin Page
-----------------------------------------------------------
<form method="get" action="displaylist.cfm#category#">
<select name="category">
<cfoutput query="modify">
<option value="#category#">#category#</option></cfoutput>
</select>
<input type="SUBMIT" value="Edit Category">
-----------------------------------------------------------
Display Category Product List
-----------------------------------------------------------
<cfapplication name="dacategoryinquestion" sessionmanagement="Yes">
<cfif ParameterExists(URL.category) IS 'Yes'>
<cfset SESSION.dacategory = '#URL.category#'>
</cfif>
<CFQUERY NAME="all" DATASOURCE="mjgrant">
SELECT *
FROM products
WHERE category = #SESSION.dacategory#
</CFQUERY>
-------------------------------------------------------
I am getting a this error...
Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression
What am I missing.
I need to use a pull down on an admin page to select which category to edit. This is just my form for pulling up active categories. The User then selects from the list and submits. The next page populates all the products in that category. See the next code example
Admin Page
-----------------------------------------------------------
<form method="get" action="displaylist.cfm#category#">
<select name="category">
<cfoutput query="modify">
<option value="#category#">#category#</option></cfoutput>
</select>
<input type="SUBMIT" value="Edit Category">
-----------------------------------------------------------
Display Category Product List
-----------------------------------------------------------
<cfapplication name="dacategoryinquestion" sessionmanagement="Yes">
<cfif ParameterExists(URL.category) IS 'Yes'>
<cfset SESSION.dacategory = '#URL.category#'>
</cfif>
<CFQUERY NAME="all" DATASOURCE="mjgrant">
SELECT *
FROM products
WHERE category = #SESSION.dacategory#
</CFQUERY>
-------------------------------------------------------
I am getting a this error...
Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression
What am I missing.