Re: bind HTML table to ADO persisted recordset client-side



To answer my own question ...

The executeoptions and fetchoptions params are the default values, and
recommended for better performance in docs at MS.

Also after skimming the docs, I replaced the sql and connect params with a
single url param pointing at the datafile.

I'm still wondering if 5 seconds for a refresh of only 650 records is
reasonable. If so, is the time lost in the binding operation? We have
static pages, with the same amount of data, that load "instantly".

Thanks,
Bruce

"Bruce Hensley" <nobody@nowhere> wrote in message
news:eo4FhPQxFHA.700@xxxxxxxxxxxxxxxxxxxxxxx
> Mark,
>
> Thanks. I got it working with the object tag as follows ...
>
> <OBJECT classid="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33" ID="dc"
> style="display:none">
> <PARAM NAME="SQL" VALUE="full path to data file.adtg">
> <PARAM NAME="CONNECT" VALUE="Provider=MSPersist">
> </OBJECT>
> <TABLE id="table1" datasrc="#dc">
>
> It needed no other startup code. And I got the column sort I was after
with
> the following ...
>
> sub table1_onclick
> dc.sortcolumn = window.event.srcElement.id 'with an id spec'd on each
> column
> dc.refresh
> end sub
>
> Would the other parameters in your example help performance? It currently
> takes about 4-5 seconds to load 650 records from a local fileshare (or
> refresh after clicking a column to sort).
>
> Thanks again for your help.
>
> Bruce
>
> "Mark J. McGinty" <mmcginty@xxxxxxxxxxxxxxx> wrote in message
> news:rcL_e.172088$Ji4.44694@xxxxxxxxxxxxx
> >
> > "Bruce Hensley" <nobody@nowhere> wrote in message
> > news:OboX04FxFHA.3644@xxxxxxxxxxxxxxxxxxxxxxx
> > > Mark,
> > >
> > > Thanks. After looking into RDS, this is approximately what I have ...
> > >
> > > <html><head><title>test</title>
> > > <script language="VBScript">
> > > const cn = "Provider=MSPersist"
> >
> > Connection is unnecessary.
> >
> > > const df = "full path to datafile.adtg"
> > > dim rs
> > > set rs = createobject("ADODB.Recordset")
> > > rs.open df, cn
> > > msgbox rs.recordcount 'gives accurate result
> > > dim dc
> > > set dc = createobject("RDS.DataControl")
> > > dc.SourceRecordset = rs
> >
> > This should be:
> >
> > Set dc.SourceRecordset = rs
> >
> > I've never done the RDC that way, I've always defined an object tag, and
> > then referenced it as a property of the document. (This is not to say
it
> > won't work that way, just that I've never done it.)
> >
> > <OBJECT id=RDC1 style="DISPLAY: none"
> > VIEWASTEXT classid=clsid:BD96C556-65A3-11D0-983A-00C04FC29E33>
> > <PARAM NAME="ExecuteOptions" VALUE="2">
> > <PARAM NAME="FetchOptions" VALUE="3">
> > <PARAM NAME="InternetTimeout" VALUE="30000">
> > </OBJECT>
> >
> > As you can see there are no data details, I hooked it up in script on
the
> > fly, as you are doing. So it becomes:
> >
> > Set document.RDC1.SourceRecordset = rs
> >
> > -Mark
> >
> >
> >
> > > dc.refresh 'error: One or more arguments are invalid
> > > </script></head><body>
> > > <table datasrc="#dc">
> > > <tbody>
> > > <tr>
> > > <td><span datafld="fieldname1"></span></td>
> > > <td><span datafld="fieldname2"></span></td>
> > > <td><span datafld="fieldname3"></span></td>
> > > </tr>
> > > </tbody></body></html>
> > >
> > > The msgbox accurately reflects the recordcount.
> > >
> > > However, the dc.refresh throws the error "One or more arguments are
> > > invalid". Without the dc.refresh line I get no errors, but I get no
> data
> > > in
> > > the table.
> > >
> > > TDC = Tabular Data Control ... a data source object that can handle
> simple
> > > delimited text files, like CSVs. Instead of persisting the source
> > > recordset
> > > to open in this HTM, I thought I might write a CSV from it, starting
> with
> > > the result of a recordset.GetString.
> > >
> > > Is ADOR another alternative?
> > >
> > > Thanks for your help.
> > >
> > > Bruce
> > >
> > > "Mark J. McGinty" <mmcginty@xxxxxxxxxxxxxxx> wrote in message
> > > news:%23uETtaFxFHA.3312@xxxxxxxxxxxxxxxxxxxxxxx
> > >>
> > >> "Bruce Hensley" <nobody@nowhere> wrote in message
> > >> news:eJgYKNExFHA.1412@xxxxxxxxxxxxxxxxxxxxxxx
> > >> > I've seen hints that it is possible to bind an HTML table to an ADO
> > >> > recordset, but I can't find an example.
> > >> >
> > >> > I would like to persist a disconnected recordset on the local
client,
> > > then
> > >> > open it (read-only) from DHTML and bind it to a table. I want to
use
> > >> > recordset.sort and .filter to manipulate the display dynamically.
> > >> >
> > >> > I can find info and examples on binding to XML data islands, TDC,
and
> > >> > others, but not just to a recordset. Am I missing something?
> > >>
> > >> Persisted to a file on the client and persisted to a data island are
> > > really
> > >> the same basic things, you can open a recordset by passing it an XML
> > >> DOMDocument object (which exposes an IStream) or you can open it by
> > > passing
> > >> it a file name, or even a URL -- it makes no difference really.
> > >>
> > >> Not sure what TDC is -- do you mean RDC? You will want to use an RDC
> > > object
> > >> but you can hook it up to data on the fly, by setting its
> SourceRecordset
> > >> property to an open recordset object. Sort it using the
RDC.recordset
> > >> property.
> > >>
> > >> Not that I want to be disingenous about the task, but there isn't
much
> > > more
> > >> to it than that, and the databound-related attributes on the table
and
> > >> its
> > >> cells.
> > >>
> > >>
> > >> -Mark
> > >>
> > >>
> > >>
> > >>
> > >> > Thanks,
> > >> > Bruce
> > >> >
> > >> >
> > >>
> > >>
> > >
> > >
> >
> >
>
>


.