EntLib 2.0 DAAB - Where did my RowsAffected property go?

G

Guest

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.
 
G

Guest

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.
 
S

sloan

Its just the return value of ExecuteNonQuery

aka

int ExecuteNonQuery

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

sloan

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.
 
G

Guest

NOCOUNT OFF is what I needed! Thank you very much, Sloan, for helping with
this!

Mike
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,173
Latest member
GeraldReund
Top