In my app I have found that if I have a TDBEdit, that is linked to a field in a mysql table (via a TZQuery, and TZconnection).
If I type a string with a single quote in it such as "test'test" the field is correctly posted to the database (and the quote is escaped on the way, checked with an ZSQLmonitor).
However if I try and build the query with code such as :
Code: Select all
WITH ZEditQuery DO
BEGIN;
Append;
FieldByName(DBFChemCommonName).AsString:='test''test';
ApplyUpdates;
END;
Is there any way round this ?
Cheers.
Phill.