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

Are multiple selects of the same field allowed usingCRecordset::GetFieldValue() ?

From: Kristis Makris <kristis(dot)makris(at)datasoft(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Are multiple selects of the same field allowed usingCRecordset::GetFieldValue() ?
Date: 2002-02-19 23:54:48
Message-ID: 1014162889.1044.108.camel@leonidas (view raw or flat)
Thread:
Lists: pgsql-odbc
Hello,

I've recently begun using the v7.01.0010 ODBC driver Hiroshi made
available. I'm issuing the following SQL statement:

"SELECT id, id FROM WaterResource"

Using VC++ I'm executing the following:

++++++++++++++
while (!rsNewRecords.IsEOF())
	{
	 	rsNewRecords.GetFieldValue("id", vID, SQL_C_SLONG);
		rsNewRecords.GetFieldValue(strFieldName, strValue);
		[...]
			
		rsNewRecords.MoveNext();
	}
++++++++++++++

When execution hits the second .GetFieldValue() call with strFieldname
being = "id" I get an exception, something that did not happen using the
v7.01.0008 driver

As I understand, when .GetFieldName() is used once to retrieve the value
of a field, a subsequent call to retrieve the exact same field fails.
But in the case of selecting (and thus retrieving) a column twice,
shouldn't two calls be possible/allowed for reading that field's value
twice?

Thanks,
-Kristis



Responses

pgsql-odbc by date

Next:From: Tatsuo IshiiDate: 2002-02-20 00:50:55
Subject: Re: UTF-8 data migration problem in Postgresql 7.2
Previous:From: Jean-Michel POUREDate: 2002-02-19 21:33:43
Subject: Re: [HACKERS] UTF-8 data migration problem in Postgresql 7.2

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