G
Guest
Hi, in my catch(SqlException se) block, how can I tell from the value of SqlException members (e.g. number, state etc) that the exception is due to fail to connecting to database? there are a block of codes inside my try{ }, including define SqlCommand, assign values to SqlParameter, open connection and execute SqlCommand etc. I don't want to add 1 more try-catch on my SqlConnection.Open() statement. Thanks a lot in advance