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!

System.AccessViolation error when using ODP.Net

808658Oct 27 2010 — edited Oct 27 2010
We have recently migrated from Microsoft provider to ODP.Net provider for connecting to Oracle Database. When we try to access application it is giving Access Violation Exception some times and “invalid data type in OCI” exception sometimes for the below queries.
There are 2 issues which needs to be addressed here. One is Access Violation and another one is *“ORA-01024: invalid datatype in OCI call”*.
And these 2 issues, sometimes we are encountering Access Violation and sometimes we are encountering invalid data type issue in the same web page and for the same query.
And also we were not getting any of these issues when we were using Microsoft Provider to connect to Oracle Database, We recently migrated to ODP.Net provider to connect to database.
and when started testing the application we encountered these issue. I feel that there may be an issue with ODP.Net and please do the needful to solve these issues.

Issue 1: --ORA-01024: invalid datatype in OCI call or Access Violation Exception
In one of the ASP.Net pages it is giving the Invalid datatype issue for the below query
SELECT t.DATEID,
E.OBJECTID,
E.ROWVERSION,
E.EMPLOYEEDATE,
DECODE(td.DESCRIPTION, NULL, t.DATEDESC, td.DESCRIPTION) DATEDESC
FROM graphicpkgintl50.EMPLOYEEDATES_TAB E,
graphicpkgintl50.DATEDEFINITION_TAB t,
graphicpkgintl50.DESCRIPTIONCONFIG_TAB td
WHERE 'DATEDEFINITION_TAB' = td.TABLENAME(+)
AND 'en-US' = td.CULTURE(+)
AND t.DATEID = td.ID(+)
AND E.EMPLOYEEID = '101680'
AND t.DATEID = E.DATEID
ORDER BY t.DATEDESC
Observations: In the above query we are using Data type, Nvarchar2 type columns, these 2 type columns are working fine in another editors.

Observations: We are still exploring on this.. We are planning to create a simple application and try running this query to see whether is really issue in the above query.

Issue 3: Object reference not set to instance of an object. When we try to open one of the pages

SELECT VALUE FROM graphicpkgintl50.COMPANYCONFIGPARAM_TAB WHERE ATTRIBUTE = 'ISSUPPEARNINGSENABLED'

Below is the event log
Exception object: 057c482c
Exception type: System.AccessViolationException
Message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
InnerException: <none>
StackTrace (generated):
SP IP Function
00000000 00000000 Oracle_DataAccess!Oracle.DataAccess.Client.OpsPrm.FreeOpoPrmCtx(Oracle.DataAccess.Client.OpoPrmCtx*)+0x1
00C0E938 1339DE2A Oracle_DataAccess!Oracle.DataAccess.Client.OracleCommand.FreeNonCachedOpoPrmCtx()+0xaa
00C0E99C 12F7244D Oracle_DataAccess!Oracle.DataAccess.Client.OracleCommand.ExecuteReader(Boolean, Boolean, System.Data.CommandBehavior)+0xf5d
00C0EB38 12F7130C Oracle_DataAccess!Oracle.DataAccess.Client.OracleDataAdapter.Fill(System.Data.DataSet, Int32, Int32, System.String, System.Data.IDbCommand, System.Data.CommandBehavior)+0xcc
00C0EB94 6181AE0F System_Data_ni!System.Data.Common.DbDataAdapter.Fill(System.Data.DataSet)+0x5f
00C0EBC4 0E6693E7 ADP_EZLM_DA_Common!ADP.EZLM.DA.Common.DataManager.RunSqlReturnDS(ADP.EZLM.DA.Common.DbConnectionInfo, System.String, System.Data.IDbDataParameter[])+0x117
00C0EC64 149FC81C ADP_EZLM_DA_UserEmployee!ADP.EZLM.DA.UserEmployee.EmployeeDatesDAO.GetEmployeeDatesByEmployeeID(Int32, System.String)+0x8cc
00C0EE50 149FBD66 ADP_EZLM_Shared_Behavior!ADP.EZLM.Shared.Behavior.Associate.PositionServiceDateBehaviorImpl.GetServiceDates(System.String)+0x96
00C0EEE4 149FA320 ADP_EZLM_Shared_Behavior!ADP.EZLM.Shared.Behavior.Associate.PositionBehaviorImpl.GetSecondaryData(ADP.EZLM.Shared.Interfaces.Associate.DataItem.IPositionDataItem)+0x120
00C0EF78 149F67A1 ADP_EZLM_Shared_Behavior!ADP.EZLM.Shared.Behavior.Associate.PositionBehaviorImpl.GetPositionByEmployeeID(System.String)+0x71
00C0EFA4 149F652E ADP_EZLM_Shared_Behavior!ADP.EZLM.Shared.Behavior.Associate.AssociateBehaviorImpl.GetAssociateByID(System.String, System.String, System.String, System.String)+0x8e
00C0F01C 149F460F ezLaborManagerNet!ezLaborManagerNet.UI4.Setup.Associate.Associate.LoadObjectFromDatabase()+0x48f
00C0F270 149F3F32 ezLaborManagerNet!ezLaborManagerNet.UI4.Setup.Associate.Associate.ProcessPostbackEvent()+0x72
00C0F2AC 149F3515 ezLaborManagerNet!ezLaborManagerNet.UI4.Setup.Associate.Associate.OnPreRender(System.EventArgs)+0x205
00C0F404 672C7958 System_Web_ni!System.Web.UI.Control.PreRenderRecursiveInternal()+0x68
00C0F41C 672C5301 System_Web_ni!System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean)+0x9c1
00C0F644 672C479D System_Web_ni!System.Web.UI.Page.ProcessRequest(Boolean, Boolean)+0x8d
00C0F67C 672C46BF System_Web_ni!System.Web.UI.Page.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 24 2010
Added on Oct 27 2010
1 comment
807 views