Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Performance with LockTypes & Cursors

Status
Not open for further replies.

RushiShroff

Programmer
Jan 23, 2002
216
IN
Generally I have seen Developers dont use these things explicitly.
In which circumstances I should use these ?
How do they affect performance ?

Rushi Shroff
 
Well, by default, ADO gives you the fastest recordset, which is forwardOnly, readOnly. Many developers will leave it at this, and this really is sufficient for most data operations. I have found that more complicated data operations many times beg for different approaches rather than the recordset.

Problem comes in if and when you need access to certain things, such as recordCount, record locking, updates via recordsets, etc...

Here's a FAQ I wrote on the subject (including the other biggie, lockType). I tried to go into a fair amount of detail w/o getting TOO long winded. Maybe it can help sort things out a bit.

faq333-618

Honestly, many times, from reading posts and examples, a budding developer might come to the conclusion that a recordset is the only way to work with data in ASP. This is such a huge misconception. It just pains me to see someone going to great lengths to manipulate data in recordsets when, many times, it's such a simple operation that would be so much better served by either a simple SQL command or a stored procedure.

Keep these types of approaches in mind when you're trying to figure out how to construct your application.

:)
paul
penny1.gif
penny1.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top