added these references
and ran this code
using (SqlConnection con = new SqlConnection (connstr))
{
con.Open();
Server server = new Server(new ServerConnection(con));
server.ConnectionContext.ExecuteNonQuery(grants);
}
Alter database statements did not work - I needed to run seperate commands
ReplyDelete