From: igg via SQLMonster.com on
c++ ado
strcpy(sqlbuf, "select a, b, c, (case when (y=2) then d else null end) as
d
pRS->Open(sqlbuf,vtMissing, AdoNS::adOpenKeyset, AdoNS::adLockBatchOptimistic,
-1);
while(pRS->adoEOF == false)
{
//how do i read the values a, b, c and d?.
//When i try to read the value d , i get the mismatch error.
}

--
Message posted via http://www.sqlmonster.com

From: John Bell on
On Sat, 01 May 2010 12:07:31 GMT, "igg via SQLMonster.com"
<u53571(a)uwe> wrote:

>c++ ado
>strcpy(sqlbuf, "select a, b, c, (case when (y=2) then d else null end) as
>d
>pRS->Open(sqlbuf,vtMissing, AdoNS::adOpenKeyset, AdoNS::adLockBatchOptimistic,
>-1);
>while(pRS->adoEOF == false)
>{
> //how do i read the values a, b, c and d?.
> //When i try to read the value d , i get the mismatch error.
>}

Hi

You can find ado code examples here:
http://msdn.microsoft.com/en-us/library/ms677563(VS.85).aspx

John