Hello guys i have problem with my sentence... I have an EditInfo Page and i want to make that the info u put in textbox will change ur info that u register... And i have a problem with my sentence Can anyone find the problem for me please?
public static bool EditUser(string userName, string passWord, string firstName, string lastName, string eMail, string cityID)
{
string connectionStr = @"Provider=Microsoft.Jet.OleDb.4.0;Data Source=|DataDirectory|\DataBase.mdb";
OleDbConnection connectObj = new OleDbConnection(connectionStr);
string mySql = "UPDATE Users SET UserPass='" + passWord + "',";
mySql += "FirstName='" + firstName + "',";
mySql += "LastName='" + lastName + "',";
mySql += "Email='" + eMail + "',";
mySql += "Place='" + cityID + "',";
mySql += "WHERE UserName='" + userName + "'";
OleDbCommand myCommandObj = new OleDbCommand(mySql, connectObj);
connectObj.Open();
myCommandObj.ExecuteNonQuery();
connectObj.Close();
return true;
}