public void DBConnection(string strDBName) { try { if (IDisconnection != null) { if (IDisconnection.State == System.Data.ConnectionState.Open) { IDisconnection.Close(); } IDisconnection = null; IDisconnection = new SqlConnection(); } else { IDisconnection = new SqlConnection(); } strConnectionString = "Data Source=localhost;Initial Catalog=" + strDBName + ";User ID=sa;Password=sa1234"; IDisconnection.ConnectionString = strConnectionString; IDisconnection.Open(); mblnTransactionStart = false; } catch (System.Data.SqlClient.SqlException e1) { throw (e1); } catch (System.Exception ex) { throw ex; } finally { } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)