Oracle.XmlType Parameter with DAAB 4.0

Topics: Building and extending application blocks, Data Access Application Block
Nov 9, 2008 at 6:56 PM
Hi,

Reading old post I learned that we can not use DAAB(older versions) to read Oracle.XMLType parameter value from Oracle stored procedure  . ( since it used SYstem.Data.OracleClient instead of Oracle.DataAccess.OracleClient) 

I just want to confirm if this is same case with DataAccess Applicatition block 4.0...

We are running on oracle 11 and I am able to use DAAB to read ref cursors etc.. I want to keep my dataAcccess layer database independent. I was able to do that until I encoutered  Stered procedure which has xmltype output parameter.

I would appriciate if any one point me to any workarounds or way to read xml file from oracle stored procedure..

Thanks,...
Nov 10, 2008 at 8:26 AM
As suggested in this post, you could use ODP.NET,  http://www.codeplex.com/entlib/Thread/View.aspx?ThreadId=31609.  I haven't tried working on an Oracle database but won't it work if you pass the xml as string?


Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com
Nov 10, 2008 at 5:57 PM
Thank you for your response..

It does work when I introduce code dependecy on Oracle.DataAccess( ODP.net). I was successful in receving xml by using OracleParameter, OracleXmlType and bypassing DataAccess Application block . This way, my code will no longer to database implementation independent.

I am looking for a way where in I would able to process xmltype from oracle using DataAccess Application block. ( one of the method I found was to customize Data Access Application block to use Oracle.DataAccess (ODP.net) instead of System.Data.OracleClinet(.net framework) . I am trying to keep my DataAccess layer database implementation independent.

I am trying to see if there is any better way to handle the issue with Data Access Application Block 4.0(  new version) ???

I would appriciate if any one could share thier experiences on this issue..

Nov 12, 2008 at 6:53 AM
Basically, DAAB is just a wrapper around ADO.Net.  If ADO.Net doesn't support such data type, DAAB won't also be able to.  The comparison of  Microsoft's System.Data.OracleClient with ODP.Net here http://msdn.microsoft.com/en-us/library/ms971518.aspx clearly implies that support for XMLType is only available in the latter.  If no datatype in either OracleDbType or DbType would work,  I don't think there's much you can do but to change the datatype itself in your oracle stored procedure. 


Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com

Nov 12, 2008 at 8:30 PM
Thanks for the reponse..

I would try to customize the DAAB to use ODP.net instead of System.Data.OracleClient.

Any idea on Entlib team's future plans to include ODP.net wrapper along with Oracle client ???

Nov 14, 2008 at 7:38 AM
I'll check this out with the Enterprise Library Team.


Sarah Urmeneta
Global Technology & Solutions
Avanade, Inc.
entlib.support@avanade.com
Feb 10, 2009 at 7:42 PM
Currently no plans.
-- Grigori, EntLib PM