Nhibernate 3.2 doesnt work related the Parameter names

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
flutos
Posts: 31
Joined: Tue 06 Oct 2009 21:55

Nhibernate 3.2 doesnt work related the Parameter names

Post by flutos » Thu 04 Aug 2011 19:01

Nhibernate 3.2 was just released and I was using it and found it doesnt work with the devart oracle driver anymore and I found it was related to the ParameterName field in the parameter. in a sqlstatement you will have paramters defined with a ":" , ie :P0 and if you create a new devart oracle parameter and pass in the name as ":P0" , then if you read it back it returns "p0" so it strips off the ":" . Unfortuantly this can cause some problem with nhibernate because it needs to look up parameters in the parameters collection by name and its looking for ":P0" because thats what it gave you when it created it but you are returning "P0" so it never finds the parameter and you end up with and error saying "not all paremters defined".

I wasnt sure who to blame for this but since the sqlserver pametername returns its prefix, ie "@p0" shouldnt you return the oracle prefix too ":p0" ? Also, have you noticed any problems with your driver and nhibernate 3.2?

let me know anyhow.

thanks

scott

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Mon 08 Aug 2011 09:51

A similar issue was discussed at http://www.devart.com/forums/viewtopic.php?t=21508. Please try OracleUtils.OracleClientCompatible = true; in the OCI mode (via Oracle client). We are investigating the issue with OracleUtils.OracleClientCompatible = true; in the Direct mode.

flutos
Posts: 31
Joined: Tue 06 Oct 2009 21:55

Post by flutos » Mon 08 Aug 2011 14:48

adding OracleUtils.OracleClientCompatible = true;
generates this error:
ORA-01036 illegal variable name/number

so this doesnt seem to work either. Is there something I can do to get rid of this error?

thanks

scott

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Tue 09 Aug 2011 16:44

We can reproduce the ORA-01036 error only in the Direct mode. We will notify you when this issue is fixed.

As a workaround, please use the OCI mode ("Direct=false;"). If you are getting this error in the OCI mode, try to localize the issue by monitoring the SQL statement that is send to server.
Download link: http://www.devart.com/dbmonitor/dbmon3.exe
Documentation: http://www.devart.com/dotconnect/oracle ... nitor.html

flutos
Posts: 31
Joined: Tue 06 Oct 2009 21:55

Post by flutos » Tue 09 Aug 2011 18:16

we actually need direct mode=true since we are running on mono so do you know if it would be fixed in the next month or 2?

thanks

scott

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 10 Aug 2011 07:36

We plan to fix the issue this month.

flutos
Posts: 31
Joined: Tue 06 Oct 2009 21:55

Post by flutos » Wed 10 Aug 2011 11:39

ok , that will work for us, we will just wait for the fix.

thanks

scott

JomKippur
Posts: 17
Joined: Wed 31 Aug 2011 15:46

Post by JomKippur » Wed 31 Aug 2011 15:55

How is the progress of fixing this bug? :)

flutos
Posts: 31
Joined: Tue 06 Oct 2009 21:55

Post by flutos » Wed 31 Aug 2011 16:16

I dont think its been done yet but technically there is still 1 day left in the month. ;)

JomKippur
Posts: 17
Joined: Wed 31 Aug 2011 15:46

Post by JomKippur » Wed 31 Aug 2011 19:36

;) You are right ... still one day left ;)

I'm working on CoreLab 4.75 and this controls have the same problem with Nh 3.2 - it's obvious. But I have one more problem (version 4.70 hadn't this problem) i call oracle pl-sql functions returning varchar and the results are always "some two strnge signs". Guys do you know this problem?
I have a question: do I need to buy another license to use newest dotConnect controls (released after 1 of september :) ) ?

Greeting
P.

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 01 Sep 2011 15:07

The bug with parameter names when OracleUtils.OracleClientCompatible=true in Direct mode is fixed. We will post here when the next build of dotConnect for Oracle is available for download. We plan to release it next week.
JomKippur wrote:I'm working on CoreLab 4.75 and this controls have the same problem with Nh 3.2 - it's obvious. But I have one more problem (version 4.70 hadn't this problem) i call oracle pl-sql functions returning varchar and the results are always "some two strnge signs". Guys do you know this problem?
Please try the latest (6.30.202) version of dotConnect for Oracle (trial version). If the problem persists with this version as well, please send us a small test project with the corresponding DDL/DML script to reproduce the issue in our environment.
JomKippur wrote:I have a question: do I need to buy another license to use newest dotConnect controls (released after 1 of september Smile ) ?
Seems like you have to renew your subcription (http://www.devart.com/dotconnect/oracle ... scriptions) to get access to the latest builds. Please contact our Sales department (sales at devart*com) to check the status of your subscription.

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 07 Sep 2011 12:03

New version of dotConnect for Oracle 6.50 is released!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with valid subscription only): http://secure.devart.com/ .
For more information, please refer to http://www.devart.com/forums/viewtopic.php?t=21942 .

JomKippur
Posts: 17
Joined: Wed 31 Aug 2011 15:46

Post by JomKippur » Tue 20 Sep 2011 15:23

After this patch I don't have a problem in Nh3.2 but I have this problem (ORA-01036 illegal variable name/number)
using simple Ado query with parameters:

insert into TestData(a, b) values(:a, :b)

when I set: OracleUtils.OracleClientCompatible = false;

simple Ado query is ok but Nh 3.2 is wrong ...

Why I have to use this setting: OracleUtils.OracleClientCompatible =true;?

thanks
JK

JomKippur
Posts: 17
Joined: Wed 31 Aug 2011 15:46

Post by JomKippur » Wed 21 Sep 2011 09:37

To sum up I want to use Nh 3.2 without this trick:

OracleUtils.OracleClientCompatible = true;

because OracleUtils.OracleClientCompatible = true; cause my Ado Daos not working.

I renewed my subcription in order to get working version for Nh 3.2.
But it doesn' work :(.

...

greetings
JK

Shalex
Site Admin
Posts: 8245
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Thu 22 Sep 2011 14:21

JomKippur, we have answered you at http://www.devart.com/forums/viewtopic.php?t=22037.

Post Reply