Software Development Network>> Visual C#>> Simple Database connection
In the System.Data.SqlClient namespace you will find the SqlConnection class. Use the Database property to get the connected database name, here is a example:
Here is a good list with example:
Simple Database connection
larsbg
In the System.Data.SqlClient namespace you will find the SqlConnection class. Use the Database property to get the connected database name, here is a example:
SqlConnection dbConn = new SqlConnection("Data Source=Aron1;Initial Catalog=pubs;User Id=sa;Password=asdasd;");
MessageBox.Show( dbConn.Database );
Here is a good list with example: