SkillAgentSearch skills...

Dataconnectiondialog

SQL Server connection dialog

Install / Use

/learn @rusanu/Dataconnectiondialog
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

SQL Server connection dialog

A simple C# dialog for editing SQL Server connection properties. It edit a SqlConnectionStringBuilder properties for DataSource, IntegratedSecurity, UserID and Password.

  SqlConnectionStringBuilder scsb = new SqlConnectionStringBuilder();
  // Set desired properties on the connection
  scsb.IntegratedSecurity = true;
  scsb.InitialCatalog = "master";
  // Display the connection dialog
  DataConnectionDialog dlg = new DataConnectionDialog(scsb);
  if (DialogResult.OK == dlg.ShowDialog())
  {
    // Use the connection properties
    using(SqlConnection conn = new SqlConnection(dlg.ConnectionStringBuilder))
    {
      conn.Open();
      //...
    }
  }

###NuGet Availble on NuGet as com.rusanu.dataconnectiondialog.

View on GitHub
GitHub Stars5
CategoryData
Updated4y ago
Forks3

Languages

C#

Security Score

70/100

Audited on Jun 19, 2021

No findings