General discussion
January 13, 2003 at 12:04 AM
mpalazzo

Prepared Statements to a DB

by mpalazzo . Updated 23 years, 8 months ago

I’m trying to use a prepared command object (using ADO) to open a recordset. My question is, what order do I do things to ensure I’m utilizing the benefits of a prepared SQL statment. I pass my prepared SQL statment via the command object (.prepared= true) to the open recordset method. Great, I get the expected results back. I want to create a loop opening new records each time by changing my parameter. Do I close the rs, change my parameter in the command object, and reopen the same rs with the modified command object? Does closing the rs destroy the command object? What’s the proper order to do things to ensure I maximize the time savings of creating a prepared SQL statement?

Thanks!

This discussion is locked

All Comments