Converting over from System.Data.OracleClient to ODP.NETs Oracle.DataAccess.Client
-
The System.Data.OracleClient in .NET is now obsolete (deprecated). So I installed the ODP.NET from Oracle (I have both 4.112.3.0 and 2.112.3. versions of Oracle.DataAccess.dll). When running VS, I see both under the Add References (not really sure of what the difference between version). I am using .NET Framework 4.0 so I included 4.112.3.0 version in the project. Problem is that the Microsoft and .NET framework versions yield different results. For instance the Oracle version won't permit || in the data set (aka SELECT A || B || C || 'x' as Dummy from ...) - have to use Concat(Concat (A, B), C), ... etc to make valid table adapter SQL statement in the ODP.NET version. Additionally, it appears not to function identically so worried about potential errors being introduced in the datasets. Is there any clear article identifying the differences between the two libraries (most articles say just to replace but that is the issue, they are not identical).
-
The System.Data.OracleClient in .NET is now obsolete (deprecated). So I installed the ODP.NET from Oracle (I have both 4.112.3.0 and 2.112.3. versions of Oracle.DataAccess.dll). When running VS, I see both under the Add References (not really sure of what the difference between version). I am using .NET Framework 4.0 so I included 4.112.3.0 version in the project. Problem is that the Microsoft and .NET framework versions yield different results. For instance the Oracle version won't permit || in the data set (aka SELECT A || B || C || 'x' as Dummy from ...) - have to use Concat(Concat (A, B), C), ... etc to make valid table adapter SQL statement in the ODP.NET version. Additionally, it appears not to function identically so worried about potential errors being introduced in the datasets. Is there any clear article identifying the differences between the two libraries (most articles say just to replace but that is the issue, they are not identical).
Dale Haessel wrote:
I have both 4.112.3.0 and 2.112.3. versions of Oracle.DataAccess.dll
The first number in the Oracle ODP version indicates which framework version it's intended for.
Dale Haessel wrote:
For instance the Oracle version won't permit || in the data set (aka SELECT A || B || C || 'x' as Dummy from ...) - have to use Concat(Concat (A, B), C), ... etc to make valid table adapter SQL statement in the ODP.NET version.
I never had that problem, what error message do you get?
Be excellent to each other. And... PARTY ON, DUDES! Abraham Lincoln
-
Dale Haessel wrote:
I have both 4.112.3.0 and 2.112.3. versions of Oracle.DataAccess.dll
The first number in the Oracle ODP version indicates which framework version it's intended for.
Dale Haessel wrote:
For instance the Oracle version won't permit || in the data set (aka SELECT A || B || C || 'x' as Dummy from ...) - have to use Concat(Concat (A, B), C), ... etc to make valid table adapter SQL statement in the ODP.NET version.
I never had that problem, what error message do you get?
Be excellent to each other. And... PARTY ON, DUDES! Abraham Lincoln
Using VS dataset / table adapter design wizard, it gives: The wizard detected the following problems when configuring the TableAdapter: "RCM_MRO_BOM": Details: Generated SELECT Statement Error in SELECT clause: expression near '|'. Missing FROM CLause. Error in SELECT clause: expression near ','. Unable to parse query text. ... Wizard Configuration Text = SELECT BOM_REF_KEY, DESCRIPTION, BOM_REVIEWED, COMMENTS || ' ' as X, 1 as MatchType FROM SAPRCM.RCM_MRO_BOM a
-
Using VS dataset / table adapter design wizard, it gives: The wizard detected the following problems when configuring the TableAdapter: "RCM_MRO_BOM": Details: Generated SELECT Statement Error in SELECT clause: expression near '|'. Missing FROM CLause. Error in SELECT clause: expression near ','. Unable to parse query text. ... Wizard Configuration Text = SELECT BOM_REF_KEY, DESCRIPTION, BOM_REVIEWED, COMMENTS || ' ' as X, 1 as MatchType FROM SAPRCM.RCM_MRO_BOM a
Aha, the design wizard. That sucks big donkey balls if you excuse my expression, and not just when using with Oracle in my opinion. Use Oracle SQL Developer[^] for creating your queries instead, or SQLTools[^] if you want something lightweight and high performance. I personally also prefer DataReaders instead of TableAdapters, but the comparison and reasoning is to much for a forum post on my behalf, read Piebalds post[^] for some reasoning, otherwise I'd recommend Google.
Be excellent to each other. And... PARTY ON, DUDES! Abraham Lincoln