Skip to Main Content

ODP.NET

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Migrating System.Data.OracleClient to Oracle.DataAccess.Client - XSD error

794009Aug 26 2010
Hi, I'm a newbie using Oracle ODP.NET provider for .NET.

We have a web application that uses XSD to connect to Oracle using the provider System.Data.OracleClient.

We want to migrate from System.Data.OracleClient to Oracle.DataAccess.Client.

Installing and referencing the Oracle.DataAccess.dll all works fine.

Then I changed all the references from System.Data.OracleClient to Oracle.DataAccess.Client and removed the System.Data.OracleClient.dll assembly from the web.config file.

All compiles well, until I run the application, looks like the problem is the parameter use in the XSD file... the error I get is:

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

Value does not fall within the expected range.
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: System.ArgumentException: Value does not fall within the expected range.

Source Error:


Line 8864: global::Oracle.DataAccess.Client.OracleParameter param = new global::Oracle.DataAccess.Client.OracleParameter();
Line 8865: param.ParameterName = "Original_TIPOCOMISIONID";
Line 8866: param.DbType = global::System.Data.DbType.VarNumeric;
Line 8867: param.IsNullable = true;
Line 8868: param.SourceColumn = "TIPOCOMISIONID";


Source File: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\src\4a9afcc3\460b5b6b\App_Code.eljteq62.7.cs Line: 8866

Stack Trace:


[ArgumentException: Value does not fall within the expected range.]
Oracle.DataAccess.Client.OracleParameter.set_DbType(DbType value) +134
dsProductosTableAdapters.SIPC_TIPOCOMISIONTableAdapter.InitAdapter() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\src\4a9afcc3\460b5b6b\App_Code.eljteq62.7.cs:8866
dsProductosTableAdapters.SIPC_TIPOCOMISIONTableAdapter.get_Adapter() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\src\4a9afcc3\460b5b6b\App_Code.eljteq62.7.cs:8797
dsProductosTableAdapters.SIPC_TIPOCOMISIONTableAdapter.GetData() in c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\src\4a9afcc3\460b5b6b\App_Code.eljteq62.7.cs:8993

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +71
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +350
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +488
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1247
System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +95
System.Web.UI.WebControls.ListControl.PerformSelect() +34
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.BaseDataBoundControl.OnPreRender(EventArgs e) +22
System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e) +18
System.Web.UI.Control.PreRenderRecursiveInternal() +80
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3614

I'd like some help on how to make the XSD compile with the new provider, Oracle.DataAccess.Client.

Many thanks in advance for any help!
Pieter
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 23 2010
Added on Aug 26 2010
0 comments
1,809 views