PDA

View Full Version : The cursorlocation property


codefox
01-10-2003, 08:14 AM
What exactly is the CursorLocation property of the Connection and the Recordset objects? I did read about it but I just want to know if it could in anyway improve the performance.

Also, I have an ASP page that displays some details for the past 12 months. Actaully it used to display details for the current month. But now I've rewritten it to display the details for the past N months. I could see a considerable decrease in performance as the no. of months is increased (that's obvious :D). I'd like to know there's any way I could improve performance.

Thanks.

aCcodeMonkey
01-11-2003, 02:44 AM
CodeFox,


Easiest way to define which cursor location to use is by what you are going to do with the generated recordset.


If you are using the redordset to manipulate data or as web page's formatting. then it is best to use a "server-Side" cursor. This means that the server does all of the work with the recordset.

If you are doing "Data Paging" of a resulting query aka Previous/Next scrolling. Then it is better to use a disconnected "Client-Side" recordset. Which means that the whole record is passed down to the client's browser and the client's bowser manages the data thus removing server stress and "round tripping" to display data.

Just as important as the "location" of the cursor, the "type" of cursor used. Aka Forward ReadOnly, Dynamic can effect the performance


Here is are URLs for additional info:
MSDN: Understanding Cursors and Locks (http://msdn.microsoft.com/library/en-us/ado270/htm/mdconcursorsandlocks.asp)

Improving MDAC Application Performance (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmdac/html/improvperf.asp)

Hope this helps :cool:

codefox
01-11-2003, 04:53 AM
Thanks, that sure helps.