.NET ODBC DB conncetion
public OdbcConnection createDBCon()
{
try
{
//SqlConnection con = new SqlConnection(@"Data Source=DSName; Server=(local); Database=DBName;User id=;password=;Integrated Security=true");
OdbcConnection con = new OdbcConnection("dsn=dass;UID='';PWD='';");
con.Open();
return con;
}
catch (Exception serverOff) { Environment.Exit(0); return null; }
}
Comments
Post a Comment