ADP datasheet recordset problem

  • Thread starter Thread starter JP
  • Start date Start date
J

JP

I'm using the standard filter and sort functionality in a datasheet view.
I'm finding that both the RecordSet and RecordsetClone properties are the
same even after filtering and/or sorting. The RecordSetClone should
represent the data after filtering and sorting. Instead they both represent
the data as the datasheet appears with no filter or sort.

This is only the case with an ADP project. With an MDB project the
RecordSetClone represents the datasheet after filtering and sorting.
How do I get a recordset that accurately represents the datasheet after
filtering and sorting?



TIA, JP
 
I'm using the standard filter and sort functionality in a datasheet view.
I'm finding that both the RecordSet and RecordsetClone properties are the
same even after filtering and/or sorting. The RecordSetClone should
represent the data after filtering and sorting. Instead they both represent
the data as the datasheet appears with no filter or sort.

I don't know how you define the word "should".
This is only the case with an ADP project. With an MDB project the
RecordSetClone represents the datasheet after filtering and sorting.
How do I get a recordset that accurately represents the datasheet after
filtering and sorting?

ADPs and MDBs are very different animals. ADPs were desinged to be
superficially enough similar to MDBs to make the dissonance as minor as
possible, but in the case of the form's RecordsetClone, it is not even defined
how that should be affected by a filter applied the the form, and so I would
never expect any specific behavior other than what is observed by experiment.
I certainly would not assume the same behavior would be preserved between ADPs
and MDBs, particularly since the Filter and Clone methods of DAO and ADO
recordsets are not even the same.
 
With ADO, the Clone method of the Recordset only return a new cursor: they
both point to the same underlying data but can be moved independantly and
bookmarks are valid in all clones.

However, if you make a requery on one of these cursors, then you will have
to independant recordsets.

S. L.
 
So How do I get to the data in the displayed datasheet after it is sorted
and filtered? I can see it in the display but I can't find a way to access
it.

Is this where bookmarks come into play? Is the data in the display
bookmaked in the recordset? I've never used bookmarks and have not found
much in the way of examples or documentation on there use.

Microsoft article:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;294202
uses the RecordSetClone to enumerate the records, and the article claims to
be applicable to ADP, but the method does not work after sorting and
filtering.

JP
 
Funny thing, I don't know the answer to your question because I've always
thought that using datasheets was a bad idea precisely because of the lack
of control we have on them.

Personally, I use only forms based on stored procedures, with filtering and
sorting requirements passed as parameters to these stored procedures. More
difficult to code but with 100% control.

S. L.
 
Back
Top