Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SUPPORT FOR ARRAY VISUAL BASIC.NET WITH PL/SQL TABLES

121586May 23 2003 — edited Oct 11 2006
I have attempted, unsuccessfully, to use array binding in stored procedure calls where the sp has parameters that are PL/SQL tables.
CREATE OR REPLACE PACKAGE PK_TEST
AS
TYPE vArray IS TABLE OF TABLEDEMO.code%TYPE INDEX BY BINARY_INTEGER;
PROCEDURE SP_TEST
( v_code IN vArrays );
END PK_TEST;
CREATE OR REPLACE PACKAGE BODY PK_TEST
AS
PROCEDURE SP_TEST
( v_code IN vArrays );
BEGIN
FOR X IN vArray.FIRST..vArray.LAST LOOP
INSERT INTO TABLEXX
VALUES(v_code(X));
END LOOP;
commit;
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
END SP_TEST:
END PK_TEST;

I WORKING WITH VISUAL BASIC .NET 2003 AND ORACLE SERVER 8i.1.7.3 with client 9i release 2 and ODP.NET

Here goes vb calling code:
dim prm as new OracleParameter("v_code",OracleDbType.Int32)
prm.Direction = ParameterDirection.Input
prm.Value = myArray
cmd.Parameters.Add(prm)
cmd.ExecuteNonQuery()
error: invalid parameters ...
How can I solve this.

Thanks.
Adriano

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 8 2006
Added on May 23 2003
7 comments
1,405 views