473,385 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to pass an array from .net to oracle stored procedure

Hi All
Does anyone knows how to pass an array from .net application to oracle stored procedure

Thank you in advance

Nelson
Nov 22 '05 #1
4 10803
Nelson:

I wrote this for SQL Server but the logic is similar.
http://www.knowdotnet.com/articles/temptables.html
Basically, create a string with the array putting a delimitter in between
the values. Pass that string as a Parameter. Parse the values in between
the delimmiter and insert them into a Temp table and use the temp table to
do whatever you want.

Depending on what you want to do, you may just need to simply parse the
values within a loop but I'm not sure what your end game is.

HTH,

Bill
"Nelson Xu" <ni**********@litton.c-bass.com> wrote in message
news:F9**********************************@microsof t.com...
Hi All,
Does anyone knows how to pass an array from .net application to oracle stored procedure.
Thank you in advance !

Nelson

Nov 22 '05 #2
Nelson:

I wrote this for SQL Server but the logic is similar.
http://www.knowdotnet.com/articles/temptables.html
Basically, create a string with the array putting a delimitter in between
the values. Pass that string as a Parameter. Parse the values in between
the delimmiter and insert them into a Temp table and use the temp table to
do whatever you want.

Depending on what you want to do, you may just need to simply parse the
values within a loop but I'm not sure what your end game is.

HTH,

Bill
"Nelson Xu" <ni**********@litton.c-bass.com> wrote in message
news:F9**********************************@microsof t.com...
Hi All,
Does anyone knows how to pass an array from .net application to oracle stored procedure.
Thank you in advance !

Nelson

Nov 22 '05 #3
William,

I found that parsing the parameter into SQL Server parseable XML using a
similar function worked a treat, and of course the parsing of the XML into a
temp table is part and parcel of SQL Server 2000. It works a treat in
reducing the chattiness of the average complex database transaction, say of
saving a hierarchical object into several database tables in one push. I
remember the SQL Server docs have something to say on the lines of "network
round tripping is found to be at the root of many SQL Server based
application performance issues" so I figure the extra cost of the parsing on
the SQL Server is worth it. Beware though the cost of parsing out XML is
exponential - if you end up parsing out more than 4000 records you're likely
to notice a dramatic increase in time taken by SQL Server to do this job, so
we programmatically limit the number of pseudo-records being passed in the
XML parameter.

Of course, in Oracle a PL-SQL procedure can accept a parameter array, but I
don't know how ADO exposes this (if it does at all - the previous posted
might need to use the proprietary Oracle connection libraries to achieve
this).

Phillip
"William Ryan eMVP" <bi**@NoSp4m.devbuzz.com> wrote in message
news:O$**************@TK2MSFTNGP12.phx.gbl...
Nelson:

I wrote this for SQL Server but the logic is similar.
http://www.knowdotnet.com/articles/temptables.html
Basically, create a string with the array putting a delimitter in between
the values. Pass that string as a Parameter. Parse the values in between
the delimmiter and insert them into a Temp table and use the temp table to
do whatever you want.

Depending on what you want to do, you may just need to simply parse the
values within a loop but I'm not sure what your end game is.

HTH,

Bill
"Nelson Xu" <ni**********@litton.c-bass.com> wrote in message
news:F9**********************************@microsof t.com...
Hi All,
Does anyone knows how to pass an array from .net application to oracle

stored procedure.

Thank you in advance !

Nelson


Nov 22 '05 #4
William,

I found that parsing the parameter into SQL Server parseable XML using a
similar function worked a treat, and of course the parsing of the XML into a
temp table is part and parcel of SQL Server 2000. It works a treat in
reducing the chattiness of the average complex database transaction, say of
saving a hierarchical object into several database tables in one push. I
remember the SQL Server docs have something to say on the lines of "network
round tripping is found to be at the root of many SQL Server based
application performance issues" so I figure the extra cost of the parsing on
the SQL Server is worth it. Beware though the cost of parsing out XML is
exponential - if you end up parsing out more than 4000 records you're likely
to notice a dramatic increase in time taken by SQL Server to do this job, so
we programmatically limit the number of pseudo-records being passed in the
XML parameter.

Of course, in Oracle a PL-SQL procedure can accept a parameter array, but I
don't know how ADO exposes this (if it does at all - the previous posted
might need to use the proprietary Oracle connection libraries to achieve
this).

Phillip
"William Ryan eMVP" <bi**@NoSp4m.devbuzz.com> wrote in message
news:O$**************@TK2MSFTNGP12.phx.gbl...
Nelson:

I wrote this for SQL Server but the logic is similar.
http://www.knowdotnet.com/articles/temptables.html
Basically, create a string with the array putting a delimitter in between
the values. Pass that string as a Parameter. Parse the values in between
the delimmiter and insert them into a Temp table and use the temp table to
do whatever you want.

Depending on what you want to do, you may just need to simply parse the
values within a loop but I'm not sure what your end game is.

HTH,

Bill
"Nelson Xu" <ni**********@litton.c-bass.com> wrote in message
news:F9**********************************@microsof t.com...
Hi All,
Does anyone knows how to pass an array from .net application to oracle

stored procedure.

Thank you in advance !

Nelson


Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: kristoff plasun | last post by:
I have a problem with a C++ DCOM application that prints Crystal Reports with data from Oracle. The SQL query is relatively complex but when the report is printed from the Crystal Reports...
4
by: Michael Trosen | last post by:
Hi Everyone, I hope someone can help, I'm pretty new to pro*c programming. I have the following application setup: a pro*c program calls a stored procedure and recieves a cursor back: the...
2
by: Nelson Xu | last post by:
Hi All Does anyone knows how to pass an array from .net application to oracle stored procedure Thank you in advance Nelson
0
by: Chan | last post by:
Hi, I am trying to send set of rows from my c# web service to Oracle stored procedure. I think I can get this done using OpenXML in SQL Server. How to implement this in Oracle Stored...
1
by: robin via SQLMonster.com | last post by:
I've tried several different way to execute a oracle stored procedure from a DTS package but to no avail. I have a Linked Server setup which does bring back Oracle tables from the server when I...
0
by: totierne | last post by:
comp.databases.ms-access, I want to know how to use Oracle views with session variables in Access. The parameterised views in access, are migrated to views with per session variables. The...
0
by: Chan | last post by:
Hi, I am trying to send set of rows from my c# web service to Oracle stored procedure. I think I can get this done using OpenXML in SQL Server. How to implement this in Oracle Stored...
1
by: mjkelly | last post by:
Hi, I have a stored procedure written in java in an Oracle 10g db. This sp takes a java.lang.String as input, creates a file on disk and writes the string contents to it and inserts the filename...
14
by: jehugaleahsa | last post by:
Hello: I am working with Oracle .NET Stored Procedures. I would like to know how to return the results of a SELECT statement. I have tried returning a OracleRefCursor and a DataTable, but...
0
Saii
by: Saii | last post by:
How can we pass a perl array to stored procedure in Oracle. The parameter I am using in Oracle is type of table of varchar(500). I am using the system command in perl to execute the procedure ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.