Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Why use disconnected recordsets?

15 views
Skip to first unread message

Billie H. Cleek

unread,
Jan 7, 2000, 3:00:00 AM1/7/00
to
I'm trying to figure out what advantage one has when using a disconnected
recordset. Since the cursor must be clientside to use a disconnected
recordset, what's the advantage of disconnecting it?

Any input would be helpful.

Thanks,
Billie H. Cleek

Egbert Nierop

unread,
Jan 8, 2000, 3:00:00 AM1/8/00
to
1)
if you have an application that uses several tiers (ie. computers) it is
very usefull because the database server is not responsible for keeping a
copy of the recordset in RAM
This is most usefull if the data is read-only (for instance reports are
always read-only)

2)
The client computers keeps in that case a copy of the recordset. In the case
of an updatable recordset the clientcursor does NOT represent the whole
recordset but it represents the active index of the table (see the Rs.Open
options)
3)
I use the client cursor at webserver because of it's better performace when
doing MoveNext

For instance
Set fld1 = Rs("afield")
Do Until Rs.Eof
Response.Write fld1
Rs.MoveNext
Loop

the loop above is 2x faster than a ado recordset that is depending on the
adUseServer option
4)
For very small recordsets it is always better to use a server cursor

Billie H. Cleek <bcl...@actmo.com> wrote in message
news:ejOzC0VW$GA....@cppssbbsa02.microsoft.com...

Egbert Nierop

unread,
Jan 8, 2000, 3:00:00 AM1/8/00
to
sorry,

advantage nr one is that the recordset can float to anywhere and the while
disconnected. This greatly can improve scalability for the db.


Thomas Wagner

unread,
Jan 9, 2000, 3:00:00 AM1/9/00
to
Hello Egbert,

"disconnected"-recordsets do also a good job for read/write-access
(BatchUpdate).

Greetings,
Thomas Wagner


"Egbert Nierop" <e.ni...@spammeandispamyouevenbetter.com> schrieb im
Newsbeitrag news:#lkxMzaW$GA.76@cppssbbsa05...

Billie H. Cleek

unread,
Jan 10, 2000, 3:00:00 AM1/10/00
to
This still doesn't really answer my question. Let's say I have a read-only,
client-side cursor recordset. What, then, is the advantage of disconnecting
it?


Egbert Nierop <e.ni...@spammeandispamyouevenbetter.com> wrote in message

Joost Devos

unread,
Jan 10, 2000, 3:00:00 AM1/10/00
to
Billie,

Have a quick look at
http://www.able-consulting.com/WebApp98/WebBased.htm
and read the section: What is RDS ? there lies an answer...

Joost Devos
Which (long) way do you want to go ?

Kirk Allen Evans

unread,
Jan 10, 2000, 3:00:00 AM1/10/00
to
In article <uL4kpm4W$GA....@cppssbbsa02.microsoft.com>,

"Billie H. Cleek" <bcl...@actmo.com> wrote:
> This still doesn't really answer my question. Let's say I have a read-
only,
> client-side cursor recordset. What, then, is the advantage of
disconnecting
> it?

Suppose someone has to do quite a bit of research using that read-only
data on a laptop. You may not want to tie them to the network, they
may want to be able to disconnect from the network and walk around with
the data while researching.

Suppose you have a mobile database application. The disconnected
recordset is the copy the salesman has with him in the field. Every
night or so, he dials in and you update the database with his entries.
If you didn't disconnect the recordset, he would have to dial in every
time he needed to add a record.

This example is a little extreme as there are many uses for
disconnecting recordsets. It depends on your architectural needs. If
you need to retrieve all of the values in a table and display them on a
form, then there's not much sense to disconnecting the recordset. But
if you have a huge amount of data and someone needs to simply scroll
through all of the data, you may want to get a copy of the data by
disconnecting and then reconnecting later if needed.

--
Kirk Allen Evans
kae...@yahoo.com


