License not valid. DbProviderFactory mode

License not valid. DbProviderFactory mode

Postby Alladin » Thu 16 Aug 2007 15:37

I have CoreLab.Oracle professional installed on my development machine.
My project references CoreLab.Oracle.dll and have corresponding license.licx file. When I create OracleConnection with new(), connection can be opened problemless.

However, another assembly which is used in my project, accesses database in generic way, like this:

DbProviderFactory factory = DbProviderFactories.GetFactory("CoreLab.Oracle");

IDbConnection result = factory.CreateConnection();

conn.ConnectionString = ConnectionString;
conn.Open(); <-- Here I get an exception about Licensing...


How do I make this invalid Licensing exception go away?
Alladin
 
Posts: 149
Joined: Mon 27 Nov 2006 16:18

Postby Alladin » Thu 16 Aug 2007 16:55

Further investigation brought more light on the problem.

Looks like two licensing schemes do not coexist in one application.

If I remove reference to CoreLab.Oracle.dll & license.licx, then DbProviderFactory works.

In other words, you may break functionality of referenced assembly just by including CoreLab.Oracle in your project. What sounds really bad.
Alladin
 
Posts: 149
Joined: Mon 27 Nov 2006 16:18

Postby Alexey » Fri 17 Aug 2007 07:06

Could you send me a sample to alexeyi at crlab dot com?
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Postby Alladin » Fri 17 Aug 2007 18:26

I made a simple project to illustrate the problem, but cannot reproduce the error.

I've checked resources in reflector. The dll that references CoreLab.Oracle.dll has resource named *.dll.licenses with DevExpress & CoreLab types.

What's going wrong in my own project, I don't know. But debugging it, I can easily reproduce the error.

What can I do more to dig this problem deeper?
Alladin
 
Posts: 149
Joined: Mon 27 Nov 2006 16:18

Postby Alexey » Mon 20 Aug 2007 16:21

Is your project complex? Heavy? Could you try to start simplifying it until the problem vanishes?
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for Oracle