Filtering distinct values in recordset

Results 1 to 3 of 3

Thread: Filtering distinct values in recordset

  1. #1
    Join Date
    Dec 1969

    Default Filtering distinct values in recordset

    Scenario: I retrieve recordset using SQL and would like to put distinct occurances of a field, say LastName, in drop-down box at top of table which, onClick, would then filter displayed recordset using client-side script. I can do filtering just fine using DHTML object model. My Q is how best to populate drop-down box. Method one is to run separate SQL query on server and write-out contents to drop-down. But to avoid 2 trips to database, can i do select distinct query on retrieved recordset of transactions or use some other process to achieve same results. Thanks in advance for ideas...

  2. #2
    Vinoo Uttarkar Guest

    Default RE: Filtering distinct values in recordset

    I think there is no way you can query the recordset you have got and retreive the distinct values. I think you should take some programming alternative to do the job.

  3. #3
    Join Date
    Dec 1969

    Default RE: Filtering distinct values in recordset

    You can use the Filter property of the Recordset object<BR><BR>recordset.Filter(val)<BR><BR>you will need to use correct settings for:<BR>cursor location<BR>locktype<BR>cursor type<BR><BR>I was looking for some info after i saw your post on the moderated board. thought someone wight be able to give you a better answer, and left it...<BR>Then came over here and read a reply to your post, and was so annoyed that people even bother to say..."er, i don&#039t think you can do it"...cause that&#039s kind of destructive disinformation.<BR><BR>Wrox have a very good book that will help you out:<BR>"ADO and RDS programming"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts