MS SQL didn't allow to store apostrophe( ' ) in name
Database
4
Posts
3
Posters
0
Views
1
Watching
-
if v want to store name like Mohammed's then sql didn't allow to save data and give an error
-
if v want to store name like Mohammed's then sql didn't allow to save data and give an error
Only goes wrong if you concatenate strings, which shouldn't be done in the first place. Use a 'parameterized query';
using (cmd = new MySqlCommand("SELECT EmployeeName FROM Employees WHERE EmployeeId = @P1;"))
{
cmd.Parameters.AddWithValue("@P1", Parameter1);
m.ExecuteNonQuery();
}Research the
AddWithValue
member.Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]
-
if v want to store name like Mohammed's then sql didn't allow to save data and give an error
-
thenks for ur reply