Why would you use the Recordset object over the Execute method of
getting data from your Sql database.
For example, I have the following:
Execute Method
************************************************** *************
Set connectionToDatabase=Server.CreateObject("ADODB.Co nnection")
connectionToDatabase.ConnectionTimeout = 60
connectionToDatabase.Open "DSN=Customer;user id=SA;password="
Set RecordCollection=connectionToDatabase.Execute("Sel ect * from Customers")
************************************************** *************
************************************************** *************
Set connectionToDatabase=Server.CreateObject("ADODB.Co nnection")
connectionToDatabase.ConnectionTimeout = 60
connectionToDatabase.Open "DSN=Customer;user id=SA;password="
Set RecordCollection=Server.CreateObject("ADODB.Record set")
recordCollection.Open "Select * from Customers",connectionToDatabase
************************************************** *************
They both seem to work about the same. Why is one better than the other?
In the Execute method you just do a connection and select in one statement.
In the Recordset method, you have to create the object and then do a
connect and select.
Thanks,
Tom