469,148 Members | 1,333 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,148 developers. It's quick & easy.

adUseClient


Gentlemen,

I still don't understand why... But the only way MySql works is if you
set rstTable.CursorLocation = adUseClient. (if it's not set it won't
..Update, load a grid, doesn't know .RecordCount etc.) Is there any way you
can set the a global default to adUseClient?

Jul 20 '05 #1
1 2897
Joel wrote:
Gentlemen,

I still don't understand why... But the only way MySql works is if you
set rstTable.CursorLocation = adUseClient. (if it's not set it won't
.Update, load a grid, doesn't know .RecordCount etc.) Is there any way you
can set the a global default to adUseClient?


I couldn't find any example of setting adUseClient in a global way, only
on a per-RecordSet basis.

FWIW, the issue you're facing is pretty common to client/server RDBMS's,
not just MySQL. The client can't get the RecordCount until it has
downloaded the full result set. That's effectively what adUseClient
does, from what I infer (I'm not an ADO user).

One reason for this limitation is that client/server applications often
deal with large result sets, which might exceed memory, so they are
prepared in batches instead of holding the full result set in memory.

So be careful about using adUseClient, if your result sets can grow to
be huge; you might choke your network as it downloads, or you might hit
your client's memory capacity, or downloading the result set in one
batch will cause a delay in your client application.

One commonly used workaround is to run a SELECT COUNT(*) query to fetch
the number of records.

Regards,
Bill K.
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by hkadhim | last post: by
3 posts views Thread by viviane lima - * - * - | last post: by
2 posts views Thread by wolverine1654 | last post: by
1 post views Thread by Ray Holtz | last post: by
13 posts views Thread by berry | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.