Catch SqlException
Harry,I think because you are opening the connection to SQL server outside (before) of the try-catch block.The best way is like: using (SqlConnection connection = new SqlConnection(connectionString)) {...
View ArticleCatch SqlException
Hi,Try adding one more catch block as below.catch(Exception Ex) { error message }Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution...
View ArticleCatch SqlException
Did you also add a generic catch? I'm just guessing, but you may try it as well.For every expert, there is an equal and opposite expert. - Becker's LawMy blogMy TechNet articles
View ArticleCatch SqlException
This code does work for a valid user. Hello Harry,If it works, then what is the issue with your code?The other issue is that the error does not appear in the SQL Server logYou can setup SQL Server to...
View ArticleCatch SqlException
I have a Visual Studio Express 2010 c# application using Ling-SQL. I'm getting a login failure, so I added a try-catch as follows:try { Execute a Get stored procedure to read data from a table }...
View Article