I've been using ADO in ASP scripts for a while and wanted to gather some opinions about the best cursors and locktypes to use when working with recordsets. I am using an OLEDB connection to SQL Server 2000.
It looks to me like this:
1. If using a recordset in record order: adOpenForwardOnly/ adOpenReadOnly
2. If you need to use rs.RecordCount: adOpenStatic/ adOpenReadOnly
3. To update, use the Connection Execute method if possible.
What if you really need to make updates to a recordset? adOpenStatic/ adLockOptimistic?
Thanks!
Michael McGonigal
It looks to me like this:
1. If using a recordset in record order: adOpenForwardOnly/ adOpenReadOnly
2. If you need to use rs.RecordCount: adOpenStatic/ adOpenReadOnly
3. To update, use the Connection Execute method if possible.
What if you really need to make updates to a recordset? adOpenStatic/ adLockOptimistic?
Thanks!
Michael McGonigal