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 using CRecordsets (VC++) |
Date: | 2001-09-27 22:00:32 |
Message-ID: | 200109272200.f8RM0ak54115@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
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
answer";
rsSelect.Open(CRecordset::forwardOnly, strStmt);
if (db.CanTransact())
db.BeginTrans();
while (!rsSelect.IsEOF())
{
rsSelect.GetFieldValue("answer", vID, SQL_C_SSHORT);
rsSelect.MoveNext();
}
**********************************************************************
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
problem?
Thanks,
-Kristis
From | Date | Subject | |
---|---|---|---|
Next Message | Keith Gray | 2001-09-27 23:15:34 | Bug with ADORecordSet.Update |
Previous Message | Dave Page | 2001-09-27 16:20:08 | Re: SQLSERVER |