>Hey all. I am building an application with various middle layer components written in VB, which then return data to ASP pages. For the most part, these middle layer components call SQL Server sprocs.
>
>I know that stored procedure calls can be made via a recordset object's Open() method, a connection object's execute() method, or a command object's execute() method. But what is the best way to go? I started off assuming that I would use a command object, but none of the stored procedures return output parameters. This makes me wonder why I should incur the overhead of instantiating the command object, just to return the value into a recordset object... rather than call a recordset object's OPEN directly. PERFORMANCE is my main concern - so, I would like to just use the recordset object, unless I hear that calling an sproc through the command object is quicker than calling one through the recordset object. Remember, I do not need the advanced features of the command object.
Because you have said that your SPs doesn't have output params, there is no reason to use the Command object. The Open method of the Recordset or the Connection object is enough and won't cost you performance.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com