Sent via Deja.com http://www.deja.com/
Before you buy.

Tim Williams

unread,
Jan 10, 2000, 3:00:00 AM1/10/00
to Billie H. Cleek
One feature of such a recordset is that you can save it and re-open it at a
later date (if the user wanted to save their search results for instance).
Or, you could create a standalone disconnected recordset and populate it from an
array in order to take advantage of its .sort and .filter methods. Much easier
than doing the sort any other way.

Tim

Billie H. Cleek wrote:

> This still doesn't really answer my question. Let's say I have a read-only,
> client-side cursor recordset. What, then, is the advantage of disconnecting
> it?
>

> > Billie H. Cleek <bcl...@actmo.com> wrote in message

charli...@my-deja.com

unread,
Jan 11, 2000, 3:00:00 AM1/11/00
to
In article <ejOzC0VW$GA....@cppssbbsa02.microsoft.com>,

"Billie H. Cleek" <bcl...@actmo.com> wrote:
> I'm trying to figure out what advantage one has when using a
disconnected
> recordset. Since the cursor must be clientside to use a disconnected
> recordset, what's the advantage of disconnecting it?
>
> Any input would be helpful.
>
> Thanks,
> Billie H. Cleek
>
>

Hi Billie

There is a very simple answer to this. If you have a web application
with X-users, using Server-Side cursors. The DBMS would need to keep X
number of cursors and connections. This might be ok if you expect < 10
users "concurrently". But if you have maybe >10.000 there is a real
problem.
Also when using multi-tier applications the middle-tier can change the
content of the recordset without using the DBMS, only when it need to
persist the recordset it will update it. Therefore you can have many
machines running the middle-tier without affecting (to much) the load
on the DBMS, since it is only accessed when extracting the data and
when updating the data.

Hoped this helped.

/Charlie

charlie helin | 247 interactive | Systems Architect
birger jarlsgatan 57c | box 7820 | se-103 99 stockholm
phone +46 (0)8 458 09 05 | mobile +46 (0)709 99 50 40 | fax +46 (0)8
458 04 50
email charli...@247interactive.se | web www.247interactive.se

Dennis Redfield

unread,
Jan 11, 2000, 3:00:00 AM1/11/00
to
did I miss something here. When the set is disconnected the SQL Server
connection is free to be pooled to another user.
Billie H. Cleek <bcl...@actmo.com> wrote in message
news:ejOzC0VW$GA....@cppssbbsa02.microsoft.com...

m...@a2d.com

unread,
Jan 12, 2000, 3:00:00 AM1/12/00
to
You can close the connection, thus freeing resources on: client
machine, server, and network esp. if you have many users.

In article <uL4kpm4W$GA....@cppssbbsa02.microsoft.com>,


"Billie H. Cleek" <bcl...@actmo.com> wrote:
> This still doesn't really answer my question. Let's say I have a read-
only,

> client-side cursor recordset. What, then, is the advantage of
disconnecting
> it?
>

> > Billie H. Cleek <bcl...@actmo.com> wrote in message
> > news:ejOzC0VW$GA....@cppssbbsa02.microsoft.com...
> > > I'm trying to figure out what advantage one has when using a
> disconnected
> > > recordset. Since the cursor must be clientside to use a
disconnected
> > > recordset, what's the advantage of disconnecting it?
> > >
> > > Any input would be helpful.
> > >
> > > Thanks,
> > > Billie H. Cleek
> > >
> > >
> >
> >
>
>

Louie Chung

unread,
Apr 6, 2000, 3:00:00 AM4/6/00
to
so that users that use the rs cannot update the db directly without using your
component. your application may consist of an dll that returns a disconnected
rs for some information. users can change it, but unable to update the db
directly. when you send the rs back to the component, you can enforce your
business rules and integrity checking.

"Billie H. Cleek" wrote:

--
------------------------------------------
Louie S. Y. Chung

0 new messages