Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

last line calling storedprocedure error?

Status
Not open for further replies.

idanner

Programmer
Aug 30, 2004
17
US
Can someone please help me with this code. My stored procedure works just fine when called inside the SQL Query Analyzer, but when i execute this code from inside a coldfusion page, I get an error for the last lines data type. It doesn't matter which line it is, it's always the last one with the error.All of the data types match the database data type. if you can understand what I'm saying, any help would be greatly appreciated.

Code:
<cfstoredproc procedure="Update_Employee" datasource="idannerDSN">
<cfprocparam cfsqltype="cf_sql_int" value="48" type="inout" variable="EmployeeID">
	 <cfprocparam cfsqltype="cf_sql_varchar" value="#Form.Username#" type="inout" variable="Username">
	 <cfprocparam cfsqltype="cf_sql_varchar" value="#Form.Firstname#" type="inout" variable="Firstname">
	 <cfprocparam cfsqltype="cf_sql_varchar" value="#Form.Lastname#" type="inout" variable="Lastname">
	 <cfprocparam cfsqltype="cf_sql_varchar" value="#Form.title#" type="inout" variable="title">
	 <cfprocparam cfsqltype="cf_sql_numeric" value="#Form.Extension#" type="inout" variable="Extension">
	 <cfprocparam cfsqltype="cf_sql_varchar" value="#Form.Homephone#" type="inout" variable="Homephone">
	 <cfprocparam cfsqltype="cf_sql_varchar" value="#Form.Cellphone#" type="inout" variable="Cellphone">
	 <cfprocparam cfsqltype="cf_sql_varchar" value="#Form.Pager#" type="inout" variable="Pager">	 
	 <cfprocparam cfsqltype="cf_sql_varchar" value="#Form.Username#" type="inout" variable="Password">
	 <cfprocparam cfsqltype="cf_sql_numeric" value="#FORM.officeID#" type="inout" variable="officeID">
	 <cfprocparam cfsqltype="cf_sql_numeric" value="#FORM.RightsID#" type="inout" variable="RightsID">
	 <cfprocparam cfsqltype="cf_sql_varchar" value="#FORM.Settings#" type="inout" variable="Screensaver">
</cfstoredproc>

[code]
 
Yeah, for some reason it always shows the last line as the one having the problem, even though it's not. What exactly is the error you're getting?

A couple of things to check:
1) Make sure the data being passed is the correct type (I think you've already done this)

2) Do you numeric values have decimals? If so, you have to add in your scale attribute.



Hope This Helps!

Ecobb
Beer Consumption Analyst

"My work is a game, a very serious game." - M.C. Escher
 
This is the error I get. I've checked and made sure all data types are the same.

Code:
Error Executing Database Query.  
[Macromedia][SQLServer JDBC Driver][SQLServer]Error converting data type varchar to int.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top