c# - asp.net with oracle connectivity issue -
i trying add parameters using oracle database using following code :
for (int = 1; <= count; i++) { var parametername = ":ref_cur" + i; dbparameter parameter = acidaes.data.dbhelper.createrefcursorparameter( parametername, parameterdirection.output); command.parameters.add(parameter); }
following crash occurs while adding parameters
[a]oracle.dataaccess.client.oracleparameter cannot cast [b]oracle.dataaccess.client.oracleparameter. type originates 'oracle.dataaccess, version=2.112.2.0, culture=neutral, publickeytoken=89b483f429c47342' in context 'default' @ location 'c:\windows\assembly\gac_32\oracle.dataaccess\2.112.2.0__89b483f429c47342\oracle.dataaccess.dll'. type b originates 'oracle.dataaccess, version=4.112.2.0, culture=neutral, publickeytoken=89b483f429c47342' in context 'default' @ location 'c:\windows\microsoft.net\assembly\gac_32\oracle.dataaccess\v4.0_4.112.2.0__89b483f429c47342\oracle.dataaccess.dll'.
didn't find way resolve crash.
you need check references, there mismatch in versions looking at:
dbparameter parameter = acidaes.data.dbhelper.createrefcursorparameter(parametername, parameterdirection.output);
dbparameter
referenced in code not of same type (version in case) being returned dbhelper
class. need update these 2 projects refer same version of oracle.dataaccess
.
Comments
Post a Comment