1. I see some codes that use adUseClient if later it uses adOpenStatic. Do I have to do that all the time? or it's ok to use adUseServer? Or how should I choose it if I want to use adOpenStatic? when shall I use adUseClient?
adUseClient uses the clients processor(I think) to do some of the recordset processing, so it saves resources on the server. Distributes the workload basically.
I almost always use it. It does make a difference.
adUseClient uses the clients processor(I think) to do some of the recordset processing, so it saves resources on the server. Distributes the workload basically.
I almost always use it. It does make a difference.
Not quite true - I think, The client cursor is hosted in the client that opens the ADODB connection, and with most ASP pages (Including Snitz) we all use Server.CreateObject("ADODB.Connection") Don't we? Therefore it boils down to: adUseServer - Cursor resides in the MySQL server adUseClient - Cursor resides in the web server. If they're both the same (as in my situation) There is no load sharing going on. However, there is a difference. If you read the MySQL ODBC documentation you will find that it does not support certain types of access unless you use a client cursor. Regards .. Alan
strictly speaking, you should only use client cursors if the underlying server cursor does not support the operation you are trying to do, server cursors are much more efficient than client cursors and return only the records required, where as a client cursor returns the whole recordset to the client before deciding what to display.
In answer to bjlt's original question, if you use a client cursor (adUseClient) then you can only open a static cursor (adOpenStatic) you can not use adUseClient with any other type of cursor.