+1 800 256 3608 (toll-free in North America) or +49 7531 90 60 10| service@combit.com

Accessing a Microsoft Azure SQL Database

net
(combit Team) #1
Valid from List & Label 16
In order to bind List & Label to a Microsoft Azure SQL Database, you only need a SQL connection string. You can easily obtain one from your Microsoft Azure Management Portal. Afterwards, simply use the SqlConnectionDataProvider class:
using (ListLabel ll = new ListLabel())
{
    string connectionString = "Server=tcp:<Servername>.database.windows.net,1433;Database=<Database>;"
    + "User ID=<User>@<Servername>;Password=<Password>;Trusted_Connection=False;"
    + "Encrypt=True;";
    
    SqlConnection conn = new SqlConnection(connectionString);
    conn.Open();
    
    SqlConnectionDataProvider provider = new SqlConnectionDataProvider(conn);
    ll.DataSource = provider;
    
    ll.Design(LlProject.List | LlProject.FileAlsoNew);
    
    conn.Close();
} 
IDKBTE000809 KBTE000809