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