Skip site navigation (1) Skip section navigation (2)

v7.01.00.07 driver fails to properly report BOOL values usingCRecordsets (VC++)

From: Kristis Makris <kristis(dot)makris(at)datasoft(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: v7.01.00.07 driver fails to properly report BOOL values usingCRecordsets (VC++)
Date: 2001-09-27 22:00:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
Hello all,

I took the v7 driver for a test drive and it looks like it properly
reports all referential integrity errors reported from the backend (this
was a bug in the v6). Kudos to the devel team; you guys are doing a
superb job hunting down and fixing those bugs :)

I did come across something peculiar though. It seems to me that ever
since I updated to the v7, the driver incorrectly reports the BOOL
values retrieved from the backend. I first noticed this (?bug?) in the
following snippet of code using VC++ and a CRecordset object.

strStmt = "SELECT someBackendFunctionThatReturnsBOOL('someTextValue') AS
rsSelect.Open(CRecordset::forwardOnly, strStmt);

 if (db.CanTransact())

  while (!rsSelect.IsEOF())
	  rsSelect.GetFieldValue("answer", vID, SQL_C_SSHORT);

After going through the debug mode of Visual Studio using both the v6
and v7 drivers I verified that the value of vID.m_iVal was set to 1 if
the BOOL return value was true and 0 if false using the v6 (and probably
older versions v5, v4). Now the vID.m_iVal is always set to 0,
regardless of the return value of the backend function. Maybe I'm using
the wrong fieldType (SQL_C_SSHORT); how do other VC++ users retrieve
BOOL values using a CRecordset? Did anybody else come across this



pgsql-odbc by date

Next:From: Keith GrayDate: 2001-09-27 23:15:34
Subject: Bug with ADORecordSet.Update
Previous:From: Dave PageDate: 2001-09-27 16:20:08
Subject: Re: SQLSERVER

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group