Numeric datatype doesn"t match those from older driver version ?

Numeric datatype doesn"t match those from older driver version ?

am 06.12.2008 09:20:49 von Lothar Behrens

Hi,

I am now using the current ODBC driver (8.3.0400 Unicode) for my
application.
Compared to my SQL_ASCII database installation (and the 07.03.0200
driver version)
I get wrong column type information.

The numbers I get now are negative. I didn't have seen any switch to
change this to be
equal to the old driver.

What is wrong ?

Thanks

Lothar

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Numeric datatype doesn"t match those from older driverversion ?

am 07.12.2008 01:55:12 von Hiroshi Inoue

Lothar Behrens wrote:
> Hi,
>
> I am now using the current ODBC driver (8.3.0400 Unicode) for my
> application.
> Compared to my SQL_ASCII database installation (and the 07.03.0200
> driver version)
> I get wrong column type information.
>
> The numbers I get now are negative.

Maybe you are looking at
SQL_WCHAR(-8)
SQL_WVARCHAR(-9)
SQL_WLONGVARCHAR(-10)
..

> I didn't have seen any switch to change this to be
> equal to the old driver.

Please use the ANSI version driver.
If you compile the program with win32.mak please type
nmake /f win32.mak ANSI_VERSION=yes
and you would get psqlodbc30a.dll and pgenlista.dll
instead of psqlodbc35w.dll and pgenlist.dll.

regards,
Hiroshi Inoue

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Numeric datatype doesn"t match those from older driver version ?

am 13.12.2008 10:49:41 von Lothar Behrens

On Dec 7, 1:55 am, in...@tpf.co.jp (Hiroshi Inoue) wrote:
> Lothar Behrens wrote:
> > Hi,
>
> > I am now using the current ODBC driver (8.3.0400 Unicode) for my
> > application.
> > Compared to my SQL_ASCII database installation (and the 07.03.0200
> > driver version)
> > I get wrong column type information.
>
> > The numbers I get now are negative.
>
> Maybe you are looking at
> SQL_WCHAR(-8)
> SQL_WVARCHAR(-9)
> SQL_WLONGVARCHAR(-10)
> .
>
> > I didn't have seen any switch to change this to be
>
> > equal to the old driver.
>
> Please use the ANSI version driver.
> If you compile the program with win32.mak please type
> nmake /f win32.mak ANSI_VERSION=yes
> and you would get psqlodbc30a.dll and pgenlista.dll
> instead of psqlodbc35w.dll and pgenlist.dll.
>

Isn't UTF-8 the unicide version ?
My database is encoded with that.

Lothar

