• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 396
  • Last Modified:

clearing Oracle Parameters to call diferent stored procs

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

1 Solution
Jacques Bourgeois (James Burger)Commented:
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>
You already have


is that not working?

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now