Mark Johnson wrote:
> PostgreSQL gives a warning for '', but accepts it; it prefers \'.  MySql 
> takes the ''; I'm not sure about \'.  Obviously SQLite won't take the \'.
>
> However, the real problem is that it is not gnucash-gda code which is 
> doing the escaping of the single quote.  It is libgda, probably the 
> SQLite provider.  Therefore not under this project's control.
>   
Guys, this isn't the right way to do it. When using SQL, you should
never have to worry about quoting because you shouldn't build SQL
statements like that. Use a prepared statement and bind the values to
numbered or named parameters in the SQL. All the relevant providers
allow it. GDA allows it. Now there may be bugs in GDA - I don't know.
But at least try to get it to work before worrying about workarounds
like this.

Graham
_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to