Re: how to Escape single quotes with PreparedStatment

Поиск
Список
Период
Сортировка
От Maciek Sakrejda
Тема Re: how to Escape single quotes with PreparedStatment
Дата
Msg-id CAH_hXRazM9EAOwRT18CW0hvyjoGy2xGbBneNs-PYBG8R_atZHA@mail.gmail.com
обсуждение исходный текст
Ответ на how to Escape single quotes with PreparedStatment  (JavaNoobie <vivek.mv@enzentech.com>)
Список pgsql-jdbc
> However , the query fails with postgresql when a double quote is passed into
> it.I was under the impression that Prepared statement would take care of the
> same . But can anyone explain why I'm getting the error?

What do you mean by "passed into it"? There are no parameter markers
in your query. PostgreSQL/JDBC can only handle escaping of parameter
values for you if you provide them as actual parameters, rather
concatenating them into the query string.

---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Andrew Hastie
Дата:
Сообщение: Re: how to Escape single quotes with PreparedStatment
Следующее
От: Radosław Smogura
Дата:
Сообщение: Re: how to Escape single quotes with PreparedStatment