EntLib 2.0 DAAB - Where did my RowsAffected property go?

Discussion in 'ASP .Net' started by =?Utf-8?B?TWlrZQ==?=, Apr 1, 2007.

  1. The DBCommandWrapper class doesn't exist in Enterprise Library because it's
    properties/methods have been relocated to other classes. Where did the
    RowsAffected properties go? I can't find this property anywhere?

    I use this property when, for example, calling SQL 'Update' stored
    procedures. I call the procedure, and then evaluate the number of affected
    records to determine if the command completed successfully.

    Thanks.
     
    =?Utf-8?B?TWlrZQ==?=, Apr 1, 2007
    #1
    1. Advertising

  2. sloan, I consistantly get -1 as the int value using that method. I execute
    UPDATE and DELETE stored procs, and despite that they successfully UPDATE or
    DELETE one row, it returns -1. Shouldn't it return 1?

    Thanks for your help.

    "sloan" wrote:

    > Its just the return value of ExecuteNonQuery
    >
    > aka
    >
    > int ExecuteNonQuery
    >
    > int myvalue = db.ExecuteNonQuery( dbc , ....................... ) ;
    >
    >
    >
    > "Mike" <> wrote in message
    > news:...
    > > The DBCommandWrapper class doesn't exist in Enterprise Library because

    > it's
    > > properties/methods have been relocated to other classes. Where did the
    > > RowsAffected properties go? I can't find this property anywhere?
    > >
    > > I use this property when, for example, calling SQL 'Update' stored
    > > procedures. I call the procedure, and then evaluate the number of

    > affected
    > > records to determine if the command completed successfully.
    > >
    > > Thanks.

    >
    >
    >
     
    =?Utf-8?B?TWlrZQ==?=, Apr 1, 2007
    #2
    1. Advertising

  3. =?Utf-8?B?TWlrZQ==?=

    sloan Guest

    Its just the return value of ExecuteNonQuery

    aka

    int ExecuteNonQuery

    int myvalue = db.ExecuteNonQuery( dbc , ....................... ) ;



    "Mike" <> wrote in message
    news:...
    > The DBCommandWrapper class doesn't exist in Enterprise Library because

    it's
    > properties/methods have been relocated to other classes. Where did the
    > RowsAffected properties go? I can't find this property anywhere?
    >
    > I use this property when, for example, calling SQL 'Update' stored
    > procedures. I call the procedure, and then evaluate the number of

    affected
    > records to determine if the command completed successfully.
    >
    > Thanks.
     
    sloan, Apr 1, 2007
    #3
  4. =?Utf-8?B?TWlrZQ==?=

    sloan Guest

    First, Selects are not in this number.

    Second, make sure NOCOUNT OFF
    is set.

    Aka, when you set NOCOUNT ON, you're saying "don't report a rowcount", thus
    ExecuteNonQuery does not work.



    "Mike" <> wrote in message
    news:...
    > sloan, I consistantly get -1 as the int value using that method. I

    execute
    > UPDATE and DELETE stored procs, and despite that they successfully UPDATE

    or
    > DELETE one row, it returns -1. Shouldn't it return 1?
    >
    > Thanks for your help.
    >
    > "sloan" wrote:
    >
    > > Its just the return value of ExecuteNonQuery
    > >
    > > aka
    > >
    > > int ExecuteNonQuery
    > >
    > > int myvalue = db.ExecuteNonQuery( dbc , ....................... ) ;
    > >
    > >
    > >
    > > "Mike" <> wrote in message
    > > news:...
    > > > The DBCommandWrapper class doesn't exist in Enterprise Library because

    > > it's
    > > > properties/methods have been relocated to other classes. Where did

    the
    > > > RowsAffected properties go? I can't find this property anywhere?
    > > >
    > > > I use this property when, for example, calling SQL 'Update' stored
    > > > procedures. I call the procedure, and then evaluate the number of

    > > affected
    > > > records to determine if the command completed successfully.
    > > >
    > > > Thanks.

    > >
    > >
    > >
     
    sloan, Apr 2, 2007
    #4
  5. NOCOUNT OFF is what I needed! Thank you very much, Sloan, for helping with
    this!

    Mike

    "sloan" wrote:

    >
    > First, Selects are not in this number.
    >
    > Second, make sure NOCOUNT OFF
    > is set.
    >
    > Aka, when you set NOCOUNT ON, you're saying "don't report a rowcount", thus
    > ExecuteNonQuery does not work.
    >
    >
    >
    > "Mike" <> wrote in message
    > news:...
    > > sloan, I consistantly get -1 as the int value using that method. I

    > execute
    > > UPDATE and DELETE stored procs, and despite that they successfully UPDATE

    > or
    > > DELETE one row, it returns -1. Shouldn't it return 1?
    > >
    > > Thanks for your help.
    > >
    > > "sloan" wrote:
    > >
    > > > Its just the return value of ExecuteNonQuery
    > > >
    > > > aka
    > > >
    > > > int ExecuteNonQuery
    > > >
    > > > int myvalue = db.ExecuteNonQuery( dbc , ....................... ) ;
    > > >
    > > >
    > > >
    > > > "Mike" <> wrote in message
    > > > news:...
    > > > > The DBCommandWrapper class doesn't exist in Enterprise Library because
    > > > it's
    > > > > properties/methods have been relocated to other classes. Where did

    > the
    > > > > RowsAffected properties go? I can't find this property anywhere?
    > > > >
    > > > > I use this property when, for example, calling SQL 'Update' stored
    > > > > procedures. I call the procedure, and then evaluate the number of
    > > > affected
    > > > > records to determine if the command completed successfully.
    > > > >
    > > > > Thanks.
    > > >
    > > >
    > > >

    >
    >
    >
     
    =?Utf-8?B?TWlrZQ==?=, Apr 2, 2007
    #5
    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. =?Utf-8?B?dmVlcmEgc2VraGFyIGtvdGE=?=

    DAAB 2.0 Vs DAAB in Enterprise library......

    =?Utf-8?B?dmVlcmEgc2VraGFyIGtvdGE=?=, Jul 21, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    512
    =?Utf-8?B?dmVlcmEgc2VraGFyIGtvdGE=?=
    Jul 21, 2005
  2. =?Utf-8?B?TmljayBaZHVuaWM=?=

    ASP.NET 2.0 and EntLib 1.1

    =?Utf-8?B?TmljayBaZHVuaWM=?=, Feb 12, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    2,780
    Shimon Sim
    Feb 12, 2006
  3. John Baima
    Replies:
    0
    Views:
    343
    John Baima
    Aug 23, 2006
  4. Karch
    Replies:
    5
    Views:
    513
    Cowboy \(Gregory A. Beamer\)
    Sep 14, 2006
  5. =?Utf-8?B?UmF5bW9uZCBSb2VsYW5kcw==?=

    Using Entlib Logging block in Nested web applications

    =?Utf-8?B?UmF5bW9uZCBSb2VsYW5kcw==?=, Nov 17, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    317
    =?Utf-8?B?UmF5bW9uZCBSb2VsYW5kcw==?=
    Nov 17, 2006
Loading...

Share This Page