B
BuddyWork
Hello,
When using multiple queries in DBLib, DBLib would carry on
if the queries failed where ADO.Net stop all the queries.
For example
declare @THStatus char(1)
select @THStatus = '0'
exec Deal_Insert 'ZD4222', 0, @THStatus OUTPUT, 0
select Status = @THStatus
The above query throws a SQL Error in Deal_Insert Stored
procedure and when using DBLib you get the result of the
last query 'select Status = @THStatus' but in C# you don't
The following line of code throws an SQL exception.
SqlDataReader sqlDataReader = sqlCommand.ExecuteReader();
Error Stack:
Class 16
Linenumber 94
Message 'Could not fetch box record -1'
Number 99999
Procedure: Deal_Part_Insert
Source .Net SqlClient Data Provider
Server: ""
State 1
How can I archive the same as DBLib?
Thanks
When using multiple queries in DBLib, DBLib would carry on
if the queries failed where ADO.Net stop all the queries.
For example
declare @THStatus char(1)
select @THStatus = '0'
exec Deal_Insert 'ZD4222', 0, @THStatus OUTPUT, 0
select Status = @THStatus
The above query throws a SQL Error in Deal_Insert Stored
procedure and when using DBLib you get the result of the
last query 'select Status = @THStatus' but in C# you don't
The following line of code throws an SQL exception.
SqlDataReader sqlDataReader = sqlCommand.ExecuteReader();
Error Stack:
Class 16
Linenumber 94
Message 'Could not fetch box record -1'
Number 99999
Procedure: Deal_Part_Insert
Source .Net SqlClient Data Provider
Server: ""
State 1
How can I archive the same as DBLib?
Thanks