-
Sencha User
cfgridbinding and storeprocedure issue
I have a problem in cfgrid bind attribute with stored procedure
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_myfunc"
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_myfunc">
</cfstoredproc>
<cfreturn queryConvertForGrid(RS_myfunc, 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(1,{cfgridpage},{cfgridpagesize},
{cfgridsortcolumn},{cfgridsortdirection})",
pagesize="7" ,
selectmode="row">
<cfgridcolumn name="OrgUserID" display="No"/>
<cfgridcolumn name="FIRSTNAME" header="FIRST NAME" >
<cfgridcolumn name="LASTNAME" header="LAST NAME" >
<cfgridcolumn name="OrgUserEmail" header="Email" >
<cfgridcolumn name="AgreementDate" header="Agree Date" >
</cfgrid>
</cfform>
______________________________
it does not work
It works if I used an embedded query instead of the stored procedure
how can I resolve that
Thanks
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules