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 6014461
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:41:44+00:00 2026-05-23T02:41:44+00:00

In my project using oracle 11g and .net 2010. DAL is web service to

  • 0

In my project using oracle 11g and .net 2010. DAL is web service to call oracle db.
A sp have array (oracle array) parameter to insert multiple value.
I have string observable collection in DAL.
How to pass observable collection value to oracle sp.
Kindly help to me.

  • 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-23T02:41:45+00:00Added an answer on May 23, 2026 at 2:41 am

    This is assuming use of Oracle ODP.NET and you’ve already got a connection. Also assumes the called package/procedure having one or more input parameters of type table (Oracle’s implementation of array).

    You can accomplish using Oracle parameter class, and setting the collection type of the parameter to array.

     using System.Data;
     using Oracle.DataAccess.Client;
     using Oracle.DataAccess.Types;
    
     // create command object and set attributes
     OracleCommand cmd = con.CreateCommand();
     cmd.CommandText = "job_package.add_jobs";
     cmd.CommandType = CommandType.StoredProcedure;
    
     // create parameter objects for each parameter
     OracleParameter p_job_id = new OracleParameter();
     OracleParameter p_job_title = new OracleParameter();
     OracleParameter p_salary = new OracleParameter();
    
     // set parameter type for each parameter
     p_job_id.OracleDbType = OracleDbType.Varchar2;
     p_job_title.OracleDbType = OracleDbType.Varchar2;
     p_salary.OracleDbType = OracleDbType.Decimal;
    
     // set the collection type for each parameter
     p_job_id.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
     p_job_title.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
     p_salary.CollectionType = OracleCollectionType.PLSQLAssociativeArray;
    
     // set the parameter values
     p_job_id.Value = new string[3] { "IT_DBA", "IT_DEV", "IT_MGR" };
     p_job_title.Value = new string[3] { "DBA", "IT Developer", "IT Manager" };
     p_salary.Value = new decimal[3] { 18000, 48000, 120000};
    
     // set the size for each array
     p_job_id.Size = 3;
     p_job_title.Size = 3;
     p_salary.Size = 3;
    
     // add parameters to command object collection
     cmd.Parameters.Add(p_job_id);
     cmd.Parameters.Add(p_job_title);
     cmd.Parameters.Add(p_salary);
    
      // execute the insert
      cmd.ExecuteNonQuery();
    
      // clean up 
      p_salary.Dispose();
      p_job_title.Dispose();
      p_job_id.Dispose();
      cmd.Dispose();
      con.Dispose();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are using Oracle ADF Faces in a new web project. I am always
I have a test project using MbUnit and TestDriven.Net. If I right-click on an
I have recently setup a spring + hibernate project. I am using oracle DB.
I have a web project in eclipse using glassfish. I have the following datasource
We are developing a large project using Oracle 11g R2. Our database is consist
I'm attempting to create a web services project using eclipse with the Oracle Enterprise
I'm using EclipseLink for a web project involving EJB 3 and Oracle stored procedures.
We are using an oracle database in a project. Most of the tables represents
I have a VB6 project (using Visual Studio 6) and I'm trying to distribute
I created a new project using aspx visual studio 2010. All I am trying

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.