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

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

pspell
using pspell, is it possible to get words that would be best in the current phrase?

For examp

New to Arrays
Hi I am new to PHP (a week and a half now) and I am just beginning to read about arrays. I understan

Simple Variable Question
Hi everyone.... again,

I am really getting into php still. Learning more every day. I love it

Can php detect connection speed and thereafter swap out elements?
No code to post, lads, yet. Just looking for a yay or nay at this stage:

Can a php script be

generating all possible random letters
hi'

how can i randomize the letters a,b,c,d,e all possible ways, and i want to print the res

Save file by click
Hello.
I'm not understand how to save file from page. I'd like make link to file with save abil

Change Age automatically
hi guys . im new to php , is it possible to change age value in mysql automatically when year change

Probably a simple error...
I'm getting the error -- Parse error: syntax error, unexpected '{' in /home/content/c/s/t/csteffen24

how do i display data on a page from mysql
1 - do i use this code at the top of each of my page i wish to only alow access if there as been a s

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