Skip to main content

ADO.Net with Microsoft Data Fabric Sql Endpoint


using Microsoft.Data.SqlClient;

 

// Use your own server, database, and user ID.

// Connetion string - user ID is not provided and is asked interactively.

string ConnectionString = @"Data Source=*******.datawarehouse.pbidedicated.windows.net; Initial Catalog=database;User ID=userid; Connect Timeout=30;Encrypt=True;TrustServerCertificate=False; Authentication=Active Directory Interactive;ApplicationIntent=ReadWrite;MultiSubnetFailover=False";

using (SqlConnection conn = new SqlConnection(ConnectionString))

{

       conn.Open();

       Console.WriteLine("ConnectionString2 succeeded.");

       using (var cmd = new SqlCommand("SELECT @@Version", conn))

       {

            Console.WriteLine("select @@version");

            var result = cmd.ExecuteScalar();

            Console.WriteLine(result.ToString());

       }

}

Console.ReadKey();

Comments

Popular posts from this blog

Data transfer from dataverse to Azure SQL using Microsoft Data Fabric

Transfer the data from dataverse to Azure SQL using Microsoft Data Fabric 1. Open  Microsoft Fabric 2. Select Data Engineering . 3. Go to your workspace. 4. Select the  Dataflow Gen2 . 4. Click the hyper link ' Get data from another source ' 5. Popup will open, Search by Dataverse and select. 6. Select your environment domain and click Next. 7. We can select our entities and click Create . 8. We have the option to Choose the specific columns. 9. I have selected accountid and name column from account entity. 10. Select the data destination from the drop down. I have selected Azure SQL Database. 11. Popup will open there we can fill the azure sql database server details. then Click Next. 12. Select the Database and choose Replace option then Click Save Settings. 13. Click Publish. 14. Dataflow is created and loading the data to Azure SQL. 15. Now the selected entity and corresponding data has been populated in the Azure SQL database. 16. We can set the timer to schedule the data...