You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Bobby Lawrence <ro...@jlab.org> on 2005/01/21 22:24:44 UTC
string equal criteria
In situations when using the addEqualTo method on a Criteria object, if
the column being compared against is of type VARCHAR, does OJB enclose
the criteria in single quotes?
What if the string has a single quote in it?
In Oracle SQL syntax, you would need double quotes....
WHERE name = 'O''Neil'
--Bobby
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: string equal criteria
Posted by Ben Hall <bh...@internap.com>.
It handles all the quoting for you. At least I don't have to escape any
quotes in my apps.
On Fri, 21 Jan 2005, Bobby Lawrence wrote:
> In situations when using the addEqualTo method on a Criteria object, if
> the column being compared against is of type VARCHAR, does OJB enclose
> the criteria in single quotes?
> What if the string has a single quote in it?
> In Oracle SQL syntax, you would need double quotes....
> WHERE name = 'O''Neil'
>
> --Bobby
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org