[thelist] [ASP] Connecting to a DB question

Ken Schaefer ken at adOpenStatic.com
Tue Dec 17 18:34:00 CST 2002


Connection objects are for connecting to a database
Recordsets are for holding retrivied data
Command objects are for executing commands (eg stored procedures).

Use each for the purpose it was intended (for example, don't use Recordset
objects to update data in the database. Instead, construct an SQL statement
and use objConn.Execute strSQL,,adCmdText+adExecuteNoRecords) to send it to
the database (or using a Command object and a sproc).

I'm writing a performance tuning article for ASPToday which, hopefully, will
be up in January. It covers performance implications of using recordset
objects etc in a purpose for which their not suited.

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Frank Gorton" <fgorton at bixler.com>
Subject: [thelist] [ASP] Connecting to a DB question


: Hello All
:
: Which is better to use the  Recordset and Connection Objects or
: the Command Object when interacting with a DB.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




More information about the thelist mailing list