try to connect to sql server DB using ConnectionStringSettings
Hi
I am quite new to programming and try to connect to database using System.ConfigurationConnectionStringSettings but meet some error. The following is code and error message. I stuck for sometimes . pls help
----------------------------------------------------------------------------
public DataAccess()
{
ConnectionStringSettings DatabaseSettings = ConfigurationManager.ConnectionStrings["BookStoreDBConnectionString"];
connection = new SqlConnection("Data Source=supalerk-e843bb;Initial Catalog=BookStoreDB;Integrated Security=True");
GetUsersCmd = new SqlCommand("SPGetUsers", connection);
GetUsersCmd.CommandType = System.Data.CommandType.StoredProcedure;
GetUsersCmd.Parameters.Add("@Username", System.Data.SqlDbType.VarChar, 50);
GetUsersCmd.Parameters.Add("@Password", System.Data.SqlDbType.VarChar, 50);
}
------------------------------------------------------------------------
The error message is Error 10 The type or namespace name 'ConnectionStringSettings' could not be found (are you missing a using directive or an assembly reference?)