Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesHi, can anyone shed some light on this issue? SELECT Status from lupStatus with a normal query it returns the correct recordcount SELECT Status from lupStatus GROUP BY Status but with a GROUP By clause or DISTINCT clause it return the recordcount = -1
Post Follow-up to this messageWhich application are you using? If it is VB then it shold be client side cursor Madhivanan
Post Follow-up to this messageMadhivanan, thanks for your response, we are not using client side cursor, but server side (the query work fine, adLockReadonly but it doesn't work when we use adLockOptimistic) VB COM
Post Follow-up to this messageJacek (jack.pedzikiewicz@gmail.com) writes: > Madhivanan, thanks for your response, we are not using client side > cursor, but server side (the query work fine, adLockReadonly but it > doesn't work when we use adLockOptimistic) VB COM So the count we are talking about is Recordset.RecordCount? What cursor type do you ask for? A query with GROUP BY or DISTINCT can only result in a static or forward-only cursor, and it cannot be updatable. A static cursor has a rowcount, a forward-only cursor has not. -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techin.../2000/books.asp
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread