public inbox for [email protected]  
help / color / mirror / Atom feed
From: Inoue,Hiroshi <[email protected]>
To: Marsupilami79 <[email protected]>
Cc: [email protected]
Subject: Re: SQLGetConnectAttrW + SQL_ATTR_CURRENT_CATALOG => wrong byte count?
Date: Wed, 30 Nov 2022 20:19:52 +0900
Message-ID: <CAFGcedVioNNaedu4fiCFNOL=7LKC41gf5eWgDCz3CHd-CL8K3g@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

Hi Jan,

The psqlodbc unicode driver correctly returns the number of bytes(10 bytes
for a database name "visco")  here.

regards,
Hiroshi Inoue

2022年11月23日(水) 0:57 Marsupilami79 <[email protected]>:

> Hello,
>
> I am a co author of a data access library and we recently added an ODBC
> bridge. This bridge has the capability to detemine the current Catalog /
> Database. This is done by calling SQLGetConnectAttrW.
>
> We try to determine the size of the buffer that is needed for the
> catalog name in the following manner:
> SQLGetConnectAttrW(fHDBC, SQL_ATTR_CURRENT_CATALOG, null, 0, &aLen)
>
> The ODBC driver for Microsoft SQL server correctly returns the number of
> bytes required (10 bytes for the Database name "Stork") in the aLen
> parameter. The ODBC driver for PostgreSQL returns the number of
> characters (8 characters for a database named "topsales"), where it
> should return 16 for the number of bytes required.
>
> I tested this with the psqlodbc_13_02_0000-x86 download for Windows 10
> and installed the Unicode ODBC driver.
>
> I assume this is a bug and needs to be fixed. I just don't know if this
> is the right place to report the bug to?
>
> With best regards,
>
> Jan
>
>
>


view thread (7+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: SQLGetConnectAttrW + SQL_ATTR_CURRENT_CATALOG => wrong byte count?
  In-Reply-To: <CAFGcedVioNNaedu4fiCFNOL=7LKC41gf5eWgDCz3CHd-CL8K3g@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox