Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Data type mismatch in criteria expression

$
0
0

Hey Folks. Having an issue with updating the database. here is the code plus error

 

--- UPDATE FUNCTION ---

<cfquery datasource="#APPLICATION.dataSource#">

UPDATE Company

SET CompanyName='#FORM.CompanyName#', Address='#FORM.Address#', City='#FORM.City#', Province='#FORM.Province#', Phone1='#FORM.Phone1#', Website='#FORM.Website#'

WHERE UserID=<cfqueryparam value="#SESSION.UserID#" cfsqltype="cf_sql_numeric">

AND CompanyID=<cfqueryparam value="#FORM.CompanyID#" cfsqltype="cf_sql_numeric">

</cfquery>

 

--- ERROR ---

Error Executing Database Query.
Data type mismatch in criteria expression.

The error occurred in C:\ColdFusion9\wwwroot\Companies\logged\companies\company_process.cfm : line 13

 

11 : Phone1='#FORM.Phone1#', Website='#FORM.Website#'
12 : WHERE UserID=<cfqueryparam value="#SESSION.UserID#" cfsqltype="cf_sql_numeric">
13 : AND CompanyID=<cfqueryparam value="#FORM.CompanyID#" cfsqltype="cf_sql_numeric">
14 : </cfquery>

 

VENDORERRORCODE 3079
SQLSTATE       
SQL UPDATE Company SET CompanyName='Paul's Place', Address='70 Nassau St', City='Toronto', Province='ON', Phone1='(876)-544-5768', Website=''
WHERE UserID= (param 1) AND CompanyID= (param 2)
DATASOURCE Business

 

I have used the cfqueryparam in another process page and it works fine, in fact the code is exact minus the table names and such. I ran a test to see what values comes up from the form and everythign is correct, even the userID and CompanyID come back with the correct numbers. So i'm not sure what it is. Hope someone can see something i don't.

 

Thanks


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>