Re: Getting error : invalid string conversion occured.

From: Dave Cramer <davecramer(at)postgres(dot)rocks>
To: Abhishek Kumar <abhishek(dot)aak0(at)gmail(dot)com>
Cc: pgsql-odbc(at)lists(dot)postgresql(dot)org
Subject: Re: Getting error : invalid string conversion occured.
Date: 2024-08-29 10:26:52
Message-ID: CADK3HH+oOiyRk-LcfoXvTW9V31=hykq7ZRD_=95Vw5WPoFPmEw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

I'm afraid that unless you use a client session locale that accepts the
characters this simply won't work

Dave Cramer
www.postgres.rocks

On Thu, 29 Aug 2024 at 03:29, Abhishek Kumar <abhishek(dot)aak0(at)gmail(dot)com>
wrote:

> Can someone please provide an answer to this question?
>
> Regards,
> Abhishek Kumar
>
> On Fri, Aug 23, 2024 at 6:28 PM Abhishek Kumar <abhishek(dot)aak0(at)gmail(dot)com>
> wrote:
>
>> Hi,
>>
>> I am using psqlodbc native driver with my C++ application. I am facing
>> errors in the below scenario.
>>
>> I have a PostgreSQL database (Server character set is UTF-8, Database
>> character set is UTF-8)
>> My System character set/locale is ASCII. The session character set is
>> also ASCII.
>> Below is the details of the table i am using
>> CREATE TABLE conv_vchar (
>> id SERIAL PRIMARY KEY,
>> vchar_col VARCHAR(255)
>> );
>>
>> I am inserting some characters in table varchar column which is only
>> available in UTF-8 and not in ASCII.
>> The characters are "कखग".
>> please note that none of these characters is present in ASCII.
>>
>> I have tried binding the varchar column with the below two types. Both
>> give me the same error
>> 1. SQL_C_BINARY
>> 2. SQL_C_CHAR
>>
>> ODBC error: SQLSTATE S1000 native database error 36. invalid string
>> conversion occured.
>>
>> Is there a correct way to bind this?
>> How can this be fixed?
>>
>> Your help will be highly appreciated.
>>
>> Regards,
>> Abhishek Kumar
>>
>

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Abhishek Kumar 2024-09-05 12:28:31 Latest version of psqlodbc in linux
Previous Message Abhishek Kumar 2024-08-29 07:29:40 Re: Getting error : invalid string conversion occured.