I don't know if this should go in the database forum, but here goes.
I have an SQL 2000 database running. I am using ASP scripts to grab, update, insert, delete, etc... information from the database.
Now, I have seen two different ways of calling the stored proceedures from a database.
Let's assume that I have a database connection called "Connection" and I have declared a variable called "rst" (for my recordset).
Set rst = Connection.Execute("EXECUTE sp_name")
OR
Set rst = Server.CreateObject("ADODB.RecordSet")
rst.open "EXECUTE sp_name",Connection,3,3
Now, it would appear to me that the first way is better. First of all, you save yourself a line, and I found out I can also run another SELECT query using the same variable without having to close and Re-Set the recordset variable.
So, which way is:
- Faster
- Least resource intensive
- Is the best choice??
If I'm missing something (like the way I like is really slow or something) please tell me. I'm building a large database application that I'm sure a lot of people are going to be using. I want as many optimizations as possible.
Thanks,
Vintious