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.
Tags: Database
Similar Questions
-
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 293This 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
-
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.
-
C# Oracle.DataAccess CommandType.StoredProcedure is OracleDbType. Date
I can't get my code to call an oracle procedure that has an order date.
I receive a System.FormatException occurred in Oracle.DataAccess.dll
I tried to assign the param. Value = DateTime and also tried assigning as a string formatted with no luck.
What is the magic formula, I need to call this function?
Here is a code snippet:
OracleCommand cmd = new OracleCommand();
cmd connection group appConn;.
cmd.CommandText = "mypackage.myprocedure";
cmd.CommandType = CommandType.StoredProcedure;
Param = new OracleParameter ("iDateParamter", OracleDbType.Date, ParameterDirection.Input);
Param. Value = "August 31, 2015."
Here are other formats I' tried... ved param. Value = myDateValue.ToString ("dd - MMM-yyyy"). ToUpper(); (/ / "MM/dd/yyyy"); 'YYYY-MM-dd'); "MM-dd-yyyy");
cmd. Parameters.Add (param);
BindByName. cmd = true;
cmd ExecuteNonQuery());
Shame on me..., you can close this message
It was not for the error on my date field, I had another parameter that has been attributed to a string instead of an integer.
For the record, this has worked well for me:
Param = new OracleParameter ("iActvyPerDate", OracleDbType.Date, ParameterDirection.Input);
Param. Value = li. ActvyPerDate.ToString ("dd-MMM-yyyy"). ToUpper();
-
Migration - MySQL to Oracle - do not generate data files
Hello
I have been using the SQL Developer migration Assistant to move data from a MySQL 5 database to an Oracle 11 g server.
I used it successfully a couple of times and its has all worked.
However, I am currently having a problem whereby there is no offline data file generated. Control files and all other scripts generated don't... just no data file.
It worked before, so I'm a bit puzzled as to why no logner work.
I looked at newspapers of migration information and there is no errors shown - datamove is marked as success.
I tried deleting and recreating rhe repository migration and checked all grants and privs.
Is there an error message then it would be something to continue but have tried several times and checked everything I can think.
I also tried the approach of migration command-line... same thing. Everything works fine... no errors... but only the table creation and control script files are generated.
The schema of the source is very simple and there is only the tables to migrate... no procedure or anything else.
Can anyone suggest anything?
Thank you very much
MikeHi Mike,.
I'm so clear.
You use SQL Developer 3.0?
You walked through the migration wizard and choose Move Offline mode data.
The generation of DDL files are created as are the scripts to move data.
But no data (DAT) file is created and no data has been entered in the Oracle target tables.With offline data move, Developer SQL generates (saved in your project, under the DataMove dir directory) 2 sets of scripts.
(a) a set of scripts to unload data from MySQL to DAT files.
(b) a set of scripts to load data from the DAT files in the Oracle target tables.
These scripts must be run by hand, specifying the details for the source databases MySQL and Oracle target."no offline data file generated. Control files and all other scripts generated don't... just no data file. »
«.. . but only the creation and control file table scripts are generated. »What you mean
(1) the DAT files are not generated automatically. This should, if we need to run the scripts yourself
(2) after manually running the scripts that the DAT are not present, or that the DAT files are present, but the data does not load in Oracle tables.
(3) the scripts to move data in offline mode does not get generatedKind regards
Dermot
SQL development team. -
There are 2 versions of Oracle.DataAccess on the system with the same public token
Hello
can someone please explain this
1 Oracle.DataAccess... x 86... 2.112.1.0... 89b483f429c47342
2 Oracle.DataAccess... x 86... 2.112.2.0... 89b483f429c47342
I have a reference in Visual Studio to one of these DLLs. My question:
(1) what are the differences?
2. what assembly is loaded by my application?
greetings and thanks
EllenHi Ellen,.
All versions of the ODP assemblies have the same public key token. The difference is your case is you two versions (2.112.1.0 and 2.112.2.0) installed, and the difference between new features, bug fixes, etc.
ODP also installs policy files by default that can come into play here, but it depends on which version you installed last. If you have installed 2.112.2.0 last, then the policy file would automatically redirect apps looking for 2.112.1.0 to use 2.112.2.0 instead.
If you have installed 2.112.1.0 last, then the file 2.112 strategy would only redirect apps more 2.112.1.0 to use 2.112.1.0.
If you're wondering how to determine what your application assembly IS actually responsible, the best way is via a tool like Process Explorer, which will allow that see you what libraries are loaded into a process.
Greg
-
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.
-
Could not load file or assembly ' Oracle.DataAccess error on server
I construisent.net application on my Machine local Windows 7 and I have the 32-bit Microsoft installed on my machine that works well with VS 2010.
I placed it on the server and when I open the page that accesses data from Oracle, I get the error below. The server and my local computer have the Oracle.DataAccess
DLL installed and both have the same public token 89b483f429c47342. I changed the CPU of Any CPU target to x 86 and published a Release version of my project to the server.
Why I get the below error?
==========================================================================================================
Could not load file or assembly 'Oracle.DataAccess, Version = 4.112.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342' or one of its dependencies. The system cannot find the specified file.
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 its origin in the code.
Exception details: System.IO.FileNotFoundException: could not load file or Assembly 'Oracle.DataAccess, Version = 4.112.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342' or one of its dependencies. The system cannot find the specified file.
Source error:
An unhandled exception is generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception below stack trace.
Assembly Load Trace: the following information may be helpful to determine why the assembly 'Oracle.DataAccess, Version = 4.112.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342' could not be loaded.
WRN: Assembly binding logging is disabled.
To enable the failure of link Assembly record, set the registry value [HKLM\Software\Microsoft\Fusion! EnableLog] (DWORD) to 1.
Note: There is some pain associated with a record of failure performance link Assembly.
To disable this feature, remove the registry value [HKLM\Software\Microsoft\Fusion! EnableLog].
Stack trace:
[FileNotFoundException: could not load file or assembly 'Oracle.DataAccess, Version = 4.112.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342' or one of its dependencies.] The system does not find the specified file].
antac.dashboard.Page_Load (Object sender, EventArgs e) in C:\Users\George\Documents\Visual Studio 2010\Projects\antac\antac\dashboard.aspx.cs:92
System.Web.Util.CalliHelper.EventArgFunctionCaller (fp IntPtr, Object o, object t, e As EventArgs) + 25
System.Web.UI.Control.LoadRecursive () + 71
System.Web.UI.Page.ProcessRequestMain (Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) + 3048
--------------------------------------------------------------------------------
Version information: Microsoft .NET Framework Version: 4.0.30319; ASP.NET Version: 4.0.30319.1This isn't the only DLL that is required. You must fully install ODP.NET on the server.
-
I have visual Studio 2008 and ODAC installed Winows 7, my VS2008 application recovers data from Db Oracle 10 g xe. I get this error report wih spare no effort to connect and interact wih the database:
"Could not load file or assembly ' Oracle.DataAccess, Version = 2.111.6.20,
Culture = neutral, PublicKeyToken = 89b483f429c47342' or one of its dependencies.
The system cannot find the specified file. »
What could be the problem? The same code that worked on Vista is returning to this error report.Hello
Oracle 11 g 2 32 and 64-bit client are available for download on:
http://www.Oracle.com/technology/tech/dotnet/index.html
That should solve the problem you have
Thank you
Mrinal
-
Oracle.Dataaccess.dll using unmanaged for 32 and 64 bit Winform application.
Hello
I am new to oracle ODP.
I have a few questions about her.
1. If I give the reference only and do not include gac Oracle.Dataaccess.dll (suppose 2.11.3.XX) in my project and the client system has the access.dll of oracle version 2.11.2.XX(or autres) then what happens?
Be it use the 2.11.2.xx DLL to GAC or error.
2. I need to create some app for 32 and 64-bit client then should I develop a version for two separate, or are there other alternatives (I can't use the managed oracle DLLS due to .net 2.0).
I've already lost two days on managing versions of oracle as oci.dll ddll, oraop11s.dll etc.
Please suggest any other alternative if you have
Thank you
I think that if you run an application on machine Win x 64 with AnyCPU, 64-bit .NET will be always charged. I don't think you can change this even if you try to load a 32-bit DLL. There may be a way, but I do not know myself.
If you ODP.NET 11.2.0.3 on your system, I don't see why you need to install an earlier version of ODP.NET, such as 11.2.x
-
Hello
I installed Oracle Database 11g Release 2 full Client for Microsoft Windows (x 64) of: (link)of Oracle Database 11 g Release 2 for Microsoft Windows (x 64)
When I run an ODBC statement from a .NET (64-bit) application, I get the following error:
Type of exception: System.OverflowException
Exception message: arithmetic operation resulted in an overflow.
Exception trace: at System.Data.Odbc.OdbcDataReader.FirstResult)
I tried the same statement from another machine (same configuration), but with only the components of the ODAC 11.2 and it worked perfectly fine.
I don't want to use 11g ODAC components because it does not support transactions responsible MTS (known bug). The full client for its works perfectly fine for this kind of scenario. I did some research online and I find that there are available patches to fix the above point. Please give me a link to download the fix or tips on how I can fix this problem.
Concerning
Regnier
Hi Ben Amor,.
You could be hitting the known, documented problem in Note below:
Data recovery using a .NET ODBC Application may fail with: "arithmetic operation caused an overflow" (Doc ID 1181253.1)
If you're on 11.2.0.1 Oracle client download and install the patch 11.2. 0.1 PATCH 5:9966926
Download link:
https://updates.Oracle.com/download/9966926.html
This bug is fixed in 11.2.0.2.0 or a later version of the Oracle client.
The 11.2.0.2 software can be downloaded from My Oracle support: Patch: 10098816
https://updates.Oracle.com/download/10098816.html
Last client version 11.2 that is 11.2.0.4, can be downloaded from My Oracle support: Patch: 13390677
https://updates.Oracle.com/download/13390677.html
Kind regards
Ravi
-
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.
-
Problem with migration SQL Server Oracle 11.2 2012 DB using SQL Developer Migration workbench
Hello
I have a problem when migrating SQL Server Oracle 11.2 2012 using SQL Developer Migration workbench, hope that someone had the same problem before and can give same advide...
I use SQL Developer Version 4.0.1.14 and Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0. and last jtds - 1.3.
I created the schema migration_repo, privileges, connected to the third part of Db (SQL Server) and begin a trial with assistant. In the first step of the model to Capture, I get the message from the:
"Company Capture Capture failed. Refer to the table MIGRLOG in the repository for more details ".
But MIGRLOG is empty.
Here is my log:
<? XML version = "1.0" encoding = "windows-1252" standalone = 'no '? >
< Log >
account <>
< date > 2014-03-16T 20: 49:17 < / date >
oracle.dbtools.migration.workbench.core.MigrationLogResourceBundle < recorder > < / recorder >
< level > SEVERE < / level >
oracle.dbtools.migration.workbench.core.logging.MigrationLogUtil < class > < / class >
< message > Capture
Capture Enterprise
Capture failure. Refer to the MIGRLOG table in the repository for more details < / message >
oracle.dbtools.migration.workbench.core.ui.FullMigrateTask.doOnlineEnterpriseCapture(FullMigrateTask.java:758) < param > < / param >
oracle.dbtools.migration.workbench.core.ui.FullMigrateTask.doCapture(FullMigrateTask.java:601) < param > < / param >
oracle.dbtools.migration.workbench.core.ui.FullMigrateTask.doMaskBasedActions(FullMigrateTask.java:400) < param > < / param >
oracle.dbtools.migration.workbench.core.ui.FullMigrateTask.doWork(FullMigrateTask.java:314) < param > < / param >
oracle.dbtools.migration.workbench.core.ui.FullMigrateTask.doWork(FullMigrateTask.java:147) < param > < / param >
oracle.dbtools.raptor.backgroundTask.RaptorTask.call(RaptorTask.java:193) < param > < / param >
java.util.concurrent.FutureTask.run(FutureTask.java:262) < param > < / param >
oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$ (RaptorTaskManager.java:554) < param > RaptorFutureTask.run < / param >
java.util.concurrent.Executors$ (Executors.java:471) < param > RunnableAdapter.call < / param >
java.util.concurrent.FutureTask.run(FutureTask.java:262) < param > < / param >
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) < param > < / param >
java.util.concurrent.ThreadPoolExecutor$ Worker.run (ThreadPoolExecutor.java:615) < param > < / param >
java.lang.Thread.run(Thread.java:744) < param > < / param >
oracle.dbtools.migration.workbench.core.logging.LogInfo@68e69a < param > < / param >
< exception >
< message > oracle.dbtools.migration.workbench.core.ui.FullMigrateTask$ FullMigrateTaskException: Capture
Capture Enterprise
Capture failure. Refer to the MIGRLOG table in the repository for more details < / message >
< frame >
oracle.dbtools.migration.workbench.core.ui.FullMigrateTask < class > < / class >
< line > 758 < / line >
< / framework >
< frame >
oracle.dbtools.migration.workbench.core.ui.FullMigrateTask < class > < / class >
< line > 601 < / line >
< / framework >
< frame >
oracle.dbtools.migration.workbench.core.ui.FullMigrateTask < class > < / class >
line 400 > of < < / line >
< / framework >
< frame >
oracle.dbtools.migration.workbench.core.ui.FullMigrateTask < class > < / class >
< line > 314 < / line >
< / framework >
< frame >
oracle.dbtools.migration.workbench.core.ui.FullMigrateTask < class > < / class >
< line > 147 < / line >
< / framework >
< frame >
oracle.dbtools.raptor.backgroundTask.RaptorTask < class > < / class >
< line > 193 < / line >
< / framework >
< frame >
java.util.concurrent.FutureTask < class > < / class >
< line > 262 < / line >
< / framework >
< frame >
oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$ RaptorFutureTask < class > < / class >
< line > 554 < / line >
< / framework >
< frame >
java.util.concurrent.Executors$ RunnableAdapter < class > < / class >
< line > 471 < / line >
< / framework >
< frame >
java.util.concurrent.FutureTask < class > < / class >
< line > 262 < / line >
< / framework >
< frame >
java.util.concurrent.ThreadPoolExecutor < class > < / class >
< line > 1145 < / line >
< / framework >
< frame >
java.util.concurrent.ThreadPoolExecutor$ Worker < class > < / class >
< line > 615 < / line >
< / framework >
< frame >
java.lang.Thread < class > < / class >
< line > 744 < / line >
< / framework >
< / exception >
< / recording >
account <>
< date > 2014-03-16T 20: 49:17 < / date >
oracle.dbtools.migration.workbench.core.MigrationLogResourceBundle < recorder > < / recorder >
WARNING < level > < / level >
oracle.dbtools.migration.workbench.core.ui.FullMigrateTask < class > < / class >
<>error message: ORA-06550: line 1, column 14:
PLS-00201: identifier ' SS2K5ALLPLATFORM. STAGECAPTURE' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
: FAILED: Database Migration: FAILURE < / message >
oracle.dbtools.migration.workbench.core.logging.LogInfo@1e2c9b99 < param > < / param >
< / recording >
I try with model db (DB empty, just a single table), but the error is same. However, if I try to copy the acronym tabele from SQL Server to Oracle it works fine...
I guess it's something with the configuration, but beacause I am new in Oracle still have no idea...
Any help would be much appreciated
I thank in advance
Stefan
Hello Stefan,
did you create the repository Migration of your database to Oracle (Tools-> Migration-> repository management)?
The SS2K5ALLPLATFORM package is usually created when you add the migration of the Oracle database repository and it contains the function StageCapture.
So please make sure that you have created a repository of migration in an Oracle database and associate it with the first step of your migration.
-Klaus
-
I'm back RMAN.
For purposes of experience, I moved control02.ctl of actual position and then restore the backup. After you restore successfully, I couldn't open DB again and meet the error ORA-01110, I need your help to understand the error on my part and its resolution.
RMAN> restore controlfile from '/u01/app/oracle/fast_recovery_area/TBMDB/backupset/2013_03_26/o1_mf_ncsnf_TAG20130326T164239_8o32h84t_.bkp'; Starting restore at 27-MAR-13 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=129 device type=DISK channel ORA_DISK_1: restoring control file channel ORA_DISK_1: restore complete, elapsed time: 00:00:01 output file name=/u01/app/oracle/oradata/tbmdb/control01.ctl output file name=/u01/app/oracle/fast_recovery_area/tbmdb/control02.ctl Finished restore at 27-MAR-13
Published by: malhi on 27 March 2013 23:55$sqlplus / as sysdba SQL> startup ORACLE instance started. Total System Global Area 521936896 bytes Fixed Size 2229944 bytes Variable Size 402655560 bytes Database Buffers 109051904 bytes Redo Buffers 7999488 bytes Database mounted. ORA-01589: must use RESETLOGS or NORESETLOGS option for database open SQL> alter database open resetlogs; alter database open resetlogs * ERROR at line 1: ORA-01194: file 1 needs more recovery to be consistent ORA-01110: data file 1: '/u01/app/oracle/oradata/tbmdb/system01.dbf'
Hello;
It looks like how you restored the control antagonized file a copy who did align with current data files.
I just tested this I'll now what I did different here in a moment.
My test:
http://www.Visi.com/~mseberg/RMAN/simulating_loss_of_control_files_rman.html
The link shows all the details. What jumps out is two things. I put the DBID and I let RMAN decide what control file to restore. View I had the same ORA-01589 like you and how I recovered from it.
RMAN > restore database;
SQL > alter database open resetlogs;
RMAN > reset database;and then the test data.
Best regards
mseberg
Published by: mseberg on March 28, 2013 02:22
-
Default system date and time in a table
Dear all,
I packed as an array and I have an ENTERD_TIME column in a table. I want to enter the default system date and time of this column in a table.
How can I display by default date and time in the ENTERD_TIME column in a table.
Thank youFormat Need DD-MON-YYYY HH:MIPM
Under the attributes of tabular form > Type default enter the Expression PL/SQL and the default value to SYSDATE. Under 'Column attributes' set the HH:MIPM MON-DD-YYYY format.
Denes Kubicek
-------------------------------------------------------------------
http://deneskubicek.blogspot.com/
http://www.Apress.com/9781430235125
http://Apex.Oracle.com/pls/Apex/f?p=31517:1
http://www.Amazon.de/Oracle-Apex-XE-Praxis/DP/3826655494
-------------------------------------------------------------------
Maybe you are looking for
-
Satellite L45-s7423 quite dead
I have a toshiba satellite L45-s7423. I'll start by saying from the outset that I don't really know much about computers. I tried to plug my headphones on the laptop, but it was dark in the room so I me rummaging around trying to find with the end of
-
Array of bytes to the Type specifier
Hello everyone. In my project I have a connection to an external device via a RS-232 connection. Now, I read the bytes and want to convert them to a specified type, such as I32 or U8. When the data arrives, I convert the string to a byte array. For o
-
nothing yet
-
I forgot my administrator/power on password on my hp G62 help!
I can't spent! It says system disabled after you have entered an invalid password. Key is 98597462
-
I have Windows 7 and almost always use Firefox (latest version). Is my current problem #1 by writing an email a little notice popped up saying my session has expired (which has never happened before) and disconnected me (also never happened before).