Hi i am using C# to connect to Access database.
The problem i am facing is not with database though.
I have used a statement like
string.Format("UPDATE TABLENAME SET FIELDNAME = \'{0}\' ", txtMembers.Text);
the problem i am facing is if the user enters 'hello', the whole text along with those apostrophes i get an error saying ''hello'' is giving a syntax error.
i have also tried changing \'{0}\' to \"{0}\".
Now in this case if i enter "hello" in the text box then it gives error due to the text generated ""hello"".
also if i enter hel"lo then the resulting query will be like FIELDNAME = "hel"lo which again gives an error.
Please help how can i deal with these escape characters