single quotation confusion

Поиск
Список
Период
Сортировка
От R10
Тема single quotation confusion
Дата
Msg-id 1365261492317-5751065.post@n5.nabble.com
обсуждение исходный текст
Список pgsql-jdbc
i am connecting a postgresql database to a netbeans form , and when i try to
execute a query which includes a string entered through a Jtextfield that
contain the special charachter " ' " it reads it as a single quotation
for example if a String txt = "it's cold" and to be inserted into a sql
query "insert into test values ('"+txt+"')";
it gives me
syntax error at or near "s"

any ideas how to solve that problem ??





--
View this message in context: http://postgresql.1045698.n5.nabble.com/single-quotation-confusion-tp5751065.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.


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

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: Publish artifacts to Maven central
Следующее
От: Tom Dunstan
Дата:
Сообщение: Re: Publish artifacts to Maven central