clearing Oracle Parameters to call diferent stored procs

Posted on 2012-09-10
Last Modified: 2012-09-12
When i call the Sub make_excel I want to clear the parameters to call a different stored poc in Oracle to populate excel spread sheet.

Sub Main

Do While i < 3

            i = i + 1

end Sub

Sub make_excel(ByVal array As Integer)
 objCmd.Parameters.Add(New OracleParameter("p_cursor", OracleType.Cursor)).Direction = ParameterDirection.Output
end Sub


Open in new window

Question by:mikensu12
    LVL 40

    Accepted Solution

    It is not evident, because you seem not to show all the code (what do you do with the array parameter sent to the method?). You should always show all the code when you post a question, because it helps us to understand what you are doing.

    Looks to me as if you might not want to call a different stored procedure (different command) but simply change the value passed to the parameter.

    Instead of adding and removing the parameter object each time you come into the method, simply put the call Add on the Parameters collection when you prepare the objCmd object. The object will stay there.

    Then, in make_excel, simply change the Value of the parameter:

    objCmd.Parameters("p_cursor").Value= <Whathever the value is>
    LVL 83

    Expert Comment

    You already have


    is that not working?

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now