Off the top of my head...

   Is 'sold' a numerical field or a text?  Is ID a numerical field or a text field?  
You are referencing them both
as text fields.  Off the top of my head, I'd say remove the quotes from both of them, 
like this:

<cfquery name="" datasource="gunlist" dbtype="ODBC">
 UPDATE guns
 set    sold =1
 WHERE       (id =#id#)
</cfquery>


  Although it is not necessary from a theoretically standpoint, in practice most 
primary keys are numerical fields.



Joshua Tipton wrote:

> The id is being passed yet I am reciving the error below.  Can anyone tell
> me why.  My database id is set to auto number.
>
> Joshua Tipton
>
>  <a href="delete.cfm?id=#id#">Delete</a>
>
> <cfquery name="" datasource="gunlist" dbtype="ODBC">
> UPDATE guns
> set    sold = '1'
> WHERE       (id = '#id#')</cfquery>
>
> Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria
> expression.
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to