I need to retrieve data from an oracle table using a pl/sql stored procedure and odp.net. What is the standard way of doing this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
PL/SQL has the ability to return sets of data using Ref Cursors, which are basically pointers. Here is a simple function which returns a sub-set of employees based on department:
Here’s how in works in SQL*Plus:
With regards to .Net, there is a
OracleRefCursorclass amongst the Oracle.DataAccess.Types . A certain amount of plumbing is required, but the excellent Mark A Williams has written a good article on this topic, which you can find on the OTN site.