467,149 Members | 1,269 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,149 developers. It's quick & easy.

recordCount incorrect for Distinct Clause in Quer

Gyanchand
I have recently migrated DB from Sql Server 2000 to Sql Server 2005.
Ever since, when i fire queries with a DISTINCT clause, the recordcount property returns the result as -1.

I am using the record set as:
Sql ="Select dictinct fieldName from tbTableName"
rs.Open Sql,ObjConn,adOpenStatic,adLockPessimistic

However when i tried removing the Lock Type property from the recordset, it reurns the correct recordcount. Can anyone tell me why is this happening. Is there any setting that needs to be done in Sql Server 2005
Jan 6 '09 #1
  • viewed: 1858
Share:
1 Reply
ck9663
Expert 2GB
I think this is more of a VBA/ASP question than a sql server question. Try posting it to the Programming Forum and they might be able to help you more.

-- CK
Jan 6 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Martin Feuersteiner | last post: by
10 posts views Thread by Farmer | last post: by
1 post views Thread by qqmbers@gmail.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.