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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recordset creation question

Status
Not open for further replies.

dragonturtle

Programmer
Sep 25, 2003
55
CA
Hi,

is there a difference between the following?

>> Set rs = Server.CreateObject("ADODB.Recordset")
>> rs.Open sql, Conn

versus

>> Set rs = Conn.Execute(sql)

I've always create recordsets the first way, but I came across the second way recently, and it does the same thing in one line instead of two.
 
The second way you don't explicitly instantiate a recordset object (and is the way to go for less overhead and easier debugging). I only use recordsets when I absolutely, positively have to (which is hardly ever).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top