0 hitro456 7 Years Ago hi everyone, is there any way that I can programatically tell the user weather he/she is successfully connected to the database(SQL Server 2005). or connection failed. Code is written in C#. string Connectionstring = "...."; sqlConnection con = new sqlConnection(Conncetionstring); con.Open(); how I can check programatically weather con.Open() is sucess of failed. c# Edited 7 Years Ago by __avd: Added [code] tags. For easy readability, always wrap programming code within posts in [code] (code blocks).