hi, I wants to do register function in window form application microsoft visual studio 2008 and insert the data into microsoft Access 2007 table by using C#. Below is my codes:
SQLStr = "INSERT INTO RegisterEmployee(EmployeeName,Password,Gender,ContactNumber)" +
"VALUES ('" +
SQLStrCmd.ReplaceStr(nameReg.Text) + "', '" +
SQLStrCmd.ReplaceStr(passReg.Text) + "', '" +
SQLStrCmd.ReplaceStr(genReg.Text) + "', '" +
SQLStrCmd.ReplaceStr(Hptxt.Text) + "')";
When I execute, i found that password cannot insert into database and got sql exception, when I remove password in codes above, other columns able to be inserted.After that i try the sql command in the Microsoft Access, its sql output is like below:
INSERT INTO RegisterEmployee ( EmployeeName, [Password], Gender, ContactNumber )
// Values command
Why would have the "[]" symbol for the password? what is the meaning? Is this condition made my password cannot inserted?