> regards,
> Hiroshi Inoue
>
> --
> Sent via pgsql-odbc mailing list (pgsql-o...@postgresql.org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-odbc


--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Numeric datatype doesn"t match those from older driverversion ?

am 14.12.2008 01:50:49 von Hiroshi Inoue

Lothar Behrens wrote:
> On Dec 7, 1:55 am, in...@tpf.co.jp (Hiroshi Inoue) wrote:
>> Lothar Behrens wrote:

>> Please use the ANSI version driver.
>> If you compile the program with win32.mak please type
>> nmake /f win32.mak ANSI_VERSION=yes
>> and you would get psqlodbc30a.dll and pgenlista.dll
>> instead of psqlodbc35w.dll and pgenlist.dll.
>
> Isn't UTF-8 the unicide version ?
> My database is encoded with that.

You can handle the UTF-8 database with Unicode or
ANSI version driver.
If you would handle the (var)char data as UTF-8
strings, please use the ANSI driver.
If you would handle the (var)char data as UTF-16
strings, please use the Unicode driver.

regards,
Hiroshi Inoue

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Numeric datatype doesn"t match those from older driver version ?

am 17.12.2008 10:57:28 von Lothar Behrens

On 14 Dez., 01:50, in...@tpf.co.jp (Hiroshi Inoue) wrote:
> Lothar Behrens wrote:
> > On Dec 7, 1:55 am, in...@tpf.co.jp (Hiroshi Inoue) wrote:
> >> Lothar Behrens wrote:
> >> Please use the ANSI version driver.
> >> If you compile the program with win32.mak please type
> >> =A0 =A0 =A0 =A0 nmake /f win32.mak ANSI_VERSION=3Dyes
> >> and you would get psqlodbc30a.dll and pgenlista.dll
> >> instead of psqlodbc35w.dll and pgenlist.dll.
>
> > Isn't UTF-8 the unicide version ?
> > My database is encoded with that.
>
> You can handle the UTF-8 database with Unicode or
> ANSI version driver.
> If you would handle the (var)char data as UTF-8
> strings, please use the ANSI driver.
> If you would handle the (var)char data as UTF-16
> strings, please use the Unicode driver.
>

Thank you,

that works great.

Lothar

> regards,
> Hiroshi Inoue
>
> --
> Sent via pgsql-odbc mailing list (pgsql-o...@postgresql.org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/p=
gsql-odbc


--=20
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Numeric datatype doesn"t match those from older driver version ?

am 17.12.2008 21:10:43 von Adam M

On Sat, Dec 13, 2008 at 6:50 PM, Hiroshi Inoue wrote:
> You can handle the UTF-8 database with Unicode or
> ANSI version driver.
> If you would handle the (var)char data as UTF-8
> strings, please use the ANSI driver.
> If you would handle the (var)char data as UTF-16
> strings, please use the Unicode driver.

I did not know that! I've always *assumed* that ASCII version was for
ASCII databases only. ASCII generally means 7-bit encoding, not 8-bit
like UTF-8.

Maybe a better name for the drivers would be,
psqlodbc.msi
psqlodbc-multibyte.msi

and most Windows users (I hope) would assume what you wrote.

- Adam

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Numeric datatype doesn"t match those from older driver version ?

am 17.12.2008 21:14:02 von Dave Page

On Wed, Dec 17, 2008 at 8:10 PM, Adam M wrote:
> I did not know that! I've always *assumed* that ASCII version was for
> ASCII databases only. ASCII generally means 7-bit encoding, not 8-bit
> like UTF-8.

ANSI, not ASCII in this case. And feel free to blame Microsoft for the
convention :-)

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Numeric datatype doesn"t match those from older driver version ?

am 18.12.2008 06:33:56 von Adam M

On Wed, Dec 17, 2008 at 2:14 PM, Dave Page wrote:
> On Wed, Dec 17, 2008 at 8:10 PM, Adam M wrote:
>> I did not know that! I've always *assumed* that ASCII version was for
>> ASCII databases only. ASCII generally means 7-bit encoding, not 8-bit
>> like UTF-8.
>
> ANSI, not ASCII in this case. And feel free to blame Microsoft for the
> convention :-)

http://en.wikipedia.org/wiki/ANSI_art

I do blame Microsoft if they are calling UTF-8 ANSI? To me ANSI was
back in the 1980s with BBSs and extended ASCII codes. ANSI terminals
allowed scrolling around, etc..

Thanks for the clarification!

- Adam

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc

Re: Numeric datatype doesn"t match those from older driver version ?

am 18.12.2008 09:37:50 von Dave Page

On Thu, Dec 18, 2008 at 5:33 AM, Adam M wrote:
>
> http://en.wikipedia.org/wiki/ANSI_art
>
> I do blame Microsoft if they are calling UTF-8 ANSI? To me ANSI was
> back in the 1980s with BBSs and extended ASCII codes. ANSI terminals
> allowed scrolling around, etc..

It comes from the Microsoft conventions that sprung up when they added
the Unicode APIs. For function CreateFoo, they created CreateFooA and
CreateFooW - the A version being the ANSI, the W being the Wide
character (or Unicode UTF-16). If you program without the UNICODE
macro defined, CreateFoo maps to CreateFooA, otherwise to CreateFooW.

In the ODBC driver world, the ANSI drivers can be made to handle
multibyte characters through the ANSI interface, however, if you want
'proper' UTF-16 support used natively by modern versions of Windows,
you need the Unicode API extensions. psqlODBC kinda stretches this to
the limits with the multibyte support in the ANSI driver, which
doesn't play well with the UTF-16 support with some applications -
hence the use of two drivers.

--
Dave Page
EnterpriseDB UK: http://www.enterprisedb.com

--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc