Ramco Ramco

Ramco Ramco

  • 439
  • 3.4k
  • 544.8k

Sql Connection in WindowsForm

Aug 14 2024 9:54 AM

Hi

  I want to create connection only once in windows form project. How it can be done

cn = new SqlConnection(@"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=H:\Website\RegistrationAndLogin\Database.mdf;Integrated Security=True");
    cn.Open();

Thanks


Answers (2)