Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2004
    Posts
    2

    Unanswered: OraDatabase.Parameters in VB Loops

    Hello Guys,

    I use OO4O in Visual Basic, and PL/SQL scripts.

    Everytime I declare a Parameter I use

    With OraDatabase

    .Parameters.Add "HANDLE",vValue,ORAPARM_INPUT

    .Parameters("HANDLE").ServerType = ORATYPE_VARCHAR2

    'Do some .ExecuteSQL Stuff

    .Parameters.Remove "HANDLE"

    End With

    Ok This is fine. But what if I place this inside a loop that is executed for say.. 1000 times. It's slow right? What I would like to do is that I want to declare

    .Parameters.Add "HANDLE",vValue,ORAPARM_INPUT

    .Parameters("HANDLE").ServerType = ORATYPE_VARCHAR2

    only once, before the loop and

    .Parameters.Remove "HANDLE"

    only once too. After the loop.

    My problem is that vValue changes its value within the loop.

    Do you have any better ideas how to address this? Is there a OraDatabase.EditParameters or someting?

    Thanks...

  2. #2
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    How about OraDatabase.Parameters("HANDLE").Value = new_value_here within the loop? then you can use the .Refresh method of your OraDynaset object to re-requery with this new value.

Posting Permissions

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