Cast 'ManagedDataAccess.Client' to 'DataAccess.Client '.

I get the error 'Cannot be cast to an object of type 'Oracle.ManagedDataAccess.Client.OracleConnection' to type 'Oracle.DataAccess.Client.OracleConnection'.' when trying to do something like

EntityConnectionStringBuilder myConn = new EntityConnectionStringBuilder();
myConn.Provider = "Oracle.ManagedDataAccess.Client";
myConn.ProviderConnectionString = "username = *; password = *; "DATA SOURCE = *: 1521 / *";
myConn.Metadata = @"res://*/Model1.csdl|
RES://*/Model1.SSDL|
RES://*/Model1.MSL ';


new Entities1 (myConn.ToString ());

Suggestions?

If you have an .edmx model, there is a reference in it to Oracle.DataAccess near the top. You need to change that to Oracle.ManagedDataAccess in order to use the client managed with it.

Tags: Database

Similar Questions

  • Oracle.manageddataaccess.client with Silverlight with Ria Services + c#

    Hello guys.

    I have a c# Silverlight + Oracle dashboard with RIA services.

    I published in my computer and it work ok. But in the server it doesn´t run.

    I don't know what to do. It works just before.

    My web.config:

    ---***---***---***---***---***---***---***---***---***---***---***---***

    <? XML version = "1.0"? >

    (<!-copyright ©) Microsoft Corporation.  All rights reserved. ->

    < configuration >

    < configSections >

    "< name =" article oracle.manageddataaccess.client"type =" OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version = 4.121.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342 "/ >

    < / configSections >

    < system.web >

    < debug compilation = "true" targetFramework = "4.0" / >

    < system.web >

    < system.data >

    < DbProviderFactories >

    < remove invariant = "Oracle.DataAccess.Client" / > "

    < remove invariant = "Oracle.ManagedDataAccess.Client" / > "

    "< add name =" ODP.NET, successful pilot"invariant =" Oracle.DataAccess.Client.

    Description = "Oracle Data Provider for.NET, successful pilot"

    Type = "Oracle.ManagedDataAccess.client.OracleClientFactory, Oracle.ManagedDataAccess, Version = 4.121.1.0, Culture = neutral, PublicKeyToken = 89b483f429c47342" / > "

    < / DbProviderFactories >

    < system.data >

    < system.serviceModel >

    < links >

    < customBinding >

    < binding name = "Painel.Web.Service.customBinding" >

    < binaryMessageEncoding / >

    < httpTransport / >

    < / binding >

    < / customBinding >

    < / links >

    < serviceHostingEnvironment aspNetCompatibilityEnabled = "true" multipleSiteBindingsEnabled = "true" / >

    < services >

    < name = "Painel.Web.Service service" >

    "< endpoint address =" "binding ="customBinding"bindingConfiguration =" Painel.Web.Service.customBinding "contract =" Painel.Web.Service"/ >"

    < endpoint address = link "mex" = "mexHttpBinding" contract = "IMetadataExchange" / >

    < / service >

    < / services >

    behaviors of <>

    < serviceBehaviors >

    behavior of <>

    < serviceMetadata httpGetEnabled = "True" / >

    < serviceDebug includeExceptionDetailInFaults = "false" / >

    < / behavior >

    < / serviceBehaviors >

    < / behaviours >

    < system.serviceModel >

    < system.webServer >

    < runAllManagedModulesForAllRequests modules = "true" / >

    < system.webServer >

    < oracle.manageddataaccess.client >

    < version number = "4.121.2.0" >

    < Parameters >

    < name of the parameter = value 'TNS_ADMIN"="C:\instantclient"/ >

    < / Parameter >

    < / version >

    < /oracle.manageddataaccess.client >

    < / configuration >

    ---***---***---***---***---***---***---***---***---***---***---***---***

    The message using Server doesn´t:

    ---***---***---***---***---***---***---***---***---***---***---***---***

    Exception information:

    Exception type: ConfigurationErrorsException

    Exception message: Nao faith possible carregar o tipo System.ServiceModel.Activation.HttpModule assembly System.ServiceModel, Version = 3.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089.

    ---***---***---***---***---***---***---***---***---***---***---***---***

    Any help?

    Thanks in advance.

    Luis

    Guys,

    I modify the machine.config to the machine.config.default and everything works.

    Thanks again for your help.

    Luis

  • Oracle.ManagedDataAccess.Client no Oracle client deployment

    Hello

    We are trying to deploy our application on a server that has no Oracle client installed. We use the managed dll dataAccess with entity framework 5. Our web.config file contains the following:

    < connectionStrings >

    < add name = "CroEntities" connection string connectionString="metadata=res://*/CroModel.csdl|res://*/CroModel.ssdl|res://*/CroModel.msl;provider=Oracle.ManagedDataAccess.Client;provider = & quot; DATA SOURCE =oracle; PASSWORD = password; PERSIST SECURITY INFO = True; USER ID = user & quot; "" ProviderName "/ >

    < / connectionStrings >

    < Oracle.ManagedDataAccess.Client >

    < version number = "4.121.1.0" >

    < dataSources >

    "" < alias dataSource = "oracle"descriptor ="(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = myhost.bc.ca) (PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = serviceName.bc.ca)))" / >

    < / dataSources >

    < / version >

    < /Oracle.ManagedDataAccess.Client >

    Oracle.ManagedDataAccess.dll is in our Bin folder.

    At run time, we get the following error: ORA-12541: TNS: no listener.

    The earpiece works very well. My thought is that something is missing in our configuration. When we add some debug information for the value of context. Database.Connection.Database we get empty string that make me think that the information in the configuration file does not in the run-time application.

    Any thought on what might be missed?

    Thank you

    Ken

    The XML tag should be . All lowercase. In your configuration file, you pulled profit some letters in the tag. It's probably why ODP.NET can't read XML.

  • Oracle.ManagedDataAccess.Client Nuget package

    You will deliver Oracle.ManagedDataAccess.Client via nuget package?

    Thank you

    Yes. We are finishing towards the top of our tests. It should be available soon.

  • error in a WPF application using oracle.manageddataaccess.client

    Hello

    We have problems with a WPF MVVM using Oracle.ManagedDataAccess.Client application. We installed oracle.manageddataaccess.dll release 12.1.0.1.0 on a developer machine with 64 bit of Windows 7, Microsoft Visual Studio 2013 and Microsoft .NET Framework 4 OS. Installation seems to be ok and oracle.manageddataaccess.dll results to be registered in .net\assembly\GAC_MSIL c:\windows\microsoft. But when we try to compile the application, the following errors occurs

    Error 175: The ADO.NET provider with invariant name 'Oracle.ManagedDataAccess.Client' not is either not saved in the config machine or the application of the file, or could not be loaded

    errors are caused by the entity data model files (there is an error for each .edmx file).

    Note that the application works on another computer with the same configuration, so I guess that the problem is due to a bad setting on the computer

    any idea?

    Hello

    Finally, we have solved the problem! simply, we uninstalled and reinstalled Visual Studio and Oracle.manageddataaccess in this order. Now it's working. Thank you

  • x 64 application entity Framework using Oracle.DataAccess.Client

    I am trying to build a x 64 application Entity Framework using the current Oracle.DataAccess.Client.  I can launch the application as Any CPU and x 86 using the managed provider, but when I compile for x 64, I get the error below when running. If I change the provider to Oracle.ManagedDataAccess.Client it works with x 86 and x 64 compiler.  Unfortunately, we are unable to use the managed provider until the xml is supported.  I have two clients x 86 and x 64 installed.  Any ideas?

    System.Data.EntityException was not handled

    HResult =-2146233087

    Message = the underlying provider failed to open.

    Source = System.Data.Entity

    StackTrace:

    at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf (Boolean openCondition, storeConnectionToOpen of DbConnection, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean & closeStoreConnectionOnFailure)

    at System.Data.EntityClient.EntityConnection.Open)

    at System.Data.Objects.ObjectContext.EnsureConnection)

    to System.Data.Objects.ObjectContext.SaveChanges (SaveOptions options)

    at System.Data.Entity.Internal.InternalContext.SaveChanges)

    at System.Data.Entity.Internal.LazyInternalContext.SaveChanges)

    at System.Data.Entity.DbContext.SaveChanges)

    at EntityFramework1.EFTest.AddItem (c:\TFS2012\AD). NYSAS. ICPC\DEV\M01\EntityFramework1\EntityFramework1\EFTest.cs:line 21

    at EntityFrameworkConsole.Program.Main (String [] args) in c:\TFS2012\AD. NYSAS. ICPC\DEV\M01\EntityFramework1\EntityFrameworkConsole\Program.cs:line 12

    at System.AppDomain._nExecuteAssembly (RuntimeAssembly assembly, String [] args)

    at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly)

    at System.Threading.ExecutionContext.RunInternal (ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

    at System.Threading.ExecutionContext.Run (ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)

    at System.Threading.ExecutionContext.Run (ExecutionContext executionContext, ContextCallback callback, Object state)

    at System.Threading.ThreadHelper.ThreadStart)

    InnerException: Oracle.DataAccess.Client.OracleException

    HResult =-2147467259

    Message =""

    ErrorCode =-2147467259

    StackTrace:

    at Oracle.DataAccess.Client.OracleException.HandleErrorHelper (Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx * pOpoSqlValCtx, ByVal src, String procedure, Bcheck Boolean, Int32 isRecoverable)

    at Oracle.DataAccess.Client.OracleException.HandleError (Int32 errCode, OracleConnection conn, IntPtr, Object src opsErrCtx)

    at Oracle.DataAccess.Client.OracleConnection.Open)

    at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf (Boolean openCondition, storeConnectionToOpen of DbConnection, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean & closeStoreConnectionOnFailure)

    InnerException:

    Here is my web.config (less sensitive information):

    <? XML version = "1.0" encoding = "utf-8"? >

    < configuration >

    < configSections >

    < section name = "EF" type = "System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, Entity Framework, Version = 5.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089' requirePermission ="false"/ >"

    < / configSections >

    < Entity Framework >

    < defaultConnectionFactory type = "System.Data.Entity.Infrastructure.LocalDbConnectionFactory, Entity Framework" >

    < Parameters >

    < setting = "v11.0" / >

    < / Parameter >

    < / defaultConnectionFactory >

    < / Entity Framework >

    < connectionStrings >

    < add name = 'Entities' connection string connectionString="metadata=res://*/Models.EFEntities.csdl|res://*/Models.EFEntities.ssdl|res://*/Models.EFEntities.msl;provider=Oracle.DataAccess.Client;provider = & quot; data source = DATASOURCE; password = PASSWORD; persist info security = True; user ID = username & quot; "" ProviderName "/ >

    < / connectionStrings >

    < / configuration >

    Alex,

    Finally, we have solved the problem.  It turns out that we had a bad x 64 home path in the PATH variable.  I lost track of what it was originally, but I'm sure the x 64 bin path was correct. I did not notice that it was wrong, until I tried to install the full client and began to see an error indicating that it was missing a dll.  This led me to a post on the forum, in which you indicated that the PATH variable has not been set (ODAC 12 c for xcopy issues).  In our case, it is not missing, just fake.

    This is the behavior that we see if the PATH variable for the home directories and bin is incorrect:

    • Full client: an error of external system (no exceptions).  The error message is that the oraons.dll is missing.
    • XCOPY customer: generates an exception without error message.  The Exception.Message property is empty and there is no inner exception.

    Can the ODP team can add a meaningful message for this exception?  If the exact error cannot be highlighted during execution, a generic name on the path audit would help enormously.  I must have looked at it a dozen times and didn't notice that it was false.  If I had no idea that this could be the cause, it would be discussed more in detail, or had someone else Verify that it was correct.  I hope that we would have solved much earlier.

    Thank you.

  • OracleDataAdapter error: unable to cast object of type 'Oracle.DataAccess.Types.OracleDecimal' type 'System.IConvertible '.

    Uses: Oracle9i Standard Edition, ODAC 11.2.0.4, Oracle Instant Client 11.2.0.4

    I am to convert the Microsoft Oracle for Oracle ODP.NET provider of my projects

    * Error *.

    Cannot be cast to type 'Oracle.DataAccess.Types.OracleDecimal' object type 'System.IConvertible '. Could not store < 145982 > in the RECEIPTID column. Type is Int64.

    This error is poped up when my stored Proc has a return parameter. The return is a numeric data type in Oracle. I had no problem when using Oracle Provider from Microsoft.

    Initially, I had my command setting insert the value

    System.Data.OracleClient.OracleType.Number

    for the column RECEIPTID; After ODP.NET, I converted to

    Oracle.DataAccess.Client.OraclDbType.Double

    Then the error throwed upward. Implement

    Oracle.DataAccess.Client.OracleDbType.Int64

    as suggested by the error, but nothing seems to prevent the error a way.

    I am running using the OracleDataAdapter.

    The OracleCommand object initialization *.

    public class ReceiptAccountBusinessTable : EquityBroker32.APP_DATA.config.GenericBusinessTable
            {
                OracleCommand[] nCommandCollection;
    
                public ReceiptAccountBusinessTable()
                {
                    this.Tablename = "JKSBSCHEMA.RECEIPTACCOUNT";
                    this.KeyDBField = "RECEIPTID";
                    this.DefaultSql = string.Format("SELECT * FROM {0} WHERE {1}= (SELECT MAX({1}) FROM {0} )", this.Tablename, this.KeyDBField);
    
                    //select command
                    this.nCommandCollection = new Oracle.DataAccess.Client.OracleCommand[4];
    
                    this.nCommandCollection[0] = new OracleCommand();
                    this.nCommandCollection[0].Connection = this.DataConnection;
                    this.nCommandCollection[0].CommandText = this.DefaultSql;
                    this.nCommandCollection[0].CommandType = System.Data.CommandType.Text;
    
                    //update command
                    this.nCommandCollection[1] = new OracleCommand();
                    this.nCommandCollection[1].Connection = this.DataConnection;
                    this.nCommandCollection[1].CommandText = "JKSBSCHEMA.RECEIPTACCOUNT_ADDCHG_PROC";
                    this.nCommandCollection[1].BindByName = true;
                    this.nCommandCollection[1].CommandType = System.Data.CommandType.StoredProcedure;
                    this.nCommandCollection[1].Parameters.Add(new Oracle.DataAccess.Client.OracleParameter("PRECEIPTID", Oracle.DataAccess.Client.OracleDbType.Int64, 10, System.Data.ParameterDirection.InputOutput, false, 10, 0, "RECEIPTID", System.Data.DataRowVersion.Current, null));
                    this.nCommandCollection[1].Parameters.Add(new Oracle.DataAccess.Client.OracleParameter("PACCOUNTID_NEW", Oracle.DataAccess.Client.OracleDbType.Char, 13, System.Data.ParameterDirection.Input, false, 0, 0, "CLIENTACCOUNTID", System.Data.DataRowVersion.Current, null));
                    this.nCommandCollection[1].Parameters.Add(new Oracle.DataAccess.Client.OracleParameter("PACCOUNTID_OLD", Oracle.DataAccess.Client.OracleDbType.Char, 13, System.Data.ParameterDirection.Input, false, 0, 0, "CLIENTACCOUNTID", System.Data.DataRowVersion.Original, null));
                    this.nCommandCollection[1].Parameters.Add(new Oracle.DataAccess.Client.OracleParameter("PXSACTVALUE", Oracle.DataAccess.Client.OracleDbType.Double, 22, System.Data.ParameterDirection.Input, false, 0, 0, "XSACTVALUE", System.Data.DataRowVersion.Current, null));
                    this.nCommandCollection[1].Parameters.Add(new Oracle.DataAccess.Client.OracleParameter("PXSACTDESC", Oracle.DataAccess.Client.OracleDbType.Varchar2, 255, System.Data.ParameterDirection.Input, false, 0, 0, "XSACTDESC", System.Data.DataRowVersion.Current, null));
                    this.nCommandCollection[1].Parameters.Add(new Oracle.DataAccess.Client.OracleParameter("PPAGEBREAK", Oracle.DataAccess.Client.OracleDbType.Int32, 22, System.Data.ParameterDirection.Input, false, 0, 0, "PAGEBREAK", System.Data.DataRowVersion.Current, null));
    
                    //insert command
                    this.nCommandCollection[2] = new OracleCommand();
                    this.nCommandCollection[2].Connection = this.DataConnection;
                    this.nCommandCollection[2].CommandText = "JKSBSCHEMA.RECEIPTACCOUNT_ADDCHG_PROC";
                    this.nCommandCollection[2].CommandType = System.Data.CommandType.StoredProcedure;
                    this.nCommandCollection[2].BindByName = true;
                    this.nCommandCollection[2].Parameters.Add(new Oracle.DataAccess.Client.OracleParameter("PRECEIPTID", Oracle.DataAccess.Client.OracleDbType.Int64, 10, System.Data.ParameterDirection.InputOutput, false, 10, 0, "RECEIPTID", System.Data.DataRowVersion.Proposed, null));
                    this.nCommandCollection[2].Parameters.Add(new Oracle.DataAccess.Client.OracleParameter("PACCOUNTID_NEW", Oracle.DataAccess.Client.OracleDbType.Char, 13, System.Data.ParameterDirection.Input, false, 0, 0, "CLIENTACCOUNTID", System.Data.DataRowVersion.Current, null));
                    this.nCommandCollection[2].Parameters.Add(new Oracle.DataAccess.Client.OracleParameter("PACCOUNTID_OLD", Oracle.DataAccess.Client.OracleDbType.Char, 13, System.Data.ParameterDirection.Input, false, 0, 0, "CLIENTACCOUNTID", System.Data.DataRowVersion.Original, null));
                    this.nCommandCollection[2].Parameters.Add(new Oracle.DataAccess.Client.OracleParameter("PXSACTVALUE", Oracle.DataAccess.Client.OracleDbType.Double, 22, System.Data.ParameterDirection.Input, false, 0, 0, "XSACTVALUE", System.Data.DataRowVersion.Current, null));
                    this.nCommandCollection[2].Parameters.Add(new Oracle.DataAccess.Client.OracleParameter("PXSACTDESC", Oracle.DataAccess.Client.OracleDbType.Varchar2, 255, System.Data.ParameterDirection.Input, false, 0, 0, "XSACTDESC", System.Data.DataRowVersion.Current, null));
                    this.nCommandCollection[2].Parameters.Add(new Oracle.DataAccess.Client.OracleParameter("PPAGEBREAK", Oracle.DataAccess.Client.OracleDbType.Int32, 22, System.Data.ParameterDirection.Input, false, 0, 0, "PAGEBREAK", System.Data.DataRowVersion.Current, null));
    
                    //delete command
                    this.nCommandCollection[3] = new OracleCommand();
                    this.nCommandCollection[3].Connection = this.DataConnection;
                    this.nCommandCollection[3].CommandText = "DELETE FROM " + this.Tablename + " WHERE RECEIPTID=:p1 AND ACCOUNTID=RPAD(:p2,15)";
                    this.nCommandCollection[3].CommandType = System.Data.CommandType.Text;
                    this.nCommandCollection[3].Parameters.Add(new Oracle.DataAccess.Client.OracleParameter("p1", Oracle.DataAccess.Client.OracleDbType.Int64, 22, System.Data.ParameterDirection.Input, false, 0, 0, "RECEIPTID", System.Data.DataRowVersion.Current, null));
                    this.nCommandCollection[3].Parameters.Add(new Oracle.DataAccess.Client.OracleParameter("p2", Oracle.DataAccess.Client.OracleDbType.Char, 15, System.Data.ParameterDirection.Input, false, 0, 0, "ACCOUNTID", System.Data.DataRowVersion.Current, null));
    
                    this.CommandCollection = this.nCommandCollection;
                }
            }
    

    * The glance of the stored Proc *.

    PROCEDURE RECEIPT_ADDCHG_PROC
        (
        preceiptid IN OUT NUMBER,
        preceiptmode IN CHAR,
        pxsactdate IN DATE,
        pxsactvalue IN NUMBER,
        pbankaccountid IN VARCHAR2,
        pchequeno IN VARCHAR2,
        pclientbankid IN VARCHAR2,
        pdescription IN VARCHAR2,
        pstatementno in varchar2 default null,
        pcustodypayment IN NUMBER)
        is
        nrow number;
        begin
    
        --check if posted
        SELECT COUNT(*) INTO nrow from accountledger
        WHERE receiptid = preceiptid;
    
        IF nrow > 0 THEN
          RAISE_APPLICATION_ERROR(-20001, 'Record Already Posted');
        END IF;
    
        UPDATE Receipt
          Set pmodeid = preceiptmode,
          xsactdate = pxsactdate,
          xsactvalue = pxsactvalue,
          bankaccountid = pbankaccountid,
          chequeno = pchequeno,
          clientbankid = pclientbankid,
          description = pdescription,
          statementno = pstatementno,
          custodypayment = pcustodypayment
        WHERE receiptid = preceiptid;
    
        IF (SQL%NOTFOUND) THEN
          INSERT INTO RECEIPT(receiptid,
                              pmodeid,
                              xsactdate,
                              xsactvalue,
                              bankaccountid,
                              chequeno,
                              clientbankid,
                              description,
                              statementno,
                              custodypayment
                              )
          VALUES(preceiptid,
                  preceiptmode,
                  pxsactdate,
                  pxsactvalue,
                  pbankaccountid,
                  pchequeno,
                  pclientbankid,
                  pdescription,
                  pstatementno,
                  pcustodypayment
                  ) RETURNING receiptid into (preceiptid);
        END IF;
    
        end;
    

    * It's how I update the Table *.

    public void UpdateData(DataTable tbl, Oracle.DataAccess.Client.OracleTransaction oTran)
                {
                    try
                    {
                        SetTransaction(oTran);
                        this._adapter.Update(tbl);
                        //this was added on 03-Aug-2011
                        tbl.AcceptChanges();
                    }
                    //handling concurrency problem
                    catch (DBConcurrencyException dbcx)
                    {
                        MessageBox.Show(CreateMessage(dbcx.Row), "Concurrency Exception", MessageBoxButtons.YesNo);
                    }
                    catch (OracleException ex)
                    {
                        throw ex;
                    }
                    catch (Exception ex)
                    {
                        throw ex;
                    }
    
                }
    

    * The said Stack Trace *.

    at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors (Int32 commandCount RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo [batchCommands])
    at System.Data.Common.DbDataAdapter.UpdatedRowStatus (Int32 commandCount RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo [batchCommands])
    to System.Data.Common.DbDataAdapter.Update (DataRow [] dataRows, DataTableMapping tableMapping)
    to Oracle.DataAccess.Client.OracleDataAdapter.Update (DataRow [] dataRows, DataTableMapping tableMapping)
    at System.Data.Common.DbDataAdapter.UpdateFromDataTable (DataTable dataTable, DataTableMapping tableMapping)
    at System.Data.Common.DbDataAdapter.Update (DataTable dataTable)
    at EquityBroker32.APP_DATA.config.GenericBusinessTable.UpdateData (DataTable tbl, OracleTransaction oTran) in d:\REVERSION\Latest\APP_DATA\config\GenericBusinessTable.cs:line 293

    This is found!

    I add the following code to my existing and it worked!

    this.nCommandCollection[1].Parameters.Add(new Oracle.DataAccess.Client.OracleParameter("PRECEIPTID", Oracle.DataAccess.Client.OracleDbType.Double, 10, System.Data.ParameterDirection.InputOutput, false, 10, 0, "RECEIPTID", System.Data.DataRowVersion.Current, null));
    this.nCommandCollection[1].Parameters["PRECEIPTID"].DbType = DbType.Decimal;
    

    Thanks to this site and the person who answered: .Net technology: find a sequence of a S-P with typed DataSet problem - dotnet - tech.todaysummary.com

  • Management of data access Client pulling the registry instead of Web.config settings

    I have an ASP.NET 4.0 application configured with the managed provider of ODP (32 bit) via the customer install the production. It is configured with the following text in the root web.config file:

    <oracle.manageddataaccess.client>
      <version number="4.121.1.0">
        <settings>
          <setting name="TraceLevel" value="127"/>  
          <setting name="TraceOption" value="0"/>
          <setting name="TraceFileLocation" value="c:\temp\odpnet66.trc"/>
        </settings>
        <onsConfig mode="remote"></onsConfig>
      </version>
    </oracle.manageddataaccess.client>
    

    When I look for the trace file, however, I realize that it is written to a location set to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE\ODP.NET\4.121.1.0.

    What needs to be done to make the provider read its settings from the web.config file?

    Additional information:

    <system.data>
        <DbProviderFactories>
        <remove invariant="Oracle.ManagedDataAccess.Client" />
        <add name="ODP.NET, Managed Driver"
             invariant="Oracle.ManagedDataAccess.Client"
             description="Oracle Data Provider for .NET, Managed Driver"
             type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess,Version=4.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />
      </DbProviderFactories>
      </system.data>
    

    You probably ODP.NET, pilot managed, also installed on your machine, if the registry entry, HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ORACLE\ODP.NET\4.121.1.0, has been created. This registry entry is not created by managed ODP.NET. Any tracing would flow from the ODP.NET, to use unmanaged driver.

    Some recommendations to try to allow managed ODP.NET tracing:

    (1) value TraceLevel 7 or reduce its value.  Managed and unmanaged trace level values are different. What are managed.

    • TraceLevel: 1 = Public API; 2 = private API; 4 = API/data network. These values can be OR ed. To enable all, set TraceLevel to 7 . Errors will be always drawn.

    (2) set the TraceFileLocation on a directory name, not the file name. Make sure that the location of the directory exists.

  • Oracle.ManagedDataAccess and FIPS compliance

    Hello

    I encountered an error using the Oracle.ManagedDataAccess and Oracle.DataAccess libraries in an ASP.NET MVC application I wrote.  On a Windows Server 2008 R2 server, I would get an ORA-01017: Invalid UserName and Password.  After some research and assistance online, I discovered that the cause of this error is that the run meets the FIPS policy setting has been enabled.  Disabling this setting allowed me to recover data from the Oracle database.

    Host us our server on a Government website and they need, we have this setting turned on.

    Some users have determined that the Oracle client encrypts the password that is sent to the database and that the encryption method used is AES.  According to them, this method of encryption is in conflict with the FIPS policy setting and generates the above error.  I can't find documentation that specifies that AES is used to encrypt the password, so I take this 'fact' at face value.

    Has anyone solves the problem where they apply the FIPS policy setting and connect to the database?  I know that some people have recommended adding the element of the web.config file enforceFIPSPolicy.  I found that this does not work in a Windows Server 2008 R2 environment (at least for me) and is not desirable because the application would not be in accordance with our security requirements.

    Any help is appreciated.

    Sincerely,

    Robert Eberhart

    There was a bug (17322941) earlier Oracle DB and versions ODP.NET managed, which has since been corrected. To use FIPS requires at least managed upgrade ODP.NET 12.1.0.2 AND Oracle DB 12.1.0.2.

    ----------------------------------

    Update August 2015:

    Oracle DB 11.2.0.4 can be corrected to ODP.NET managed with FIPS support. See Bug 17551699 for minimum patch set/bundle up to date. Or you can just use the latest patch on top of DB 11.2.0.4 to be supported.

  • Why Oracle ManagedDataAccess (4.121.1.0) throws a System.FormatException "first chance" exception to the debugger when you use OracleCommand.BindByName (on some machines, but not others)?

    Why Oracle ManagedDataAccess (4.121.1.0) throws a System.FormatException "first chance" exception to the debugger when you use OracleCommand.BindByName (on some machines, but not others)?

    This occurs when calling a ref cursor-returning packaged function stored with OracleCommand.BindByName set to true.

    When BindByName undefined, it works as expected.

    I've only been able to recreate this problem on a machine in my control. This issue has also reported to me by a customer.

    I tried to change the locale of the system of EN - UK EN-US, but I was not aware of any change in behavior.

    Similarly, I've tried explicitly overriding the default locale of the system with the OracleGlobalization parameters, and it also had no effect.

    Please see the example below.

    ---

    Environment (default):

    Windows 7 Professional 64-bit SP1

    Visual Studio 12.0.21005.1 REL / / CAN BE SIGNIFICANT

    .NET framework 4.5.51209

    Local system: EN - UK (but also does not, EN-US).

    Oracle.ManagedDataAccess 4.121.1.0

    "< supportedRuntime version ="v4.0"sku =". NETFramework,Version=v4.5.1"/ >

    Environment (base):

    Windows 7 Professional 64-bit SP1

    Updated Visual Studio 12.0.31101.00 //SEE above 4

    .NET framework 4.5.51209

    Local system: EN - UK

    Oracle.ManagedDataAccess 4.121.1.0

    "< supportedRuntime version ="v4.0"sku =". NETFramework,Version=v4.5.1"/ >

    Call stack:

    mscorlib.dll. Unknown System.Number.StringToNumber(string str, System.Globalization.NumberStyles options, ref System.Number.NumberBuffer number, System.Globalization.NumberFormatInfo info, bool parseDecimal)
    mscorlib.dll. Unknown System.Number.ParseInt32(string s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info)
    Oracle.ManagedDataAccess.dll! Oracle.ManagedDataAccess.Types.OracleRefCursor.OracleRefCursor (connection Oracle.ManagedDataAccess.Client.OracleConnection, OracleInternal.ServiceObjects.OracleRefCursorImpl refCursorImpl, Oracle.ManagedDataAccess.Types.OracleIntervalDS sessionTimeZone, string commandText, string paramPosOrName, long initialLongFS, long initialLobFS, long [] scnFromExecution) unknown
    Oracle.ManagedDataAccess.dll! OracleInternal.ServiceObjects.OracleParameterImpl.ExtractRefCursorFromAccessor (Oracle.ManagedDataAccess.Client.OracleConnection conn, accessor OracleInternal.TTC.Accessors.Accessor, long fetchSize, Oracle.ManagedDataAccess.Client.PrmEnumType enumType, Oracle.ManagedDataAccess.Types.OracleIntervalDS sessionTimeZone, string commandText, string paramPosOrName, long longFetchSize, long lobFetchSize, long [] scnFromExecution, int currentRow) unknown
    Oracle.ManagedDataAccess.dll! OracleInternal.ServiceObjects.OracleParameterImpl.GetRefCursorFromBytes unknown (Oracle.ManagedDataAccess.Client.OracleConnection conn, accessor OracleInternal.TTC.Accessors.Accessor, long fetchSize, Oracle.ManagedDataAccess.Client.PrmEnumType enumType, Oracle.ManagedDataAccess.Types.OracleIntervalDS sessionTimeZone, string commandText, string paramPosOrName, long longFetchSize, long lobFetchSize, long [] scnFromExecution)
    Oracle.ManagedDataAccess.dll! Oracle.ManagedDataAccess.Client.OracleParameter.PostBind_RefCursor (connection Oracle.ManagedDataAccess.Client.OracleConnection, OracleInternal.TTC.Accessors.Accessor bindAccessor, long fetchSize, Oracle.ManagedDataAccess.Types.OracleIntervalDS sessionTimeZone, string commandText, string paramPosOrName, long longFetchSize, long lobFetchSize, long [] scnFromExecution) unknown
    Oracle.ManagedDataAccess.dll! OracleInternal.ServiceObjects.OracleCommandImpl.ExtractAccessorValuesIntoParam (Oracle.ManagedDataAccess.Client.OracleParameterCollection paramColl, Oracle.ManagedDataAccess.Client.OracleConnection connection, string commandText, long longFetchSize, long lobFetchSize, long [] scnFromExecution) unknown
    Oracle.ManagedDataAccess.dll! Unknown Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteReader(bool requery, bool fillRequest, System.Data.CommandBehavior behavior)
    Oracle.ManagedDataAccess.dll! Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteReader (unknown)

    > ManagedSimpleRefCursor1.exe! NoddyConsole.Program.Command_ExecuteReader_BindByName_Fails (Line 63 c#)

    Example:

    ----

    using System;

    using System.Collections.Generic;

    using System.Linq;

    using System.Text;

    using Oracle.ManagedDataAccess.Client;

    using Oracle.ManagedDataAccess.Types;

    using System.Data;

    namespace NoddyConsole

    {

    public class Program

    {

    public static int Main (string [] args)

    {

    Error int = 0;

    Errors += Command_ExecuteReader_BindByName_Fails();

    Errors += UseReturnValue_Command_ExecuteNonQuery_BindByName_Fails();

    return errors;

    }

    public static int Command_ExecuteReader_BindByName_Fails()

    {

    Error int = 0;

    Try

    {

    var conn = new OracleConnection ("UID = USER; Password = PASS; ("Data Source = / / your-host: 1521 / yours-sid");

    var conn = new OracleConnection ("user Id = UNIT620; Password = UNIT620; ("Data Source = / / ln1apidb01:1521 / fm");

    Conn. Open();

    IRRELEVANT

    OracleGlobalization og is conn. GetSessionInfo();

    og. DateFormat = "HH24:MI:SS MON-DD-YYYY";

    Conn. SetSessionInfo (og);

    var cmd is conn. CreateCommand();

    cmd.CommandType = CommandType.Text;

    BindByName. cmd = true;

    cmd.CommandText = "START: rc: = SHAUN.recreate_issue_1 (in_code = >: in_code); END; « ;

    var prm1 is cmd. CreateParameter();

    PRM1. ParameterName = "rc";

    PRM1. Direction = ParameterDirection.ReturnValue;

    PRM1. OracleDbType = OracleDbType.RefCursor;

    cmd. Parameters.Add (prm1);

    / * SHAUN.recreate_issue_1 * /.

    var prm2 is cmd. CreateParameter();

    PRM2. ParameterName = "in_code";

    PRM2. Direction = ParameterDirection.Input;

    PRM2. OracleDbType = OracleDbType.Varchar2;

    PRM2. Value = "A";

    cmd. Parameters.Add (prm2);

    /* */

    var reader is cmd. ExecuteReader(); FAILS to System.Number.StringToNumber (String str, NumberStyles options, NumberBuffer & number, NumberFormatInfo info, Boolean parseDecimal)

    /* *-/

    OracleRefCursor orc = null;

    cmd ExecuteNonQuery()); must fail here

    ORC = cmd. Parameters ["rc"]. Value as OracleRefCursor;

    If (orc is nothing)

    throws InvalidOperationException new ("Invalid return the ref cursor type");

    var = orc player. GetDataReader();

    /* */

    While (reader. Read

    {

    var values = new object [reader. FieldCount];

    drive. GetOracleValues (values);

    for (int i = 0; i < values.) Length; (++ I)

    {

    Console.WriteLine(values[i]);

    }

    }

    drive. Dispose();

    cmd. Dispose();

    Conn. Dispose();

    }

    catch (Exception ex)

    {

    Console.Error.WriteLine (ex) Message);

    Errors ++;

    }

    Finally

    {

    Return (true);

    }

    return errors;

    }

    public static int UseReturnValue_Command_ExecuteNonQuery_BindByName_Fails()

    {

    Error int = 0;

    Try

    {

    var conn = new OracleConnection ("UID = USER; Password = PASS; ("Data Source = / / your-host: 1521 / yours-sid");

    Conn. Open();

    IRRELEVANT

    OracleGlobalization og is conn. GetSessionInfo();

    og. DateFormat = "HH24:MI:SS MON-DD-YYYY";

    Conn. SetSessionInfo (og);

    var cmd is conn. CreateCommand();

    BindByName. cmd = true; // ####

    cmd.CommandText = "START: rc: = SHAUN.recreate_issue_1 (in_code = >: in_code); END; « ;

    cmd.CommandText = "START: rc: = SHAUN.recreate_issue_2; END; « ; No params, works

    var prm1 is cmd. CreateParameter();

    PRM1. ParameterName = "rc";

    PRM1. Direction = ParameterDirection.ReturnValue;

    PRM1. OracleDbType = OracleDbType.RefCursor;

    cmd. Parameters.Add (prm1);

    / * SHAUN.recreate_issue_1 * /.

    var prm2 is cmd. CreateParameter();

    PRM2. ParameterName = "in_code";

    PRM2. Direction = ParameterDirection.Input;

    PRM2. OracleDbType = OracleDbType.Varchar2;

    PRM2. Value = "A";

    cmd. Parameters.Add (prm2);

    /* */

    var reader is cmd. ExecuteReader();

    OracleRefCursor orc = null;

    HERE does NOT cmd. BindByName = true; System.FormatException first-chance exception in at System.Number.StringToNumber (String str, NumberStyles options, NumberBuffer & number, NumberFormatInfo info, Boolean parseDecimal)

    cmd ExecuteNonQuery());

    ORC = cmd. Parameters ["rc"]. Value as OracleRefCursor;

    If (orc is nothing)

    throws InvalidOperationException new ("Invalid return the ref cursor type");

    var = orc player. GetDataReader();

    While (reader. Read

    {

    var values = new object [reader. FieldCount];

    drive. GetOracleValues (values);

    for (int i = 0; i < values.) Length; (++ I)

    {

    Console.WriteLine(values[i]);

    }

    }

    drive. Dispose();

    ORC. Dispose();

    cmd. Dispose();

    Conn. Dispose();

    }

    catch (Exception ex)

    {

    Console.Error.WriteLine (ex) Message);

    Errors ++;

    }

    Finally

    {

    Return (true);

    }

    return errors;

    }

    }

    }

    ---

    create or replace package THAT SHAUN is

    type ref_cur_type is ref cursor;

    function recreate_issue_1)

    in_code varchar2: = null

    ) return ref_cur_type;

    end SHAUN;

    /

    create or replace package body what SHAUN

    -TTS000233

    function recreate_issue_1)

    in_code varchar2: = null

    ) return ref_cur_type is ref_cur ref_cur_type;

    Start

    Open the ref_cur for

    Select UO.object_name from user_objects UO;

    Return ref_cur;

    end recreate_issue_1;

    end SHAUN;

    /

    ---

    Thanks a lot to qualify again for me Alex.  I'll try upgrading to the latest version of the provider.

    The difference in behavior between the two hosts was found to be reduced to differences in configuration VS.

    Checking 'Just my code' prevents the first chance thrown in the debugger exception. As in fact, the exception is handled in the provider, it is enough for me.

  • ManagedDataAccess wants TNS listener

    Hi all;

    I am trying to connect using the connection string: "USER ID = hr; PASSWORD = hr; "DATA SOURCE = Mercury: 1521 / XE.

    My connector class is: "Oracle.ManagedDataAccess.Client", which I think is the connector that does not require the Oracle client must be installed.

    And I get the error:

    Oracle.ManagedDataAccess.Client.OracleException occurred

    HResult =-2147467259

    Message = TNS:listener is not currently of service requested in connect descriptor

    Source = Oracle Data Provider for .NET, pilot managed

    ErrorCode =-2147467259

    DataSource = Oracle.ManagedDataAccess

    Number = 12514

    Procedure =""

    StackTrace:

    at Oracle.ManagedDataAccess.Client.OracleException.HandleError (OracleTraceLevel level, OracleTraceTag tag, Exception ex)

    to OracleInternal.ServiceObjects.OracleConnectionImpl.Connect (cs ConnectionString, Boolean bOpenEndUserSession)

    to OracleInternal.ConnectionPool.PoolManager'3.CreateNewPR (Int32 reqCount, Boolean bForPoolPopulation, csWithDiffOrNewPwd ConnectionString)

    to OracleInternal.ConnectionPool.PoolManager' 3. (ConnectionString, csWithDiffOrNewPwd)

    to OracleInternal.ConnectionPool.OraclePoolManager.Get (ConnectionString, csWithNewPassword)

    to OracleInternal.ConnectionPool.OracleConnectionDispenser' 3. (ConnectionString cs, MP conPM, PMC ConnectionString, Byte securedPassword, Byte [] securedProxyPassword [])

    at Oracle.ManagedDataAccess.Client.OracleConnection.Open)

    at AutoTagCore.net.windward.autotag.datasource.ado.ConnectionDebugger.btnConnect_Click (Object sender, EventArgs e) in c:\src\jenova\Dev\Merge\AutoTag\AutoTagCore\net\windward\autotag\datasource\ado\ConnectionDebugger.cs:line 346

    InnerException: OracleInternal.Network.NetworkException

    HResult = 12514

    Message = TNS:listener is not currently of service requested in connect descriptor

    Source = Oracle.ManagedDataAccess

    ErrorCode = 12514

    Number = 12514

    StackTrace:

    at OracleInternal.Network.OracleCommunication.DoConnect (String tnsDescriptor)

    at OracleInternal.Network.OracleCommunication.Connect (String tnsDescriptor, Boolean externalAuth)

    to OracleInternal.ServiceObjects.OracleConnectionImpl.Connect (cs ConnectionString, Boolean bOpenEndUserSession)

    InnerException:

    No idea why?

    Thanks - dave

    While you only need to install the connector (ODP.NET, managed driver), you must always configure network access to the Oracle DB server. This requires the implementation of configuration files or to place the configuration information in a configuration file of .NET.

    Networking is usually done through TNS, Easy Connect, or LDAP.

    You can put the right info TNS or Easy Connect in the connection string data Source attribute as well.

  • Managed Dirver InputOutput parameters question

    Hello!

    How can you think, we can process different between managed and unmanaged behavior as a problem?

    How to false:

    PROCEDURE in_out_test (number p_some_id)

    is

    Start

    null;

    end;

    Example code:

    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.ManagedDataAccess.Client;

    namespace ManagedODPInOutParamTest
    {
    Class Program
    {
    public static void Main (string [] args)
    {
    Console.WriteLine ("go");
    Try
    {
    using (var conn = new OracleConnection()
    {
    Conn. ConnectionString = "Data Source = your; User ID = tf2_cust; Password = blah-blah-blah. « ;
    Conn. Open();
    using (var cmd = new OracleCommand ("TEST.in_out_test", conn))
    {
    cmd.CommandType = CommandType.StoredProcedure;
    var param is cmd. Parameters.Add ("p_some_id", OracleDbType.Decimal, ParameterDirection. Entrees-sorties);
    Param. Value = 123456;

    Console.WriteLine ("param val befor run:" + param.) (Value);

    cmd ExecuteNonQuery());

    Console.WriteLine ("param val after run:" + param.) (Value);
    }
    Conn. Close();
    }
    }
    catch (Exception ex)
    {
    Console.WriteLine (example) (ToString());
    }
    Console.WriteLine ("press");
    Console.ReadLine ();
    }
    }
    }


    With the help of Oracle.DataAccess, we have obtained:

    go

    Param val befor run: 123456

    Param val after run: 123456

    Press

    With the help of Oracle.ManagedDataAccess, we have obtained:

    go

    Param val befor run: 123456

    Param val after run: null

    Press

    I know that procedure is declared without keyword IN OUT on the parameter, but the behavior of the managed Manager differs from that unmanaged and makes them not fully compatible.

    Is this corrected? Or to move to the managed pilot, we must rewrite the code, which works very well with unmanaged?

    PS: The Server Version: 11.2.0.3.0, Client version: 12.1.0.1.0, OS: Win7 x 64.

    I couldn't reproduce your error with the latest version of the ODAC created my dev team. I've also found an existing bug for your symptoms that has been recently corrected since you are using ODP.NET 12 c of the Oracle DB 12 c client. I got the same results as your example of running on ODP.NET both managed and unmanaged code.

    The ODP.NET, the successful pilot, which is part of the ODAC 12 c will be out soon. Try this version.

    Even if unmanaged ODP.NET did not exist, the output parameter should be 123456, not null.

  • Updated c# DataTable with DateTime parameter return

    I'm trying to convert a working existing c# / Oracle application that uses the Microsoft Oracle Client to use the Oracle (ODP.Net) data provider. I use OracleDataAdapter to insert a line in an Oracle table by using the SQL text. The SQL command using the 'Back' clause, return a datetime variable to a parameter.

    OracleParameter p = new OracleParameter();
    p.ParameterName = "p24;
    p.SourceColumn = "AddDate".
    p.OracleDbType = OracleDbType.Date;
    p.Direction = ParameterDirection.Output;
    insertCommand.Parameters.Add (p);

    The Insert in the database works, and the datetime value is returned in the parameter that I set. But when the OracleDataAdapter.Update () function tries to update the line in my DataTable by using the return parameter, I get the following error:

    Cannot be cast to type 'Oracle.DataAccess.Types.OracleDate' object type 'System.IConvertible '. Could not store < 26 March 10 > in the column AddDate.
    Type is of type DateTime. ---> System.InvalidCastException:
    Cannot be cast to type 'Oracle.DataAccess.Types.OracleDate' object type 'System.IConvertible '.

    to System.Data.Common.DateTimeStorage.Set (value of the record object, Int32)
    to System.Data.DataColumn.set_Item (value of the record object, Int32)
    -End of the exception stack trace internal-
    at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors (Int32 commandCount RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo [batchCommands])
    at System.Data.Common.DbDataAdapter.UpdatedRowStatus (Int32 commandCount RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo [batchCommands])
    to System.Data.Common.DbDataAdapter.Update (DataRow [] dataRows, DataTableMapping tableMapping)

    After the exception has been thrown, when I look at the output parameter, the Member of the value of the output parameter is defined as an Oracle.DataAccess.Type.OracleDate (DBType of the parameter is set to "DateTime" and the OracleDbType is set to TimeStamp), so I think that this is the origin of the problem, when it tries to update a field in a DataTable object, which is defined as a System.DateTime. My question is what should I do so that the parameter can be written in the DataTable object? Thanks for any help.

    Hello

    Just to add a further suggestion to what Jenny said, you can also set
    p.DbType = DbType.Date;
    Instead of
    p.OracleDbType = OracleDbType.Date
    and that should give you a .net datetime instead if you prefer to work with .net types rather than Oracle types.

    It will be useful,
    Greg

  • OracleException "ORA-01008: not all variables ' what SQL text contains both '-'and':'

    We have stumbled into what seems to be a similar bug as @user4111944 and Alex Keh - Product Manager-Oracle in ManagedDataAccess - bug in the drive when you use '-'and':' SQL text .


    We use Oracle.ManagedDataAccess v. 12.1.2400 (last NuGet package) and get an OracleException with the message


    ORA-01008: not all variables


    When we try to run the following code:


    var l_connectionString = "a connection string.

    var l_commandText = "UPDATE table_test SET col_description = '-test', col_time =: param WHERE col_id = 42 ';

    using (IDbConnection l_connection = new Oracle.ManagedDataAccess.Client.OracleConnection(l_connectionString))

    {

    l_connection. Open();

    var l_command is l_connection. CreateCommand();

    l_command.CommandText = l_commandText;

    var l_parameter is l_command. CreateParameter();

    l_parameter. ParameterName = "param";

    l_parameter. Value = DateTime.Now;

    l_command. Parameters.Add (l_parameter);

    l_command. ExecuteNonQuery());

    }

    The code runs perfectly if the omission of the '-' OR the side of a parameter value assignment (i.e. omitting ', col_time =: param').

    The stack for the OracleException trace is as follows:

    at OracleInternal.ServiceObjects.OracleCommandImpl.VerifyExecution (OracleConnectionImpl connectionImpl, Int32 & cursorId, bThrowArrayBindRelatedErrors Boolean, OracleException & exceptionForArrayBindDML, Boolean hasMoreRowsInDB, Boolean bFirstIterationDone)

    at OracleInternal.ServiceObjects.OracleCommandImpl.VerifyExecution (OracleConnectionImpl connectionImpl, Int32 & cursorId, bThrowArrayBindRelatedErrors Boolean, OracleException & exceptionForArrayBindDML, Boolean bFirstIterationDone)

    at OracleInternal.ServiceObjects.OracleCommandImpl.ExecuteNonQuery (String queryString, OracleParameterCollection paramColl, CommandType commandType, OracleConnectionImpl connectionImpl, longFetchSize of Int32, Int64 clientInitialLOBFS, OracleDependencyImpl orclDependencyImpl, Int64 [] scnFromExecution, OracleParameterCollection & bindByPositionParamColl, Boolean bBindParamPresent, OracleException & exceptionForArrayBindDML, Boolean isFromEF)

    at Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteNonQuery)

    UPDATE 1:

    Now, I have tested with older versions of Oracle.ManagedDataAccess.dll thus:

    • ODAC 12 c Release 4 (12.1.0.2.4 - released October 5, 2015) -fails with ORA-01008: not all variables
    • ODAC Release 3 (12.1.0.2.1 - published December 23, 2014) 12 c - fails with ORA-01008: not all variables
    • ODAC 12 c Release 2 (12.1.0.1.2 - released on December 20, 2013) - successful!

    Therefore, changes in driver management Oracle introduced between December 20, 2013 and December 23, 2014 has caused this problem.

    UPDATE 2:

    I dug some more in the question and after decompilation December 2013 and December 2014 versions, I found the piece interesting next to the code in the implementation of the ExecuteNonQuery()) method in the inner class OracleInternal.ServiceObjects.OracleCommandImpl. The code in red was added in the version of December 2014:

    ...

    else if (commandType! = CommandType.TableDirect)

    {

    OracleCommandImpl.TrimCommentsFromSQL (ref str);

    this.m_sqlStatementType = OracleCommandImpl.GetSqlStatementType (str);

    this.m_bHasReturningClause = OracleCommandImpl.HasReturningClause (str, this.m_sqlStatementType);

    }

    ...

    Take OracleCommandImpl.TrimCommentsFromSQL () method for a test ride easily reveal its weaknesses. It does not take into account the sequence '-' may appear in a quoted string, treating them as a comment and deletes the rest of the line...

    Could you please address this issue?

    Best regards

    Bernt

    Yes, the cause seems exactly the same thing as Bug 22308527. Once fix us this bug, please fix your problem as well.

  • wallet_location in the config of the managed provider of ODP has no effect

    Hi all

    Someone had a bit of luck by specifying the location of a portfolio of Oracle in the configuration of the managed provider. I can get portfolios Oracle works with managed and unmanaged provider, but only by specifying wallet_location in sqlnet.ora.

    The example configuration for the managed provider setting does not seem to have any effect. The example of my work stops to work if I remove wallet_location in sqlnet.ora. c:\snot\wallet includes ewallet.p12, cwallet.sso, ewallet.lck and cwallet.lck they were made to help create mkstore - and mkstore - createcredential. The portfolio works, if just done sqlnet.ora references, but I would rather this Setup is specific to app.

    Here is my config, just for reference:

    <? XML version = "1.0" encoding = "utf-8"? >

    < configuration >

    < oracle.manageddataaccess.client >

    < version number = "4.121.2.0" >

    < Parameters >

    < name of the parameter = value 'WALLET_LOCATION' = "(SOURCE = (MÉTHODE = FICHIER) (METHOD_DATA = (DIRECTORY = c:\snot\wallet)))"/ >))) "

    < name of the parameter = value 'TNS_ADMIN"="c:\snot"/ >

    < / Parameter >

    < / version >

    < /oracle.manageddataaccess.client >

    < / configuration >

    Regards Niels Jespersen

    Details added, discovered that wallet_override cheated on me.

    If sqlnet.wallet_override = true is in sqlnet.ora, then wallet_location in the config seems to work.  Now, I need help for wallet_override in .net config. It is not there, right now, is it?

    Niels cordially

