public class connectionClass1
{
SqlConnection Con;
SqlConnection cn;
SqlCommand cmd;
SqlDataAdapter Da = new SqlDataAdapter();
public SqlConnection GetConnection()
{
string connectionString = ConfigurationManager.ConnectionStrings["WindowsFormsApplication5.Properties.Settings.terumopenpolConnectionString"].ConnectionString;
SqlConnection Con = new SqlConnection(connectionString);
Con.Open();
return Con;
}
public connectionClass1()
{
string connectionString = ConfigurationManager.ConnectionStrings["WindowsFormsApplication5.Properties.Settings.terumopenpolConnectionString"].ConnectionString.ToString();
SqlConnection cn = new SqlConnection(connectionString);
}
these was the connection string I have given but it shows the error of I didn't set the instant of object and the string contain null value