I currently use MySql, but would prefer an ODBC solution to make it future proof.
How do I sanitize user input before passing it to an ODBC database ?
And, while I'm at it, I wrap my string in double quotes, e.g. "INSERT INTO VALUES(description) ""` - but what if the text itself contains a double quote?
Use hibernate if you can, perhaps via RMI from delphi. Although it's java centric, it almost completely insulates the programmer from the underlying DB, and handles the issues you've mentioned and a whole lot more.
btw, to answer your question re double quotes, to save a value which contains double quotes, escape them as doubled double quotes, eg
would be saved as
Try using a parametrized SQL sentence
like this.
check this article from embarcadero for more info about how use parameters
Using Parameters in Queries.
You can take a look also here Delphi - prevent against SQL injection , there are some indication/examples.