Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
143696 | Apr 1,2019 12:51 PM UTC | Apr 2,2019 09:40 AM UTC | Dashboard Platform | 1 |
![]() |
Tags: Dashboard SDK |
{
ConnectionStringBuilder obj = new ConnectionStringBuilder();
DashboardCryptoProvider provider = new DashboardCryptoProvider(EncryptionType.AES);
ConnectionParameters connectionParameter = new ConnectionParameters
{
Url : "", // Pass the web datasource url
UserName: "",
Password: "",
};
ConnectionProviderType connectionType = ConnectionProviderType.WebDataConnector; // Connection type used in the dashboard
OdbcDbmsType odbcType = OdbcDbmsType.None; // ODBC DBMS type, if any
Connection connectionName = new Connection { DataSources = new List<DataSourceConnectionString>() };
connectionName.DataSources.Add(new DataSourceConnectionString
{
Name = "Northwind Traders Sales Analysis", // Nane of the Data Source while designing the Dashboard in the Dashboard Designer
ConnectionString = obj.GenerateConnectionString(connectionParameter, connectionType, odbcType)
});
ViewBag.EncryptedString = provider.DoEncryption(Converter.SerializeObject(connectionName)); // You can pass the encrypted String in the onApplyConnection event API to change the change connection String
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.