Failure of Oracle.DataAccess.Client on the Prod Server

Our site Asp.net/Vb.net (.net 4) fails to load when left dev for the production. Works without problems on Dev

(Dev is Windows 7 32-bit)

(Production is Server 2008 64-bit)

Application pool is .NET v4.0, 32-Bit = True, the PipeLine Mode = Integrated

The site connects to an Oracle 11 g via ODAC 12 c Release 2 (12.1.0.1.2) base the same version has been installed on the Production as well.

We use TNSNAMES, it has been tested on Production and works.

What I am doing wrong?

Below is the error I get.

Server Error in '/' Application.
--------------------------------------------------------------------------------

Unhandled Execution Error
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Oracle.DataAccess.Client.OracleException:

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:


[OracleException (0x80004005)]
  
Oracle.DataAccess.Client.OracleException.HandleErrorHelper(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx* pOpoSqlValCtx, Object src, String procedure, Boolean bCheck, Int32 isRecoverable) +1601
  
Oracle.DataAccess.Client.OracleException.HandleError(Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, Object src) +61
  
Oracle.DataAccess.Client.OracleConnection.Open() +5329
  cpsweb
.com.clsDB.Get_DataTable(String sSQL) in D:\SourceVaultLocal\WebSites\cpsweb.com\CPS_Code\clsDB.vb:42
  cpsweb
.com.clsSec_Security.isVisible(String sPageName, Object& oObj) in D:\SourceVaultLocal\WebSites\cpsweb.com\CPS_Apps\Sec_WebSite\Code\clsSec_Security.vb:50
  cpsweb
.com._Default.Page_Load(Object sender, EventArgs e) in D:\SourceVaultLocal\WebSites\cpsweb.com\Default.aspx.vb:20
  
System.Web.UI.Control.OnLoad(EventArgs e) +91
  
System.Web.UI.Control.LoadRecursive() +74
  
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

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

If it turns out that.  The drivers do not install correctly.

I added the following key

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\

key = 'NLS_LANG.

value = "AMERICAN_AMERICA. UTF8.

do you have an iisreset, and of course the site came right up.

Tags: Database

