Re: CCommand::Open inconsistency across providers

Alex Ivanoff <[email protected]> Thu, 1 Aug 2002 23:10:24 -0500
Newsgroups gmane.comp.windows.devel.oledb.devel
Organization FDTD
Message-ID <[email protected]>
You right, -1 means the numbre of affected rows is unavailable. But why
Jet provider returns 0? Should it not return -1 as well?


-----Original Message-----
From: OLEDB_DEV [mailto:[email protected]] On Behalf Of
Vagif Abilov
Sent: Thursday, August 01, 2002 20:14
To: [email protected]
Subject: Re: [OLEDB_DEV] CCommand::Open inconsistency across providers


There is nothing inconsistent in it. I don't have OLE DB specs with me
now, but as far as I remember, if you get -1, it means that number of
affected rows is unavailable, while any non-negative number means actual
counter value.

Bear in mind that most of SQL databases have no way of SELECT result set
size calculation other than just count all rows, so they don't do it
unless you ask (for example by execution SELECT COUNT(*) statement).

Hope this helps

Vagif Abilov
[email protected]

----- Original Message -----
From: "Alex Ivanoff" <[email protected]>
To: <[email protected]>
Sent: Friday, August 02, 2002 12:48 AM
Subject: [OLEDB_DEV] CCommand::Open inconsistency across providers


> When I call CCommand::Open(session, L"SELECT * from Table", propSet,
> pRowsAffected) with SQLOLEDB, pRowsAffected is set to -1. When I make
> this very call with Microsoft Jet 4.0 provider, pRowsAffected is set
> to 0. Is there a way to get consistent behavior?
>
> You can read messages from the OLEDB_DEV archive, unsubscribe from
OLEDB_DEV,
> or subscribe to other DevelopMentor lists at
> http://discuss.develop.com.
>
>

You can read messages from the OLEDB_DEV archive, unsubscribe from
OLEDB_DEV, or subscribe to other DevelopMentor lists at
http://discuss.develop.com.

You can read messages from the OLEDB_DEV archive, unsubscribe from OLEDB_DEV,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.