Don't quote the yes value.  It is a true false field.  Make yes the number 1
with no quotes for yes and 0 for no.  It may be a yes no field in access but
it works much better when you supply it a boolean value.

Kevin
----- Original Message -----
From: Harry Kurrosawa <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Sent: Sunday, October 29, 2000 8:42 PM
Subject: Datatype Mismatch in Access


> Hi,
>
> I'm wondering if anyone can help with this problem. Since I'm pretty new
to using ColdFusion with MS Access, I can't figure out why the following:
>
> <cfquery name="AddAccount" datasource="netinfhosts" debug="Yes">
> Insert into CompanyInfo (HostName, RoleContact, ContactName)
> Values('Host Test', 'Yes', 'Sales Manager')</cfquery>
>
> causes this error:
>
> ODBC Error Code = 22005 (Error in assignment)
> [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria
expression.
>
> The error occurred while processing an element with a general identifier
of (CFQUERY), occupying document position (10:4) to (10:67)
>
> I've rechecked my database, and the fields, HostName, RoleContact, and
ContactName, have been set as text(50), yes/no, and text(50) respectively.
Is there anything wrong with the SQL statements or was my database not set
up properly?
>
> Thanks,
>
> Harry
>
>
> _____________________________________________________________
>
>
>
> Half.com the hottest site for DVDs, CDs & more! Get $5 off your 1st
> purchase of $10 or more.
http://ads.adflight.com/mach1.asp?a=19061&b=46867&c=3094
>
> --------------------------------------------------------------------------
----------------------
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send
a message with 'unsubscribe' in the body to
[EMAIL PROTECTED]

------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to