471,107 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,107 software developers and data experts.

ods calls business object then method calls ta with output params

I have the ods calling the business object. This is the method it is calling

public DataTable GetEditManager(string tab, string state, int rows, int
pageselected, int nbrpages, string sort, byte sortdir, int totaledits, string
userid)
{
int a = nbrpages;
int b = totaledits;

if (dtProv == null)
dtProv = taProv.GetData(tab, state, rows, pageselected, ref a,
sort, sortdir, ref b, userid);
return dtProv; //dtProv is a datatable

}

Here is the header of the sp:

CREATE procedure sp_web_edit_manager (
@tabselected varchar(5) -- which tab was selected
,@stateselected varchar(5) = null -- which state was selected, optional
,@nbr_edits int = 0 --Number of edits per page
,@page int = 1 --Which page should be returned
,@nbr_pages int =1 output --Let the app know how many pages there are
,@sort_option varchar(255) = 'edit_mast.edit_id' --How should we sort:
1=edit_id, 2=edit_name, 3=error_msg
,@desc tinyint = 0 --What is the sort order 0 = ascending, 1 = descending
,@total_edits int = 0 output --How many edits are there for this tab
,@user_id varchar(20) = 'Install'
) as

Now I need to call the stored proc which is inside of a xsd. The sp is inside
of the ta GetData. The params above nbrpages and totaledits are output params
in the sp. When I try to build the site I get this error message: cannot
convert from 'ref int' to 'out int?'. How do I get the method taProv.GetData
with its input and output params to call the stored proc?

--
Message posted via http://www.dotnetmonster.com
Jun 8 '06 #1
2 1414
Ummm, change it to out int instead of ref int?

andy6 wrote:
I have the ods calling the business object. This is the method it is calling

public DataTable GetEditManager(string tab, string state, int rows, int
pageselected, int nbrpages, string sort, byte sortdir, int totaledits, string
userid)
{
int a = nbrpages;
int b = totaledits;

if (dtProv == null)
dtProv = taProv.GetData(tab, state, rows, pageselected, ref a,
sort, sortdir, ref b, userid);
return dtProv; //dtProv is a datatable

}

Here is the header of the sp:

CREATE procedure sp_web_edit_manager (
@tabselected varchar(5) -- which tab was selected
,@stateselected varchar(5) = null -- which state was selected, optional
,@nbr_edits int = 0 --Number of edits per page
,@page int = 1 --Which page should be returned
,@nbr_pages int =1 output --Let the app know how many pages there are
,@sort_option varchar(255) = 'edit_mast.edit_id' --How should we sort:
1=edit_id, 2=edit_name, 3=error_msg
,@desc tinyint = 0 --What is the sort order 0 = ascending, 1 = descending
,@total_edits int = 0 output --How many edits are there for this tab
,@user_id varchar(20) = 'Install'
) as

Now I need to call the stored proc which is inside of a xsd. The sp is inside
of the ta GetData. The params above nbrpages and totaledits are output params
in the sp. When I try to build the site I get this error message: cannot
convert from 'ref int' to 'out int?'. How do I get the method taProv.GetData
with its input and output params to call the stored proc?

--
Message posted via http://www.dotnetmonster.com


Jun 8 '06 #2
received errore: cannot convert from 'out int' to 'out int?'

sd********@gmail.com wrote:
Ummm, change it to out int instead of ref int?
I have the ods calling the business object. This is the method it is calling

[quoted text clipped - 32 lines]
convert from 'ref int' to 'out int?'. How do I get the method taProv.GetData
with its input and output params to call the stored proc?


--
Message posted via DotNetMonster.com
http://www.dotnetmonster.com/Uwe/For...p-net/200606/1
Jun 9 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Ivan Voras | last post: by
1 post views Thread by craigkenisston | last post: by
1 post views Thread by Darsin | last post: by
9 posts views Thread by Hasan O. Zavalsiz | last post: by
1 post views Thread by =?Utf-8?B?TWFyaw==?= | last post: by
8 posts views Thread by carton | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.