It seems to me from looking at the code that propID is just a string:
"foo". That's not a query, and you have your return type set to
"query". Change your return type to "string" or "any" and the error
will go away.

Chris

On Nov 6, 2007 10:43 AM, Bruce Sorge <[EMAIL PROTECTED]> wrote:
> I have a CFC that both inserts a series of field variables and returns
> the ID number that was just created. I am getting an error that states
> "the value returned from the insertProposal function is not of type
> query". Here is the function:
>
> <cffunction name="insertProposal" access="public" returntype="query">
>         <cfargument name="BidType" type="string" required="yes">
>         <cfargument name="Number" type="string" required="yes">
>         <cfargument name="Description" type="string" required="yes">
>         <cfargument name="Contact_Name" type="string" required="yes">
>         <cfargument name="Contact_Phone" type="string" required="yes">
>         <cfargument name="Contact_Email" type="string" required="yes">
>         <cfargument name="Job_Walk_Date" type="string" required="yes">
>         <cfargument name="Job_Walk_Time" type="string" required="yes">
>         <cfargument name="Status" type="numeric" required="yes">
>         <cfargument name="Create_Date" type="date" required="yes">
>         <cfargument name="Create_Time" type="string" required="yes">
>         <cfset propID="foo">
>             <cfstoredproc procedure="pr_InsertRFP"
> datasource="#Request.dsn#">
>                 <cfprocparam cfsqltype="cf_sql_varchar"
> dbvarname="BidType" type="in" value="#Arguments.BidType#">
>                 <cfprocparam cfsqltype="cf_sql_varchar"
> dbvarname="Number" type="in" value="#Arguments.Number#">
>                 <cfprocparam cfsqltype="cf_sql_longvarchar"
> dbvarname="Description" value="#Arguments.Description#">
>                 <cfprocparam cfsqltype="cf_sql_varchar"
> dbvarname="Contact_Name" type="in" value="#Arguments.Contact_Name#">
>                 <cfprocparam cfsqltype="cf_sql_varchar"
> dbvarname="Contact_Phone" type="in" value="#Arguments.Contact_Phone#">
>                 <cfprocparam cfsqltype="cf_sql_varchar"
> dbvarname="Contact_Email" type="in" value="#Arguments.Contact_Email#">
>                 <cfprocparam cfsqltype="cf_sql_date"
> dbvarname="Job_Walk_Date" type="in" value="#Arguments.Job_Walk_Date#">
>                 <cfprocparam cfsqltype="cf_sql_time"
> dbvarname="Job_Walk_Time" type="in" value="#Arguments.Job_Walk_Time#">
>                 <cfprocparam cfsqltype="cf_sql_integer"
> dbvarname="Status" type="in" value="#Arguments.Status#">
>                 <cfprocparam cfsqltype="cf_sql_date"
> dbvarname="Create_Date" type="in" value="#Arguments.Create_Date#">
>                 <cfprocparam cfsqltype="cf_sql_time"
> dbvarname="Create_Time" type="in" value="#Arguments.Create_Time#">
>             </cfstoredproc>
>         <cfreturn propID>
>     </cffunction>
>
> When I run the page, the insert query works. I captured the SP in SQL
> Profiler, copied it into a new query in SQL Server Manager, and it
> inserts the information and returns the newly created ID as it should,
> so I am baffeled. Perhaps I need another pair of eyes to see what might
> end up being a glaringly obvious error on my part.
>
> Thanks,
>
> Bruce
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292772
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to