I am working on an application that uses the Entity Framework for most of its database access but occasionally it needs to run a random SQL query - for this I am using Enterprise Library.
I have each piece working correctly by itself with the devArt libraries but if I run an Enterprise Library ExecuteDataSet() after a LINQ to Entity query I get the following error:
Can not load Oracle client. Check your PATH environment variable and registry settings.
I am Closing the connection and calling Dispose on my Entity Context before the Enterprise Library call but that makes no difference.
If I make the Enterprise Library call first and then the Entity Query everything works perfectly - except that I can no longer make EntLib calls.
My guess is that the EF call is blocking the EntLib call but I don't know how to fix this.
Can't use Entity Framework and Enterprise Library together
We cannot reproduce the mentioned issue in our environment with the 5.70.180 version of dotConnect for Oracle and Enterprise Library v 5.0. We have sent you a test project. Please modify it and send it to us so that we can reproduce the issue in our environment. If you didn't receive our e-mail, please check your spam filter and send me (alexsh at devart*com) your another e-mail address that will not reject attachments.
Please note:
1) I were using identical connection strings for Entity Framework and Enterprise Library;
2) my Oracle Client was 11.1, and what is yours?
3) it is not a good practise to use several Oracle Clients in the same application: http://www.devart.com/forums/viewtopic.php?t=17218;
4) try executing this code to find out what exactly your application is missing: http://www.devart.com/forums/viewtopic.php?t=15458.
Please note:
1) I were using identical connection strings for Entity Framework and Enterprise Library;
2) my Oracle Client was 11.1, and what is yours?
3) it is not a good practise to use several Oracle Clients in the same application: http://www.devart.com/forums/viewtopic.php?t=17218;
4) try executing this code to find out what exactly your application is missing: http://www.devart.com/forums/viewtopic.php?t=15458.
Thank you for the test project - it helped me pinpoint what was wrong.
In my connection string for the Enterprise Library I did not have the "Home=ORACLIENT10g" attribute.
I don't remember ever seeing/using this in the past but I did notice it is part of the Entity Framework connection strings generated by the EF wizard.
And now it is in my Enterprise Library connection strings.
Also, the "HOME" attribute is not in your Enterprise Library DataAccessQuickStart example - maybe you could add it in future releases.
Anyhow, it works. Thanks again!
In my connection string for the Enterprise Library I did not have the "Home=ORACLIENT10g" attribute.
I don't remember ever seeing/using this in the past but I did notice it is part of the Entity Framework connection strings generated by the EF wizard.
And now it is in my Enterprise Library connection strings.
Also, the "HOME" attribute is not in your Enterprise Library DataAccessQuickStart example - maybe you could add it in future releases.
Anyhow, it works. Thanks again!