I am trying to write a local program management and install system for my home network, and I think I\'ve got the technologies nailed down:
SqlConnection
object is made for this.
Eg:
SqlConnection conn = new SqlConnection(
"Data Source=(local);Initial Catalog=Northwind;Integrated Security=SSPI");
or
SqlConnection conn = new SqlConnection(
"Data Source=DatabaseServer; Initial Catalog=Northwind; User ID=YourUserID; Password=YourPassword");
conn.Open(); // opens the database connection
Edit:
After doing all your stuff you have to close the connection by
conn.Close();
Data Source: Identifies the server. Could be local machine, machine domain name, or IP Address.
Initial Catalog: Database name.
Integrated Security: Set to SSPI to make connection with user's Windows login
User ID: Name of user configured in SQL Server.
Password: Password matching SQL Server User ID.