Posted on: 4/16/2015 2:13:36 PM | Views : 566

An object referenced is not required for the non static field

public class employeeDal { string strConStr = "server=(local);database=internship;Integrated Security=SSPI"; . . . SqlConnection con = new SqlConnection(strConStr); Hi, the code above gives me this errro >>> An object referenced is not required for the non static field.... however, when I make the declaration of the strConStr publich, it work and never shows the error message . can any one explain the idea behind it. thanks Bob

Go to the complete details ...