Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2002
    Location
    Tennessee, USA
    Posts
    8

    Question Unanswered: OO4O bind variable usage

    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.

  2. #2
    Join Date
    Jan 2005
    Posts
    8
    Hi,

    i can only tell you how i done it.
    Before the application send his request to the Database its bind all needed Params to the databaseobject. After the call ist succed (or not ) all will be removed.

    If you apply all parameters at the database by startup it will slowdown your database and you must so or so change the values of them or not ?

    hope it helps

  3. #3
    Join Date
    Aug 2002
    Location
    Tennessee, USA
    Posts
    8
    LOL, thanks, Shura. I can't remember, but I think that's the way I ended up doing it (same suggestion as my #3 above) a year and a half ago when I asked the question.

    Since then, I've migrated to .NET and ODP is soooo much nicer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •