odp.net

Getting objects from a relational table in with Oracle pl/sql procedure.

I want to retrieve rows from an oracle table and convert them into objects. I am currently using a refcursor result and a datareader in c# to manually convert the rows to objects but this seems messy. Is their a better way of converting rows from a relational table to objects? EDIT: The project I'm on is not using any ORM tools so unf...

Converting oracle query into user defined types in pl/sql

I have a select query on a relational table in a plsql procedure. I want to convert the results of this query into a user defined type object to return via odp.net. How would I go about doing this? ...

How to know when to stop filling an OracleDataAdapter

I'm using the OPD.NET dll in a project that is accessing oracle. Users can type in any SQL into a text box, that is then executed against the db. I've been trying to use the OracleDataAdapter to populate a datatable with the resultset, but I want to be able to return the resultset in stages (for large select queries). An example of my...

What is the alternative for System.Data.OracleClient.OracleCommand?

Can anyone share a link to sample (ASP).Net code that uses the new Oracle Data Provider.Net library? I have code a web application code that uses the System.Data.OracleClient classes and want to migrate to the new Oracle Data Provider for .Net. Thanks ...

unknown number of cursors

Using ODP.net, I am calling several stored procedures on 10g. One of the procedures returns one cursor. Another returns three, and yet another returns 11, etc. Is there a way to accommodate an unknown number of cursors. Right now I just add another method that is specific to the need, but this seems like a waste. I was thinking about s...

How to validate prerequisite for ODP and Oracle Client connection

Hi. I have a very simple application on .Net that connect to Oracle using ODP (was compiled with Oracle.DataAccess dll 10.2). I want to check "connection prerequisite" (application will be able to connect to DB) before installing this aplication on other computers? How can I check that ODP.NET version 10.2 or higher is installed on tar...

Insert array of records in Oracle table using ODP.Net

I might be lazy to search this, but I have no idea how to insert an array of records in to an Oracle table using C# and ODP.Net. I have seen basic examples with inserting primitive types but never found any with something like array of records. Any help? I basically need to have a record type which would have three out of five columns i...

Oracle.DataAccess.Client.OracleException ORA-03135: connection lost contact

Hi, I have a .Net service that connects to an Oracle database on every request. It works fine at the beginning, but after some number of requests I start getting: Oracle.DataAccess.Client.OracleException ORA-03135: connection lost contact at Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection c...

Using Parameters with Oracle Packages. ODP .NET

I have an Oracle function that returns a record set. I introduced parameters to the Oracle function and this is causing the front-end code to go haywire. Here's my front-end code. OracleCommand od = oc.CreateCommand(); od.CommandType = System.Data.CommandType.Text; od.CommandText = " select * from table(pkg_fet...

WPF Bind a ListView to Oracle Data Source

Here's a part of XAML of the application I'm working on: <ListView Name="lsvCustomerDetails" ItemsSource="{Binding myDataTable}"> <ListView.View> <GridView> <GridViewColumn Header="Script Name" DisplayMemberBinding="{Binding ID}"/> <GridViewColumn Header="Status" DisplayMemberBinding="{Binding status}"/> ...

ODP .NET Getting a SYSREFCURSOR output. {"Unsupported column datatype"} error

I am trying to execute a procedure that returns a stored procedure. My version of Oracle DB is 9.2 and the ODP .NET version is 10.2.0.100 My C# code looks like this. OracleCommand od = new OracleCommand(); od.Connection = oc; OracleParameter opBranchNo; OracleParameter opSysRef; od.CommandType = System.Data.CommandType.StoredProcedure;...

Creating Tables on Oracle using using VB.NET & Oracle Data Access Client

I am trying to create empty tables on Oracle as a part of initial setup for one of the internal tools. Before, I had a SQL script that had the create statements separated using semi-colon and was executing them without checking for existence as follows: Setup.sql: CREATE TABLE ex.employees ( empID NUMBER, firstName VARCHAR(255)...

WebService to use ODP.NET from a File Share

I have a C# ASMX web service that uses Oracle.DataAccess.Client to connect to an Oracle database. When I try to call a web method I get this error message: unable to load dll 'OraOps10.dll' It's the same problem as asked before, with the significant difference that I do have ODAP (at least I have OraOps10.dll in an Oracle client in...

Execute an oracle Function that returns a reference cursor in C#

I have an oracle package with a procedure that has a in out reference cursor. My understanding is that this is pretty standard. What I didn't like is the fact that I had to write a ton of code to just see the output. [So I asked this question][1] and it turns out I can get what I want by creating a function that wraps the procedure. ...

What are the differences between using OLEDB and ODP.NET to connect to an Oracle database?

I have two small VB.NET applications that connect to the same Oracle database. One uses the OLEDB provider, and the other uses Oracle's ODP.NET. Should I expect to see problems with the OLEDB provider, as it's less 'native' to Oracle? Thanks for any help! ...

Oracle ORA-03113 and ORA-07445 ACCESS_VIOLATION

Environment Oracle 10g Windows 2003 server IIS 6 .NET 3.5 Oracle client 10.2.0.1.0 ODAC 10.2.0.2.21 odp.net 2.102.2.20 Validate Connection=true;Min Pool Size=0 in connection string All odp.net connection, command and parameter objects are closed/disposed after use. The issue: ORA-03113 is returned to asp.net. ORA-07445 ACCESS_VIOL...

ODP.NET Connection Lifetime clarification

According to the ORACLE documentation, the Connection Lifetime attribute is checked when the connection is closed and released back to the connection pool, if the connection was open for longer than the Lifetime setting then it is cleared from the pool. My question is, does the counter for the Connection Lifetime reset after it's releas...

Oracle query is slow (or fails) from .NET app but is fast from SQL Developer

We use ODP.NET to perform queries on Oracle databases, and normally it works fine. There is a particular database, and a particular view in that database, though, that we just can't complete a query on from .NET. For example: SELECT some_varchar_field FROM the_view WHERE ROWNUM < 5; If I execute this query from within Oracle SQL devel...

How to execute two command.ExecuteNonQuery() methods using single connection?

Hi, I am trying to invoke ExecuteNonQuery() method of two different objects of OracleCommand class. Both the objects use same connection object but have different commandText and parameters. I am using ODP.net, C# (.net 2.0 framework) and Oracle 10g. Code snippet is as follows : // OpenDatabaseConnection() methods checks and opens dat...

Deploying ODP.NET WPF application

Background: I developed a small .NET 3.5 WPF application that connects to an Oracle 9i database. Thinking that the ODP.NET version had to match the database, I downloaded and used an [older version][1] (9i, release 2, to be more specific) of the Oracle Data Access tools. I'm basically done the application now and need to deploy it. Th...