Similar Questions

  • 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.

  • Install oracle 11g Client in an application server (HP - UX 64-bit operating system)

    I'm going to install oracle 11g client in an application server (HP - UX 64-bit operating system)
    I have to create the new mount for client installation point?
    Through the application server, I will access (rac) database server.

    I have enough space available in / or root mount point.
    I have space in / opt mounting point, can I make a directory in/opt/OU1/app and install the client at this place in the access database?



    Thank you
    Solaiman

    876149 wrote:
    I'm going to install oracle 11g client in an application server (HP - UX 64-bit operating system)
    I have to create the new mount for client installation point?
    Through the application server, I will access (rac) database server.

    I have enough space available in / or root mount point.
    I have space in / opt mounting point, can I make a directory in/opt/OU1/app and install the client at this place in the access database?

    Thank you
    Solaiman

    You can install in any desired point of installation/directory. Oracle does not give a flying fig this topic. Just put it somewhere that makes sense.

  • CPU spikes 80% earlier at 10:45 on the PROD Server

    Hi all

    11.2.0.1

    AIX 6.1


    Our systems administrator monitors daily using CPU/IO/MEMORY of our PROD server to the level of the BONE.

    It announced today that there is a peak of 80% processor use earlier to our Production database server.

    My boss asked me to study what Oracle user/program/process is causing this "peak".

    There the database views performance that I can choose to give this info on time?



    Thank you very much



    zxy


    > Given the above example, I want to get the (top CPU consuming sql) report at 10:43 - 10:45 July 30, 2013. Happened yesterday.

    Is this possible?

    Run state of ASHES for that interval.

    SQL > @? / rdbms/admin/ashrpt

    ...

    Enter the value for report_type: text

    ....

    Enter the value of begin_time: 30/07/13 10:40

    ...

    Enter the duration value: 10

    ...

    Enter the value of report_name: [Enter]

    ...

    Then look at the report.

  • Integration between Oracle apps R12 and the MySQL server.

    Hello

    We got a requirement to integrate between the oracle database and the MySQL server.

    Payroll run in the Oracle Apps R12 and the need to develop an API to insert data of payroll results in MySQL database tables, it will be for 4.5 months as finance Modules of Apps will also apply for them, so that MySQL will be totally replaced by Oracle.

    Please suggest how to start integration, as it's my first time.

    I went through a document online, but it says 'updates, removal or insertion may fail' using the gateway dg4odbc, need to use 'different gateway called DG4MSQL, which requires the purchase of new licenses.'

    Thank you very much in advance.

    Kind regards

    Afzal.

    Afzal,

    As mentioned in your message, you must use DG4MSQL which requires the purchase of a new license.

    How to set up DG4MSQL (Oracle to MS SQL Server database entry door) 64-bit Unix OS (Linux, Solaris, AIX, HP - UX) post installation (Doc ID 562509.1)

    How to set up DG4MSQL (MS SQL Server database gateway) on a 64-bit Windows post install (Doc ID 1086365.1)

    How to troubleshoot common errors encountered when using the gateways of the database (DG4IFMX, Dg4MSQL, DG4SYBS), DG4ODBC or generic connectivity (Doc ID 234517.1)

    How to set up DG4MSQL (gateway to Oracle to MS SQL Server database) exit 11 on Linux x 86 32-bit post installation (Doc ID 437374.1)

    Thank you

    Hussein

  • Problem with access to the Oracle.DataAccess.dll in the application folder

    Hi all.
    http://StackOverflow.com/questions/3935808/how-can-i-deploy-a-NET-application-that-uses-ODAC-without-installing-the-whole

    Issue. It works with 11g? I don't want to install the whole ODAC on client computers

    who is Ellen

    Published by: 902645 on 21.01.2012 14:20

    Published by: 902645 on 22.01.2012 11:39

    Download the 11g ODAC Xcopy installation. It is around 50 MB compressed upward and you offer the minimum installation size possible. It is the smallest possible at this moment production which is taken in charge by Oracle. There is a 32-bit version and 64-bit, depending on the version of your .NET Framework.

    Be on the lookout for the beta of managed provider ODP.NET fate soon. Which will further reduce the size.

  • How to call a report from Oracle 10g lies in the application server to the server of DB using PLSQL

    Hi all

    I have the following requirement

    I have a 10g Oracle compiled report and giving PDF as output...

    1. I want to call the same report server DB using PLSQL to generate reports in bulk.

    2. the production of the above-mentioned reports should be in the path specific and with the specific name

    Please help me on this

    Kind regards

    SH

    What you want is called "Event Driven publication":

    http://docs.Oracle.com/CD/E17904_01/bi.1111/b32121/pbr_evnt001.htm#RSPUB23700

  • Release of the ODAC 4 &amp; 5 - Oracle.DataAccess.dll 4.112.3.0

    Has anyone else noticed that ODAC version 4 and 5 have the same 4.112.3.0 AssemblyVersion?

    Oracle (ODAC) for Windows data access components

    It took me a while to spot the problem.  I use Entity Framework 5 and hitting a machine with version 4.  He threw a completely misleading exception on the laundry.

    System.Reflection.TargetInvocationException: Exception was thrown by the target of a call. -> System.TypeInitializationException: the initializer for type for 'Oracle.DataAccess.Client.OracleConnectionStringBuilder' threw an exception. -> System.TypeInitializationException: the initializer for type for 'Oracle.DataAccess.Client.RegAndConfigRdr' threw an exception. ---> System.Configuration.ConfigurationErrorsException: MySchema.MyPackage.MyProcedure.RefCursorMetaData.CUROUT.Column.1 is not valid

    at Oracle.DataAccess.Client.RegAndConfigRdr.AddMetadataForRefCursor (String refCursorKey, String metadataInfo, Hashtable & schemaTable)

    to Oracle.DataAccess.Client.RegAndConfigRdr.RetrieveInfoFromConfig (NameValueCollection nvc, Hashtable & schemaTable, Boolean bIsCallFromODT)

    to Oracle.DataAccess.Client.RegAndConfigRdr... cctor()

    Since version 4 ODAC has been installed, the machine had Oracle.DataAccess.dll (4.112.3.0) in the GAC.  So, my application could not use my local copy of Oracle.DataAccess.dll (4.112.3.0) of version 5.

    There are problems with having the AssemblyVersion similarly for version 4 and 5.  Can we get an extra release with an updated version?

    There are two questions in your last post:

    (1) Oracle.DataAccess.dll versioning

    (2) DLL's Client Oracle unmanaged referenced by Oracle.DataAccess.dll

    The forum post you quote refers to the #2 problem.

    Problem #1, preferred the ODP.NET team is at version every single Oracle.DataAccess.dll version. We can not due to a conflict with the policy of general correction of Oracle. With the help of AssemblyInformationalVersionAttribute is the best compromise.

    If you have already downloaded an Oracle patch, you will notice the files share the same version number as other patches within a family group of patches Oracle. With each new group of patches or major version, Oracle.DataAccess, dll can then increase its version, just like every other DLL of Oracle.

  • Not able to see the 64-bit oracle.dataaccess.dll of GAC

    Hello
    I installed the client of 11g oracle 64-bit with ODP.net and deployed Oracle.DataAccess.dll in the GAC (it is deployed on C:\Windows\Microsoft.NET\assembly\GAC_64\Oracle.DataAccess). But I'm not able to return this dll to a project in Visual Studio, it does not appear in the window "Add reference". Please help me solve this problem. My system is a 64-bit computer.

    I did not submit this problem in the 32-bit computer. In 32-bit computer, I installed the client 32-bit oracle 11g and deployed Oracle.DataAccess.dll in the GAC (it is deployed on C:\Windows\Microsoft.NET\assembly\GAC_32\Oracle.DataAccess). I could see this dll to the project in visual studio.



    Kind regards

    Kiran.

    Hello

    Do you mean the .net tab? I think the problem is u cant reference 64-bit dll like that, since the studio is a 32-bit application. We had the same problem and our solution was to install 32-bit odp.net on our 64-bit machines, and refer instead.

  • Can you install Oracle 11 g 32 bit and 64 bit clients on the same machine AIX 6?

    We have a supplier who needs a 32-bit client on the application server which is AIX 6. We already have 11g 64 bit client installed there. So, we can install both or I am interested in a the first 64-bit client deinstall?

    Yes you can, please check the documentation: http://docs.oracle.com/cd/E11882_01/install.112/e24334/toc.htm#CHDIGJJB

    From Oracle Database 11 g Release 2 (11.2), the client software 64-bit does contain the binary 32 bits client. If you need the 32-bit client binaries on 64-bit platforms, then install the 32-bit binaries from the 32-bit respective client software in a separate Oracle home.

  • linux 4 oracle 10g client to connect to the server window 2003 server, oracle 10g

    Hello

    I have my 10g oracle installed on windows server 2003 server.
    On another system I have oracle 10g client is installed after edition of RedHat enterprise 4.

    I want to connect my client to the database server.

    I check using oracle universal install in that it shows installed products i.e.
    Oracle 10g client is installed on the linex system.

    but when I try to write a command like
    [oracle@satish ~]$ sqlplus$
    bash: sqlplus$: command not found
    
    [oracle@satish ~]$ tnsping
    bash: tnsping: command not found
    and it doen't show any enty applications for oracle which is strange.

    as I am new to linux.

    How to overcome this problem.

    Thank you
    Umesh

    Include $ORACLE_HOME/bin in your path (not only $ORACLE_HOME):

    export PATH=$PATH:/home/oracle/oracle/product/10.2.0/client_1/bin

    Werner

  • 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

  • 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

  • System.Data.OracleClient migration to 4 Oracle.DataAccess issues

    I'm trying to convert a great demand out of the obsolete microsoft api to oracle dataaccess.

    But I faced a no-go - possible.

    I have this request:

    UPDATE TSUTCMP0

    SET

    DT_INI_CMP =: DataInicio / * I just omitted other parameters to simplify * /.

    WHERE

    CD_SEQ_CMP =: Código

    Then to run this query and many others I like the following:

    using (var = new TransactionScope() scope)

    using (var conn = MethodToCreateConnection()) / / this method simply creates: DbProviderFactories ("Oracle.DataAccess.Client"). CreateConnection()

    using (var cmd = conn. CreateCommand())

    {

    cmd.CommandText = requesting one;

    var p is cmd. CreateParameter();

    p.ParameterName = "DataInicio";

    p.Value = someDate;

    cmd. Parameters.Add (p);

    cmd ExecuteNonQuery());

    }

    This used to work using microsoft api. I have hundreds of querys, using parameters.

    When I run the present by using the Oracle.DataAccess, I get the following:

    {ORA-00932: inconsistent data types: expected DATE obtained NUMBER}

    In this case, the column in the table is DATES. I inspected the OracleParameter p and DbType is of type DateTime and OracleDbType is TimeStamp. Tried to force OracleDbType far without success.

    I also queries with columns of type DATE that stores the date and time.

    I don't know what I'm missing.

    MS OracleClient binds parameters by name. ODP.NET links in position. If you want to change the ODP. NET default binding behavior, set:

    OracleCommand.BindByName = true;


    Do this for each OracleCommand object that binds the parameters.

  • 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.

Maybe you are looking for

  • How to install Bluetooth Stack for Satellite L850 - 13 M?

    Hello I L850 of Satellite - 13 M with brief model number: PSKDNE and I can not install the bluetooth device driver. I downloaded from the site, but in the installation process, it shows that the driver is not correctly installed. I tried several time

  • Satellite Pro A200 - cannot install Windows 7 cause lack CD/DVD driver

    Hello, I have a Satellite Pro A200, PSAE4E-046018N5 and I am trying to install Windows 7 but I can't go to step one because it is not found a driver:A message box saying: required A driver of currency for the CD/DVD drive is missing. If you have a dr

  • Satellite L305-S5919 - keys just stop working

    I have a Satellite L305 - S5919 & first my ESC, Q, 4 keys stopped working.I've only had it for 4 months what has happened. Does anyone know why these keys would simply stop working all of a sudden & I could do about it? I called Toshiba support & the

  • Merchant Navy

    Hello, I bought an iPhone and the address to which I send it's a hotel, my question is that the package will arrive two days before I get there and I wanted to know if you would leave my package stay there without me being able to receive it, instead

  • How to detect multiple points of laser on the image

    Consider I have a picture with several spots dark bright laser. I want to find the center of gravity of each laser spot and return the coordinates of each spot. Currently, I managed to detect an single spot to grab an image, adjustment of the thresho