Maybe you are looking for

  • Add ons gives an error in installation

    IM from chrome to firefox and I have pretty good knowledge of the software. I can not install add ons in firefox. It says error when uploading to add on XXXXXXX. It happens for all the add ons. I have a 16 Mbit/s connection. Help, please.My chrome wo

  • How to get a drive for windows 2000 Professional

    I don't have a disk for windows 2000 pro, when I bought my computer and now OS is damaged and I need a disk to fix. How to make a record? It says corrupted or missing installation disc win32/etc system and type 'r', then how can I get a disk?

  • HP pavilion 500-023w (installing windows 7 questions)

    I just bouth HP pavilion 500-023w desktop PC recently.  It was pre installed windows 8. I tried to install windows 7. Finally, I installed windows 7 but I need the software drivers for my "HP pavilion 500-023w. I tried to download HP Web sites, but t

  • Switching hard drives - urgent.

    I just bought a HP DV7-1450US laptop with the intention of changing the hard drive of my HP Dv2000 which has a burned screen (which currently holds my school papers) in the news.  Now I call HP and they say they won't help me with hard around switchi

  • suspended thread

    Hello I have a wire hanging problem. Due to audio problems I had to create a separate thread for play/stop Quebec. The problem I have is that if I close the window as my audio thread run() hang the sons and the app is running in the back end. Any way