Re: Windows, ODBC drivers and strange points ...

From: "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk>
To: "Marten Feldtmann" <m(dot)feldtmann(at)t-online(dot)de>
Cc: <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: Windows, ODBC drivers and strange points ...
Date: 2005-10-10 12:32:23
Message-ID: E7F85A1B5FF8D44C8A1AF6885BC9A0E4CC32B5@ratbert.vale-housing.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

> -----Original Message-----
> From: Marten Feldtmann [mailto:m(dot)feldtmann(at)t-online(dot)de]
> Sent: 10 October 2005 12:11
> To: Dave Page
> Cc: pgsql-odbc(at)postgresql(dot)org
> Subject: Re: [ODBC] Windows, ODBC drivers and strange points ...
>
> This means, that under PostgreSQL one should in general quote
> the column names when creating them ? Do I also have to quote
> them in the SELECT statements ???

Yes, if you want to use mixed case.

> Ok, this is true - but this is not my problem. How do I get
> to know, that
> the source type is either SQL_C_CHAR or SQL_C_WCHAR - this is
> the problem.
>
> I thought this would be possible with the COlumnDesc function
> - but this
> seems not to be the case.

Yeah, that'll just tell you that its SQL_LONGVARCHAR or whatever. As a
general rule, apps will just ask for whatever they want and the driver
will conver as best it can.

In your case, it'd probably be easier to use the ANSI driver, then of
course you know there's no Unicode in sight.

> By the way: what happens if you have UNICODE values in the buffer and
> you want the target type SQL_C_CHAR ??? Is this allowed ?
> What code page
> is then used ? The system code page or the application code page ?

It converts to the system ANSI (CP_ACP) using WideCharToMultiByte
(http://msdn.microsoft.com/library/default.asp?url=/library/en-us/intl/u
nicode_2bj9.asp) iirc.

Regards, Dave

Browse pgsql-odbc by date

  From Date Subject
Next Message Dave Page 2005-10-10 12:34:19 Re: Problem with psqlODBC on "Cache Size"
Previous Message Christian Schröder 2005-10-10 11:46:33 Re: Windows, ODBC drivers and strange points ...