Skip to content Skip to sidebar Skip to footer
Showing posts with the label Exception Handling

The Transaction Must Be Disposed Before The Connection Can Be Used To Execute Sql Statements

I am getting this error The transaction must be disposed before the connection can be used to exe… Read more The Transaction Must Be Disposed Before The Connection Can Be Used To Execute Sql Statements

Elegant Way Of Handling Postgresql Exceptions?

In PostgreSQL, I would like to create a safe-wrapping mechanism which returns empty result if an ex… Read more Elegant Way Of Handling Postgresql Exceptions?

Sqlexception Constraint Violation

I'm working on an asp.net app. Is there a way, when catching a SqlException, to know which con… Read more Sqlexception Constraint Violation

Correct Use Of Try Catch For The Sql Connection In C#

Is this code correct in means of Try/Catch? I need to value whether the action is done or not to in… Read more Correct Use Of Try Catch For The Sql Connection In C#

How Can I Catch Uniquekey Violation Exceptions With Ef6 And Sql Server?

One of my tables have a unique key and when I try to insert a duplicate record it throws an excepti… Read more How Can I Catch Uniquekey Violation Exceptions With Ef6 And Sql Server?

Sql Server: Rethrow Exception With The Original Exception Number

I am using a TRY CATCH block in a stored procedure where I have two INSERT instructions. If somethi… Read more Sql Server: Rethrow Exception With The Original Exception Number

Catching Exceptions As Expected Program Execution Flow Control?

I always felt that expecting exceptions to be thrown on a regular basis and using them as flow logi… Read more Catching Exceptions As Expected Program Execution Flow Control?

Catch Exception Calling "executenonquery"

I have a Powershell script that inserts a primary key value and another value into a SQL Server 201… Read more Catch Exception Calling "executenonquery"