I have a connection string set up to point to the database that house my tables that I am working with, however I can not reference a colume needed. I get an error : the name 'xxxx' does not exist in the current context. I have added my code , Please take a look and see if anything jumps out at up..Thanks
Code:
SqlConnection conn;
conn.Open();
SqlCommand cmd;
string cmdString = ("Select * from cocceo");
conn = new SqlConnection(@"Data Source=.\SPARE-PC\SQLEXPRESS ;AttachDbFilename=|DataDirectory|\TstCocDB.dbo1;Integrated Security=True;User Instance=true");
cmd = new SqlCommand(cmdString, conn);
SqlDataReader myReader;
List<string> returnData = new List<string>();
myReader = cmd.ExecuteReader(CommandBehavior.CloseConnection);
while (myReader.Read())
{
returnData.Add(myReader["ceo_LastName"].ToString());
}
return returnData;
if (TextBox1.Text = ceo_Last_Name)
Response.Redirect("ceo.aspx");
string cmdString1 = ("INSERT INTO lOGIN,UserName, Password, UserEmail, UserLevel");
string cmdString2 = ("Update Login, set UserLevel to 1, conn");
conn.Close();
}
thanks again