cfgridbinding and storedprocedure
I am not able to use cfgrid bind to a method that uses a stored procedure
If I used the grid without the bind it works find
Appreciate your help
my stored procedure is as follows. It works fine by itself
CREATE
PROCEDURE [dbo].[usp_myproc]
(
@SectionID
int,
@gridsortcolumn
nvarchar(30),
@gridsortdirection
nchar(4)
)
begin
xxxxxx
end
______________________
my component is
section.cfc
has the following function
<cffunction name="cfn_myfunction"
output="yes"
returntype="query"
access="remote">
<cfargument name="SectionID" type="numeric" required="yes">
<cfargument name="gridsortcolumn" type="string" required="yes">
<cfargument name="gridsortdirection" type="string" required="yes">
<cfstoredproc
procedure="usp_myproc"
datasource="#application.dsn#" returncode="no" >
<cfprocparam value="#arguments.SectionID#"
type="in"
cfsqltype="cf_sql_integer"
null="no">
<cfprocparam value="#arguments.gridsortcolumn#"
type="in"
cfsqltype="cf_sql_varchar"
null="no">
<cfprocparam value="#arguments.gridsortdirection#"
type="in"
cfsqltype="cf_sql_varchar"
null="no">
<cfprocresult name = "RS_myproc">
</cfstoredproc>
<cfreturn queryConvertForGrid(RS_myproc, page, pageSize) />
</cffunction>
_____________________________________________________
my cfm page is as follows
<cfform name="tryme">
<cfgrid name="mygrid",
format="html",
sort="yes",
bind="cfc:component.data.section.cfn_myfunc ({cfgridpage},{cfgridpagesize},
{cfgridsortcolumn},{cfgridsortdirection})",
pagesize="7" ,
selectmode="row">
<cfgridcolumn name="UserID" display="No"/>
<cfgridcolumn name="FIRSTNAME" header="FIRST NAME" >
<cfgridcolumn name="LASTNAME" header="LAST NAME" >
<cfgridcolumn name="Email" header="Email" >
</cfgrid>
</cfform>
______________________________
it does not work
It works if I used an embedded query instead of the stored procedure
how can I resolve that