Re: CCommand::Open inconsistency across providers
Kim Gräsman <[email protected]> Fri, 2 Aug 2002 09:09:55 +0200
| Newsgroups | gmane.comp.windows.devel.oledb.devel |
|---|---|
| Message-ID | <[email protected]> |
Vagif & Alex, I've decided to never depend on it, since the SQL Server provider doesn't return record counts. If there are inconsistencies in between providers, that sounds like another reason to leave it a dummy parameter. // kim > -----Original Message----- > From: Vagif Abilov [mailto:[email protected]] > Sent: den 2 augusti 2002 08:04 > To: [email protected] > Subject: Re: CCommand::Open inconsistency across providers > > > It's a long time since I was using Jet. AFAIK Jet supports > record count, > i.e. it never returns "-1". In principle value "0" should > mean that there > are no records in the result list. > > > .................................. > Vagif Abilov > > > > > -----Original Message----- > From: OLEDB_DEV [mailto:[email protected]]On > Behalf Of Alex > Ivanoff > Sent: 2. august 2002 06:10 > To: [email protected] > Subject: Re: [OLEDB_DEV] CCommand::Open inconsistency across providers > > > 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. 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.