Hi Larry, If you update the null attribute to be null="#NOT len(FORM.schol_type_id)#" then it'll dynamically work out whether to pass the value or not.
Oh, and you're welcome. Later, Niall. -----Original Message----- From: Larry Juncker [mailto:[EMAIL PROTECTED] Sent: 17 September 2008 15:05 To: CF-Talk Subject: RE: Error converting data type varchar to int. I got it.... <cftransaction> <cfstoredproc procedure="sp_schol_ins" datasource="profilesandgo"> <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbVarName="Name" value="#FORM.Sport#" null="No"> <cfprocparam type="In" cfsqltype="CF_SQL_INTEGER" dbVarName="Schol_Type_ID" value="" null="Yes" /> <cfprocparam type="In" cfsqltype="CF_SQL_INTEGER" dbVarName="Scholarships_UID" value="" null="Yes" /> <cfprocparam type="In" cfsqltype="CF_SQL_INTEGER" dbVarName="Academic_UID" value="" null="Yes" /> <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbVarName="TableName" value="#FORM.Sport#" null="No"> <cfprocparam type="In" cfsqltype="CF_SQL_INTEGER" dbVarName="Student_UID" value="#Form.Student_UID#" null="No"> <cfprocresult name="InsertSchol" resultset="1"> </cfstoredproc> </cftransaction> I had to add the empty cfprocparams for the fields and set them to null=yes Thanks for youyr help Larry -----Original Message----- From: Larry Juncker [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2008 8:51 AM To: CF-Talk Subject: RE: Error converting data type varchar to int. The only parts that are actually required is the scholid which is automatic..... Otherwise as an entry is made as in this case, we are only inserting three variables @student_UID @name @tablename Otherwise, all fields in the table are able to be null. Larry -----Original Message----- From: houseoffusion [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2008 8:42 AM To: CF-Talk Subject: RE: Error converting data type varchar to int. Hi Larry, You need to add a <cfprocparam> for every parameter as follows. So your parameters are: @name varchar(50) = NULL, @schol_type_id int = NULL, @scholarships_uid int = NULL, @academic_uid int = NULL, @tablename varchar(50) = NULL, @Student_UID int = NULL Therefore your call to the stored proc should be as follows: <cfstoredproc procedure="sp_schol_ins" datasource="profilesandgo"> <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbVarName="@Name" value="#FORM.Sport#" /> <cfprocparam type="In" cfsqltype="CF_SQL_INTEGER" dbVarName="@schol_type_id" value="#FORM.schol_type_id#" /> <cfprocparam type="In" cfsqltype="CF_SQL_INTEGER" dbVarName="@scholarships_uid" value="#FORM.scholarships_uid#" /> <cfprocparam type="In" cfsqltype="CF_SQL_INTEGER" dbVarName="@academic_uid" value="#FORM.academic_uid#" /> <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbVarName="@TableName" value="#FORM.Sport#" /> <cfprocparam type="In" cfsqltype="CF_SQL_INTEGER" dbVarName="@Student_UID" value="#Form.Student_UID#" /> <cfprocresult name="InsertSchol"> </cfstoredproc> I have assumed some FORM scope variables above for the missing parameters but this shouldn't be far off what you require in terms of calling the storedproc. If these are not all required then amend the code and the storedproc to suit. Later, Niall. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312677 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4