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

mysql VARCHAR acting like INT
Hi, All.

I have a table that contains a varchar(10) column named weird_field. In this column

Problem with shopcart code
Hello, I am having a bit of trouble being able to add a product to my shopcart. My mysql database i

SAP Management Console is blank
Dear All ,

I am facing problem in my des sever suddely in SAP Management Console is blank and

DB2 for z/OS, LUW, iSeries
Hello, In this forum a lot of threads related to other members of the DB2 family than DB2 for z/OS

This must be easy , pulling the last record of the day, every day, from a txt
I have a txt file logging weather data every minutes (so 1 record per minute). I want to extract the

Linked Keywords
I am trying to get a script that makes my predefined keyword converted to links and / or converted t

PHP Game
hy i was wondering what's the best method in order to make some automatic updates in a php game
<

need help in update query
i create a form for update. there are 8 columns in my mysql table. on my main page all the data is r

Retrieving the 25 most recently added entries from all tables in a MySQL databas
Hello,

The code below works great. It creates a table that shows the 25 most recently added t

please help
HTML Code:

Code: <span id="ctl00"><span>

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