Coldfusion converting varchar to nvarchar
I have a simple query that pulls one record from a table based on a varchar(50) uesrname:
select top 1 as hasunreadmessages
from usermessages um with (nolock)
left outer join iepreferral on iepreferral.iepcaseid = um.iepcaseid
where um.tousername = <cfqueryparam value="#client.userName#" CFSQLType="CF_SQL_VARCHAR">
and um.isread = 0
and um.isdeleted = 0
and isnull(iepreferral.isDeleted, 0) = 0
My database monitor reports the folowing every time this query is run:
This ad hoc statement had the following implicit conversions:
The variable @7246612 has a data type of nvarchar which caused implicit conversion on the column [um].[ToUserName] with the value N'testusername'.?>
This option in CF Administrator is NOT checked:String Format -- Enable High ASCII characters and Unicode for data sources configured for non-Latin characters
Why does CF send the parameter as NVARCHAR?
