Unix Technical Forum

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

This is a discussion on Re: Windows, ODBC drivers and strange points ... within the pgsql Interfaces odbc forums, part of the PostgreSQL category; --> > -----Original Message----- > From: Marten Feldtmann [mailto:m.feldtmann@t-online.de] > Sent: 10 October 2005 12:11 > To: Dave Page > ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces odbc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-16-2008, 01:28 AM
Dave Page
 
Posts: n/a
Default Re: Windows, ODBC drivers and strange points ...



> -----Original Message-----
> From: Marten Feldtmann [mailto:m.feldtmann@t-online.de]
> Sent: 10 October 2005 12:11
> To: Dave Page
> Cc: pgsql-odbc@postgresql.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/de...y/en-us/intl/u
nicode_2bj9.asp) iirc.

Regards, Dave

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:35 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com