unknown
2/2/2008 12:42:00 AM
Yeah, I am already collecting it and have a total row changed count, just
didnt know if i could force it down as a row changed count or if i will need
to pass it back as a output param or something else
"Niels Berglund" <nielsb@nospam.develop.com> wrote in message
news:Oi2fZvRZIHA.1132@TK2MSFTNGP06.phx.gbl...
> Smokey Grindel wrote:
>> There is a lot of logic in there that is not just SELECT statements and
>> INSERTS... the insert and selects are of course inside sqlcommand objects
>> running on the context=true database connection... i load data alter it
>> based on business logic then insert results into another table... all
>> wrapped inside a sqltransaction that is committed at the end when all the
>> inserts are done... each row is inserted independently... but when the
>> transaction completes the row count altered is zero
>
> Well, so - in your SQLCLR method that is doing a load of T-SQL work (as
> per above), you need in business logic define what the count of affected
> rows are. I.e, if you do some inserts, some deletes and some updates - how
> do you define row-count? After having defined that, you should be able to
> return whatever it is. What I'm getting at is that each of your T-SQL
> statements will produce a rowcount, it is up to you to collect that
> information and do something about it.
>
> Niels