private void ExecuteSql(string serverName, string dbName, string Sql) { string connStr = "Data Source=" + serverName + ";Initial Catalog=" + dbName + ";Integrated Security=True"; using (SqlConnection conn = new SqlConnection(connStr)) { try { Server server = new Server(new ServerConnection(conn)); server.ConnectionContext.ExecuteNonQuery(Sql); // i got an error here.. } catch (Exception ex) { Log(ex.ToString()); } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)