[Gambas-user] How to insert names with apostrophe in postgres via gambas

Benoit Minisini gambas at ...1...
Tue Feb 19 07:59:09 CET 2008


On mardi 19 février 2008, richard terry wrote:
> eg Peter's
>
> if one passes the name to an sql in code it ends up looking like:
>
> insert into whatevertable (name) values('Peter's');
>
> and bombs.
>
> Any suggestions appreciated.
>
> Richard
>

You must use the automatic argument quoting of the DB.Exec(), Find(), Edit() 
and Delete() methods, or directly the DB.Subst() method.

Regards,

-- 
Benoit Minisini




More information about the User mailing list