Syntax error with select statement

Поиск
Список
Период
Сортировка
От aravind chandu
Тема Syntax error with select statement
Дата
Msg-id 958696.81697.qm@web31408.mail.mud.yahoo.com
обсуждение исходный текст
Ответы Re: Syntax error with select statement
Список pgsql-general
Hello,
          I have problem with select statement in c++ program I am using pqxx library to connect to postgresql database.My query is

          result R(T.exec(" select * from dbtable where username =  ' "+user+" ' and password = ' "+st+" ' "));

         here st is in encrypted format and the string is st = M^fuo|`sjyo|`so|>-?z  this is the string i stored in the table .

        The error I was encountered is "terminate called after throwing an instance of 'pqxx::syntax_error'
  what():  ERROR:  unterminated quoted string at or near "'M^fuo|`sjyo|`so|>-?z"
LINE 1: ...table where username = 'achandana' and password = 'M^fuo|`sj...
                                                                                                  ^    "

 I am not able to identify what the actual problem is can you guys please help to solve this problem?Your help is greatly appreciated.

Thank You,
Aravind.
                                                             ^


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

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: Re: Composite type evaluates to Null if any element is null
Следующее
От: Thomas Kellerer
Дата:
Сообщение: Re: A bit confused about Postgres Plus