I'm not new to Oracle or Oracle Objects for OLE, but am new to using bind variables with OO4O. I'm wondering what the best practice is for declaring them, and haven't been able to find any relevant discussion in the Oracle documentation.
My application references a single OraSessionClass and OraDatabase object, then I have written a wrapper for the CreateDynaset method which gets called from all over the place (it's a rather large application). I'd like to parameterize some of those calls to increase efficiency. Should I...
1) add all the parameters I might need to the OraDatabase.Parameters collection at application startup; then remove them in my shutdown code?
2) whenever it's referenced, check and see if a parameter has already been added, and if not, add it; then remove everything that got used in my shutdown code?
3) add the parameter whenever it's referenced, and then remove it as soon as I'm done with it?
I'm not sure what the overhead is for each alternative. The third option is the easiest from a coding perspective, but the point is to improve efficiency, and I'm not sure if this method would be counterproductive. Thanks for any advice.