Hi All,
We need to make connection to other enviornment so that we can use it to retrieve data using plugin but we cannot figure out how to make connection to other enviornment .
Microsoft is using https://learn.microsoft.com/en-us/power-apps/developer/data-platform/virtual-entities/sample-ve-provider-crud-operations
to make connection to external SQL table but we want to connect to other enviornment in same tennant to leverage the data.
This is the code to connect to SQL
public static class Connection { public static SqlConnection GetConnection()
{ try
{ //sample database to connect to SqlConnectionStringBuilder builder = new SqlConnectionStringBuilder();
builder.DataSource = "Enter name or network address of the SQL Server";
builder.UserID = "Enter User Name"; builder.Password = "Enter password"; builder.InitialCatalog = "Enter database details";
SqlConnection connection = new SqlConnection(builder.ConnectionString);
return connection; } catch (SqlException e) { Console.WriteLine(e.ToString()); throw; }
} }