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:312670
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to