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

PHP error. Need help urgently
Hi,

I am programming a php site and have a problem that i just cant find out how to fix. When

A problem with my GD class
Hello,

I created a nice (and simple for now) GD class.
The problem is , it works great on

Show message after entering data
Hello Colleagues

I would like to display messages after entering the data example: "
dat

Help with Contact Form
I have this Form on an html page and the associated code on page.php (below).
I keep getting the

Socket Server
In my following socket server, I am trying to listen to a connection through port 12345 in my web br

C++ Http request?
Code: string Response = "LOGIN_UNSUCCESSFUL"; System.Net.WebRequest request = Sy

How to file_get_contents when login required?
Hello!

I am trying to read data from a page that you have to be logged into to view, I am try

show the direct link into href
I want to display link on the page. i am fetching the data(URL) from database,actually before that i

Port scanner problem
Hai
recently i developed one app through which u can check the opened and closed ports under an

SQL Injection
In my attempts to protect my database from mySQL injection I have created another problem for myself

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