odp.net

Getting RefCursor and VarChar outputs from the same Stored Procedure

♀尐吖头ヾ 提交于 2019-12-12 22:22:41
问题 I am new to Oracle, so please be gentle... I am querying an existing Oracle DB using C# and ODP11 in .NET 4. All procedures up to this point have been, well, painful to figure out at first, but mostly "just worked" once i figured what i was doing... this one is a different story... I have a stored proc that takes 4 parameters: 2 inputs and 2 outputs... the 2 inputs are grand. one of the outputs is a Varchar2 and the other is a refcursor. I am using an OracleDataReader to run the query, like i

ODP.NET and EF6 configuration on ASP.NET Core targeting .NET 4.7.2

浪尽此生 提交于 2019-12-12 18:32:56
问题 I can't get Entity Framework to use the Oracle Provider (ODP.NET) with my project. Setup: ASP.NET Core MVC 2.1 targeting .NET Framework 4.7.2 EntityFramework 6.2 ODP.NET 18.3 (Oracle.ManagedDataAccess and Oracle.ManagedDataAccess.EntityFramework) Although I'd prefer to use EF Core, I can't because Oracle isn't supporting EF Core yet, just .NET Core. The errors I'm receiving indicate that the application is trying to use the SQL Server driver. I can't find an example online for my scenario.

Oracle ODP.Net and connection pooling

眉间皱痕 提交于 2019-12-12 12:06:15
问题 this is really two questions in one I guess. We've developed a .Net app that accesses an Oracle database, and have noticed that after changing the user's Oracle password, the app continues to work for a short time with the old password in the connection string. Presumably this is something to do with the way existing connections are pooled? When first investigating this we tried turning off pooling in the connection string, however the app wouldn't work, throwing the error "Unable to enlist

Connecting to Oracle using Oracle.ManagedDataAccess

不想你离开。 提交于 2019-12-12 08:19:36
问题 I am using Oracle.ManagedDataAccess Nuget Package Version 12.1.022 in my C# (.NET 4.0) project. The package automatically creates entries in the app.config file. How can I read the datasource string from this file to be able to connect to the data base? System.Configuration.ConfigurationManager.AppSettings.Get("dataSource"); is not working for me <?xml version="1.0" encoding="utf-8"?> <configuration> <configSections> <section name="oracle.manageddataaccess.client" type="OracleInternal.Common

ODBC or ODP.Net for C#?

雨燕双飞 提交于 2019-12-12 06:56:48
问题 I've been tasked with writing a few custom C# reporting programs for a client. These programs will only read the Oracle databases, never update or change the data. Is there any significant advantage to using ODP.Net over ODBC? I know several people that advocate using Oracle's Instant Client (I think it includes ODP.Net) because it's easier to deploy (supposedly) than having the client install the ODBC drivers. Having had no experience with deploying apps that rely on ODBC or ODP.Net, I can't

Calling a PROCEDURE with output parameters

折月煮酒 提交于 2019-12-12 05:37:53
问题 I've got an ORACLE package which receives few parameters and returns - with some other (output) parameters - a unique value (number). Here's is the package code: create or replace PACKAGE BODY "USP_SHIPMENTS" AS PROCEDURE usp_GetNewShipmentNumber ( pErrorCode OUT NUMBER, pMessage OUT VARCHAR2, pCompanyCode IN CHAR, pNumber OUT VARCHAR2 ) IS BEGIN pErrorCode := 0; UPDATE UTSASHN SET UTSASHN.UTSHNCOR = UTSASHN.UTSHNCOR + 1 WHERE UTSASHN.UTSHCOSC = pCompanyCode AND UTSASHN.UTSHTIPO = 'S***'

Invalid parameter name binding oracle UDT

五迷三道 提交于 2019-12-12 04:57:30
问题 I am trying to use UDT in my code using ODP.NET. I have seen few examples but still when i run my code i get an error saying Invalid parameter name binding . Not able to find out where the code is failing. Please find below the code. Oracle Part: create or replace TYPE T_SALES_PATTERN is object (siteID varchar2(10), tankID varchar2(10), dayNo integer, periodID integer, startTime varchar2(4), endTime varchar2(4), intraDayPctRate number(3,2), totalDailySalesPctRate number(3,2),

Import Oracle UNION ALL View Into Entity Framework EDMX

左心房为你撑大大i 提交于 2019-12-12 04:38:39
问题 I have two different tables that hold two different sets of report data. Yet I want to have a UNION ALL view so I can display the common columns together. I first tried making a separate column: SELECT NVL(ROW_NUMBER() OVER (ORDER BY REPORT_PERIOD DESC, REPORT_ID DESC),0) ROW_ID,u.REPORT_ID,u."REPORT_PERIOD",u."EXCEL_DOC",u."XML_DOC",u."STATUS",u."CREATED_BY",u."CREATED_ON",u."MODIFIED_BY",u."MODIFIED_ON" FROM ( SELECT ('DR' || TO_CHAR(DISTRIBUTION_REPORT_ID)) AS REPORT_ID, REPORT_PERIOD,

VB.NET issue connecting to Oracle 11g

做~自己de王妃 提交于 2019-12-12 03:58:33
问题 OS: Windows 7 64bit VB: Visual Studio 2010 Oracle Client: 11g I am developing an application that connects to an Oracle 11g server. I am able to connect to the Oracle server via Oracle SQL Developer, ODBC (in SYSWOW64), and in VB Server Explorer. I am using the .NET reference Oracle.DataAccess located at: C:\Oracle\product\11.2.0\client_32\ODP.NET\bin\2.x\Oracle.DataAccess.dll I have tried adding the .DLL files to my bin folder as suggested by other questions and that does not work. Does

Why this PL/SQL query doesn't execute using ODP.NET

谁说胖子不能爱 提交于 2019-12-11 23:12:06
问题 Somewhere in my code there's a query generated which is going to execute using: command.ExecuteNonQuery(); but for the following query, it throws this exception: {"ORA-01036: illegal variable name/number"} The strange point is that if I copy this query to Toad and set its parameter values, It executes without any problem. My query which is set in command.CommandText is: declare vv2 number ; BEGIN :vv := ''; begin SKY.BUSINESS_OBJECT_PKG.REGISTER(B_TYPE_ID=>:B_a_TYPE_ID, B_ID=>:B_b_ID); end;