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

Did you know?Explore Trending and Topic pages for more stories like this.
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

Change snippet to use CURDATE
I am using time() in the snippet below, I would like to use CURDATE() and have the database setup fo

smart reading from a text file
Hello there fellow coders, i was wondering if one of you wouldnt mind helping me with this problem i

Any help with my email script?
I have an email script, I have not tested it, although someone tested it for me and said it worked f

Pro-rata Billing in Periodic Billing for Rental
Hi guys,

We have a situation, where a rental contract starts at the mid of the month say

email CODING Problem
Email coding problem.

I need to send a section of the info to $tf and the same as a Cc to $em

Array becomes unset by itself?
Hi,

I have a bit of experience with PHP but not extensive. It seems I cannot store any items

How to show a complete textarea ??
I enter Client Case Notes notes in a textarea field on a PHP form. The field is 5 rows deep and 70 c

Aris, Netweaver BPM, Visual composer and X'app
Dear Experts,

Whats the relationship between the following components: Aris, Netweaver BP

Change image filetype on upload?
Hi,
I've got a form which uploads an image to the server.
Is it possible to change the image t

Retrieving Data from Two Different Databases
Hello All,

Ran into another problem and would appreciate some help! I have two datab

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