Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6906741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:20:55+00:00 2026-05-27T08:20:55+00:00

I am trying to pass an array of byte arrays (byte[][]) to Oracle procedure

  • 0

I am trying to pass an array of byte arrays (byte[][]) to Oracle procedure using ODP.Net, which from the Oracle perpective is an array of Raw. I get the following exception:

Oracle.DataAccess.Client.OracleException was unhandled by user code
Message=ORA-06550: line 1, column 52:
PLS-00418: array bind type must match PL/SQL table row type
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Source=Oracle Data Provider for .NET
ErrorCode=-2147467259

I am passing the string arrays to Oracle procedures without any problems, but array of byte arrays is an issue. Here is my c# code passing byte[][] to the procedure:

conn = new OracleConnection(tm_connectStr);

saveAnswers = new OracleCommand(commandName, conn);
saveAnswers.CommandType = CommandType.StoredProcedure;

// Input params
//byte array of hashed answers.
byte[][] answers = userAnswers.Select(a => a.Answer).ToArray<byte[]>(); //a.Answer is already a byte array.
OracleParameter pAnswers = saveAnswers.Parameters.Add("p_answers_tab", OracleDbType.Raw,     ParameterDirection.Input);
pAnswers.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
pAnswers.Value = answers;
pAnswers.Size = answers.Length;

if (conn.State != ConnectionState.Open) conn.Open();

saveAnswers.ExecuteNonQuery(); //This line throws exception.

The Oracle procedure is:

PROCEDURE create_answers(
p_answers_tab IN g_param_raw_tab_type
) IS
BEGIN
FOR i IN p_answers_tab.FIRST .. p_answers_tab.LAST LOOP
INSERT INTO answers
(
answer,
created_ts
)
VALUES (
p_answers_tab( i ),
SYSTIMESTAMP
);
END LOOP;
END create_answers;

And the table structure is:

Table name: Anwers

1) Coulmn name: anwer, Data type: Raw
2) Coulmn name: created_ts, Data type: Timestamp(6)

Any insight is greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:20:56+00:00Added an answer on May 27, 2026 at 8:20 am

    The above code is all fine and can be used as is for passing array of byte array to Oracle SPs. Here was the glitch…After beating around the bush for a long time, the DB programmer handling the type “g_param_raw_tab_type” found that the type was inadvertantly made to be an array of varchar instead of Raw. The type was changed to Raw and BINGO!!!! the call went through.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to pass a byte array from inside my rails app into another
Im trying to pass an array from javascript to java servlet using Jackson, how
I'm trying to pass a byte array from an image to an activity through
I'm trying to pass an array of character arrays to a C function using
I'm trying to pass an array of integers from c# to c++ via a
I am trying to pass a array of date values from Objective C to
I'm trying to pass an array of string parameters to a C# ASP.NET web
I am trying to pass Array from one class to another I used detailViewController.nameArray
im trying to pass an array of data to a PHP script using Jquery's
I am trying to pass an array to a ruby script from a command

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.