All examples I've seen in returning one or more rows from a database using a Select query use the recordset.Open except in stored procedures.
I have found that using the Connection.Execute is SIGNIFICATLY faster.
Connection established
Set rst = Server.CreateObject("ADODB.Recordset"
SQL = “Select * from Table”
Set rst = Connection.Execute(SQL)
Do While Not rst.EOF
Display records
Loop
I don’t understand how and why it works but it does, setting the rst object as a recordset then the return value of the execute statement. Most of the documentation I’ve read says that you can’t do this, and some talk theory without examples on this issue. Any enlightenment would greatly be appreciated.
And I hope that this may speed up someone else’s result set.
I have found that using the Connection.Execute is SIGNIFICATLY faster.
Connection established
Set rst = Server.CreateObject("ADODB.Recordset"
SQL = “Select * from Table”
Set rst = Connection.Execute(SQL)
Do While Not rst.EOF
Display records
Loop
I don’t understand how and why it works but it does, setting the rst object as a recordset then the return value of the execute statement. Most of the documentation I’ve read says that you can’t do this, and some talk theory without examples on this issue. Any enlightenment would greatly be appreciated.
And I hope that this may speed up someone else’s result set.