From: | "Zubkovsky, Sergey" <Sergey(dot)Zubkovsky(at)transas(dot)com> |
---|---|
To: | "Andrei Kovalevski" <andyk(at)commandprompt(dot)com> |
Cc: | <pgsql-odbc(at)postgresql(dot)org> |
Subject: | FW: Varchar parameter conversion |
Date: | 2007-07-24 11:44:30 |
Message-ID: | 528853D3C5ED2C4AA8990B504BA7FB850106DDE6@sol.transas.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Sorry, I forgot to attach the log file.
-----Original Message-----
From: pgsql-odbc-owner(at)postgresql(dot)org
[mailto:pgsql-odbc-owner(at)postgresql(dot)org] On Behalf Of Zubkovsky, Sergey
Sent: Tuesday, July 24, 2007 3:37 PM
To: Andrei Kovalevski
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: [ODBC] Varchar parameter conversion
Hello,
Thank you for your answer!
But this is the same what I do exactly.
I have realized the stored procedure call with a varchar parameter value
which originally contained characters with the ASC-codes from 1 to 255.
For visualization purpose all these chars were separated by char '-'.
A log file was produced by the ODBC driver is attached.
Look at the "GetPartitionName_sp" stored procedure call.
I suppose that the first parameter was converted to UTF-8.
But I didn't do this conversion!
-----Original Message-----
From: Andrei Kovalevski [mailto:andyk(at)commandprompt(dot)com]
Sent: Monday, July 23, 2007 6:41 PM
To: Zubkovsky, Sergey
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: [ODBC] Varchar parameter conversion
Hello,
Try to use statements with parameters:
SQLBindParameters(stmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_VARCHAR,
query_length, 0, param_ptr, query_length, buff_ptr);
SQLExecDirect(stmt, "{call SomeProc(?}}");
Zubkovsky, Sergey wrote:
>
> Hello,
>
> My client program is developed on C++ & ODBC.
>
> It's a Windows Unicode application.
>
> I'm trying to pass a "varchar" parameter value to a user-defined
> stored procedure.
>
> Each character of this actual parameter value (which ASC code is
> greater than 127) is transformed into some two chars.
>
> This value is stored and bound as a non-Unicode string (traditional
> C-string) in the program.
>
> So, some conversion happens for these characters.
>
> It seems to me that it's the ODBC driver's intervention.
>
> Is that right?
>
> And how can I avoid this unwanted conversion?
>
> Additional environment info:
>
> OS: Windows XP SP2
>
> PostgreSQL version: "PostgreSQL 8.2.4 on i686-pc-mingw32, compiled by
> GCC gcc.exe (GCC) 3.4.2 (mingw-special)"
>
> ODBC driver version: PostgreSQL Unicode 8.02.04.00
>
> SHOW server_encoding;
>
> "SQL_ASCII"
>
> SHOW client_encoding;
>
> "SQL_ASCII"
>
> Thank you.
>
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
Attachment | Content-Type | Size |
---|---|---|
mylog_1168.log | application/octet-stream | 17.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Peters | 2007-07-24 12:13:19 | 08020400 Driver and ODBC 3.x |
Previous Message | Zubkovsky, Sergey | 2007-07-24 11:37:27 | Re: Varchar parameter conversion |