pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bożena Potempa <Bozena.Potempa@otc.pl>
To: pgsql-odbc@postgresql.org
Subject: PostgreSQL+ Beta bug?
Date: Fri, 15 Nov 2002 17:24:43 +0100
Message-ID: <MKEIIFDEFPOPHIPFIFJCMEEFDHAA.Bozena.Potempa@otc.pl> (raw)

Dear Authors of PostgreSQL ODBC driver,

I am trying to use PostgreSQL+ Beta driver on Windows 2000.
It works very well with one exception. When I try to
insert a char value including 0 then the remaing characters
are lost. And example:

simple table: create table t (fc varchar(5))

The program code (runable in MS VC++ 6.0):
// connect and allocate a statement handle hstmt
HSTMT hstmt;
RETCODE rc;
char fc[5];
SQLINTEGER fcl;

rc = SQLPrepare(hstmt, "insert into t values(?)", SQL_NTS);
rc = SQLBindParameter(hstmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR,
               SQL_VARCHAR, 5, 0, fc, sizeof(fc), &fcl);
fc[0]=1;
fc[1]=0;
fc[2]='a';
fcl=3; /* string length */
rc = SQLExecute(hstmt);
// disconnect
-----

After this please check in psql:
select ascii(substring(fc,1,1)) from t; - 1, OK
select ascii(substring(fc,2,1)) from t; - 0, OK
select ascii(substring(fc,3,1)) from t; - 0 - lost value 'a'

Please let me know if this is a known bug and what is the possibility
of fixing this.

Best regards,
Bozena Potempa
OTC
Poland




view thread (13+ messages)  latest in thread

Message-ID: <MKEIIFDEFPOPHIPFIFJCMEEFDHAA.Bozena.Potempa@otc.pl>
Permalink:  ../MKEIIFDEFPOPHIPFIFJCMEEFDHAA.Bozena.Potempa@otc.pl/
Also on:    postgresql.org/message-id/MKEIIFDEFPOPHIPFIFJCMEEFDHAA.Bozena.Potempa@otc.pl

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: Bozena.Potempa@otc.pl
  Subject: Re: PostgreSQL+ Beta bug?
  In-Reply-To: <MKEIIFDEFPOPHIPFIFJCMEEFDHAA.Bozena.Potempa@otc.pl>
  References: <MKEIIFDEFPOPHIPFIFJCMEEFDHAA.Bozena.Potempa@otc.pl>

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

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