Calling Stored Procedures
In learning about the CommandText property of the Command object, you now know how to call stored procedures. You will now learn about some best practices for calling stored procedures.
Note
Remember, stored procedures will run faster than similar SQL commands that are executed with the Execute method of the Command or Connection objects. This is because they are already compiled. Stored procedures also allow you to separate your SQL into organized structures, making it easier to read and maintain.
Besides calling the store procedure as a text string where you set the CommandType property to adCmdText, you can also set it to adCmdStoredProc, which tells your data store that you are calling a stored procedure. This results ...
Get Sams Teach Yourself Microsoft® Windows® DNA Programming in 21 Days now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.