ods calls business object then method calls ta with output params

Discussion in 'ASP .Net' started by andy6, Jun 8, 2006.

  1. andy6

    andy6 Guest

    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
    andy6, Jun 8, 2006
    #1
    1. Advertising

  2. andy6

    Guest

    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, 2006
    #2
    1. Advertising

  3. received errore: cannot convert from 'out int' to 'out int?'

    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/Forums.aspx/asp-net/200606/1
    andy6 via DotNetMonster.com, Jun 9, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JDC
    Replies:
    0
    Views:
    301
  2. bogdan
    Replies:
    0
    Views:
    388
    bogdan
    Apr 10, 2008
  3. Replies:
    0
    Views:
    261
  4. Barry
    Replies:
    9
    Views:
    429
    Ara.T.Howard
    Sep 15, 2005
  5. DJ Stunks
    Replies:
    3
    Views:
    128
    DJ Stunks
    Jan 21, 2009
Loading...

Share This Page