Re: CCommand::Open inconsistency across providers
Phil Allan-Harding <[email protected]> Fri, 2 Aug 2002 10:17:05 +0100
| Newsgroups | gmane.comp.windows.devel.oledb.devel |
|---|---|
| Message-ID | <[email protected]> |
I could be wrong here, but I believe that if you enable OLEDB services, specifically the client cursor engine, and specify the client cursor engine property in your list of properties in your oledb command call, then the number of rows affected will be populated correctly. Regards, Phillip Allan-Harding Graphicboost Ltd. Tel: +44(0) 161 980 4136 Mobile: +44(0) 7778 561119 Email: [email protected] <mailto:[email protected]> Web: http://www.graphicboost.com <http://www.graphicboost.com> -----Original Message----- From: Vagif Abilov [mailto:[email protected]] Sent: Friday, 02 August 2002 02:14 Subject: Re: 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.