You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It won't change the role from the default to ACCOUNTADMIN even though its defined in the connection string, nor is the database and maybe schema parameters are recognized.
using (IDbConnection conn = new SnowflakeDbConnection())
{
conn.ConnectionString = "account=demo16;host=XXXXX.snowflakecomputing.com;user=eddy;password=XXXXXXX;db=edy;schema=public;role=accountadmin;warehouse=etl" ;
conn.Open();
IDbCommand cmd = conn.CreateCommand();
cmd.CommandText = "select * from edy.public.eddy1;";
IDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
Console.WriteLine(reader.GetString(0));
}
conn.Close();
}
I had to add in these commands to properly switch the context:
IDbCommand cmd = conn.CreateCommand();
cmd.CommandText = "use role accountadmin";
cmd.ExecuteNonQuery();
It won't change the role from the default to ACCOUNTADMIN even though its defined in the connection string, nor is the database and maybe schema parameters are recognized.
I had to add in these commands to properly switch the context:
IDbCommand cmd = conn.CreateCommand();
cmd.CommandText = "use role accountadmin";
cmd.ExecuteNonQuery();
The text was updated successfully, but these errors were encountered: