Passing an array of values From VB6.0 to Oracle PL/SQL Function


Posted on 16th Feb 2014 07:03 pm by admin

Basically we are using VB6.0.

When we try to pass an array from VB6.0 to an Oracle PL/SQL Function we are getting the error like

Error is: Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
.

From Database side the function is working fine.

VB code:
objDBConn.Open "PROVIDER=OraOLEDB.Oracle;DATA SOURCE=xxx;USER ID="xxx";PASSWORD="xxx"

Dim Cmd As New ADODB.Command
Dim ArrX(5) As String
ArrX(0) = "0"
ArrX(1) = "1"
ArrX(2) = "2"
ArrX(3) = "3"
ArrX(4) = "4"
Cmd.ActiveConnection = objDBConn
Cmd.CommandType = adCmdStoredProc
Cmd.CommandText = "fn_SampleArray"

-- The below command is not executing.

Cmd.Parameters.Append Cmd.CreateParameter("fn_in_arr", adArray, adParamInput, ArrX)
Cmd.Parameters.Append Cmd.CreateParameter("Result", adVarChar, adParamOutput)
Cmd.Execute

MsgBox Cmd.Parameters(0)
Can you please advice us.

No comments posted yet

Your Answer:

Login to answer
227 Like 24 Dislike
Previous forums Next forums
Other forums

Email "$"
Hello!!

Any PHP guy with a bit of a knowledge in Flash ?

When I send a JPEG from flash

Storing user data help?
Hey Guys,

I'm not use if this question is to broad but I can always give you more informatio

Coding Critique
I was hoping someone could take a second and look down my code and see if they see any problems with

How to Handle more than one submit button in single form?
Hi
I have one PHP file which contains one Form. In this form there are two Submit type Buttons

php ajax - two drop down list with a submit button
i have created a form with 2 drop-down list and a submit button. I would like to know how to pass th

How to secure my login data to my database?
Hi there,

It may be a stupid question but I don't know how to secure my login data to my data

GIS appliction help
I found some tutorials in the internet to develop a map application I don't want to use google maps

How To Make More Than One Redirection with PHP on the same page?
Hey im trying to do a direction page where it open differently link direction pages every time som

code help - pagination
Hi all, I have this code, basically a user logs into my site and they get this page.

The pro

update post issues
I am trying to create an update to a post function, while the update does occur, the page routing an

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash