Search found 23 matches

by cew3
Tue 11 Dec 2018 13:38
Forum: dotConnect for Oracle
Topic: How to set ClientInfo using Entity Framework?
Replies: 4
Views: 2379

Re: How to set ClientInfo using Entity Framework?

Hello?
Anybody out there?
by cew3
Fri 30 Nov 2018 10:21
Forum: dotConnect for Oracle
Topic: How to set ClientInfo using Entity Framework?
Replies: 4
Views: 2379

Re: How to set ClientInfo using Entity Framework?

Shalex wrote: Thu 29 Nov 2018 20:03 There is the ClientId parameter in connection string: https://www.devart.com/dotconnect/oracl ... tring.html. Is that what you need?
You're right. There is a parameter ClientId. But as described in:
https://www.devart.com/dotconnect/oracl ... mbers.html
  • ClientId:
    This property specifies the client identifier for the connection. It helps to make audition of the client connections and gives an opportunity to distinguish between the applications connecting to.
  • ClientInfo:
    Gets or sets the client information for the connection.
there is also a parameter ClientInfo I have to set using Entity Framework.

Best regards,
cew3
by cew3
Tue 27 Nov 2018 12:35
Forum: dotConnect for Oracle
Topic: How to set ClientInfo using Entity Framework?
Replies: 4
Views: 2379

How to set ClientInfo using Entity Framework?

Hi there!

How do I set the ClientInfo using EF as I could do using an OracleConnection?
Could it be set in the connection string?

Best regards,
cew3
by cew3
Tue 17 Jan 2017 10:05
Forum: dotConnect for Oracle
Topic: String.empty problem - please help!
Replies: 12
Views: 2145

Re: String.empty problem - please help!

It works, thank you!

Best regards,
cew3
by cew3
Tue 13 Dec 2016 09:31
Forum: dotConnect for Oracle
Topic: String.empty problem - please help!
Replies: 12
Views: 2145

Re: String.empty problem - please help!

Hi,

I‘m sorry, but it is not possible to extract a „small“ sample out our application.
As you could have been able to reproduce the first reported bug with just 1 statement in the where-clause, you should be able to reproduce it with an additional string-column.

You wrote that you set the flag:
> contextInstance.ContextOptions.UseCSharpNullComparisonBehavior

Are you sure you got the right version to check?

I set the following flags:

Code: Select all

var queryOptions = OracleEntityProviderConfig.Instance.QueryOptions;
queryOptions.UseCSharpNullComparisonBehavior = true;
queryOptions.CaseInsensitiveLike = true;
queryOptions.CaseInsensitiveComparison = true;

OracleEntityProviderServices.HandleNullStringsAsEmptyStrings = true;
Loaded Modules:

Code: Select all

Devart.Data.dll (5.00.1572.0)
Devart.Data.Oracle.dll (9.01.148.0)
Devart.Data.Oracle.Entity.EF4.dll (9.01.148.0)
Best regards!
by cew3
Thu 01 Dec 2016 12:27
Forum: dotConnect for Oracle
Topic: String.empty problem - please help!
Replies: 12
Views: 2145

Re: String.empty problem - please help!

Hi there,

the problem is still unsolved.
If the query contains two statesments within the where-clause, it does not work.

The following query:

Code: Select all

name = “foo“;
id = ““;

var query = from c in db.myTable
            where c.Name == name && c.ID != id
            select c.ID;

ends in

Code: Select all

SELECT 
"Extent1".ID
FROM "myTable" "Extent1"
WHERE ((((UPPER("Extent1"."Name")) = (UPPER(:p__linq__0))) AND ( NOT (("Extent1"."Name" IS NULL) OR (:p__linq__0 IS NULL)))) OR (("Extent1"."Name" IS NULL) AND (:p__linq__0 IS NULL))) 
AND ((UPPER("Extent1".ID)) <> (UPPER(:p__linq__1)))
But it should be:

Code: Select all

SELECT 
"Extent1".ID
FROM "myTable" "Extent1"
WHERE ((((UPPER("Extent1"."Name")) = (UPPER(:p__linq__0))) AND ( NOT (("Extent1"."Name" IS NULL) OR (:p__linq__0 IS NULL)))) OR (("Extent1"."Name" IS NULL) AND (:p__linq__0 IS NULL)))
AND NOT ((((UPPER("Extent1".ID)) = (UPPER(:p__linq__0))) AND ( NOT (("Extent1".ID IS NULL) OR (:p__linq__0 IS NULL)))) OR (("Extent1".ID IS NULL) AND (:p__linq__0 IS NULL)))
As you can see, the ID-field is not handled the right way in your generated query.

Please have a look at this as soon as possible.
Thanx!
by cew3
Mon 14 Nov 2016 06:16
Forum: dotConnect for Oracle
Topic: String.empty problem - please help!
Replies: 12
Views: 2145

Re: String.empty problem - please help!

Hi Pinturiccio,

how is it going? When do you think we will get a fix for this problem?
We had to stop delivering our application until this issue is resolved.
by cew3
Wed 09 Nov 2016 12:17
Forum: dotConnect for Oracle
Topic: String.empty problem - please help!
Replies: 12
Views: 2145

Re: String.empty problem - please help!

Hi Pinturiccio,
you can reproduce the problem by just using an existing database.

Add an additional column like this:

Code: Select all

"MyField" NVARCHAR2(400) DEFAULT '' 
Enter data to this column for some records.
Now try the linq query in you test application:

Code: Select all

var test = "";
var query = yourDB.YourTable
                   .Where(p => p.MyField != test)
                   .Select(p => p.ID);
You won't get the records having data in MyField.
by cew3
Tue 08 Nov 2016 15:38
Forum: dotConnect for Oracle
Topic: String.empty problem - please help!
Replies: 12
Views: 2145

String.empty problem - please help!

Hi there,

we currently use version 8.4.313 with .Net-Framework 4 and have a very strange problem that has to be solved:

Code: Select all

var query = db.MyTable
                   .Where(p => p.MyField != test)
                   .Select(p => p.ID);
results in a query like:

Code: Select all

SELECT 
"Extent1".ID
FROM "MyTable" "Extent1"
WHERE  NOT (((UPPER("Extent1"."MyField")) = (UPPER(:p__linq__0))) OR (("Extent1"."MyField" IS NULL) AND (:p__linq__0 IS NULL)))
This query works well but fails in case of

Code: Select all

var test = "";
In this case it allways returns null!

The query

Code: Select all

var query = db.MyTable
                   .Where(p => p.MyField != "")
                   .Select(p => p.ID);
results in

Code: Select all

SELECT 
"Extent1".ID
FROM "MyTable" "Extent1"
WHERE "Extent1"."MyField " IS NOT NULL
which returns the right result.

What has to be done to trigger the provider to create the right query in case of the parameters value is string.empty? (UseCSharpNullComparisonBehavior is alreday set to true)
I can't change ALL queries in our application and add an if (value == "") or something like that ...

Does the current version (9.x) of dotConnect for Oracle solve this problem?

Best regards!
by cew3
Tue 14 Jan 2014 07:33
Forum: dotConnect for Oracle
Topic: LinqToEntity-Query depends on provider???
Replies: 9
Views: 1544

Re: LinqToEntity-Query depends on provider???

Hi Shalex,

you can stop investigations for this topic. We'll use workarounds to fix the problem.

Other providers also don't support the requested functionality.
It's a bug in design caused by Microsoft. It's up to them to fix that problem by extending the set of native methods for L2E which have to be implemented by the providers for other DBs. Everything else breaks the software architecture.

So let me thank you for your work and the will to solve my problem.

Best regards
cew3
by cew3
Mon 13 Jan 2014 12:49
Forum: dotConnect for Oracle
Topic: LinqToEntity-Query depends on provider???
Replies: 9
Views: 1544

Re: LinqToEntity-Query depends on provider???

Hi Shalex,

1) Currently we have to get it to work with EF 4.0
2) Used SqlFunctions:
- StringConvert
- DataLength

Best regards
cew3
by cew3
Fri 10 Jan 2014 12:16
Forum: dotConnect for Oracle
Topic: LinqToEntity-Query depends on provider???
Replies: 9
Views: 1544

Re: LinqToEntity-Query depends on provider???

Hi Shalex,
Shalex wrote:You started to use provider dependant methods in layers on top of the DAL when employed System.Data.Objects.SqlClient.SqlFunctions in your code.
You're right. And because of this, I want to call the desired methods from a class, that is db system independant. Microsoft does not provide such a class. So your provider should parse the expression tree of the query and map the called methods to your own methods, provided in Devart.Data.Oracle.Entity.OracleFunctions.

I don't see another way to get rid of the db dependance. Do you?

Best regards,
cew3
by cew3
Thu 09 Jan 2014 10:08
Forum: dotConnect for Oracle
Topic: LinqToEntity-Query depends on provider???
Replies: 9
Views: 1544

LinqToEntity-Query depends on provider???

Hi there,

I have a big problem. For accessing data we use the Entity Framework which I thought it works like a DAL. Because of the abstraction it should be invisible for the layers using the EF which database system and provider is used for holding and accessing data.

After running into problems which linq queries trying to cast an int to string or getting the length of a lob column directly in the query, if found some hints targeting to SqlFunction methods. I used them (on MSSQL) and it worked.

No, switching from MSSQL to Oracle (our software supports both systems), the queries fail.
In http://forums.devart.com/viewtopic.php? ... ing#p65791 I found the hint to use Devart.Data.Oracle.Entity.OracleFunctions.

I can't believe it! I have to use provider dependant methods in layers on top of the DAL?
That can't be the solution! The provider itself has to convert queries the db can execute.

How can this problem be solved?

Best regards,
cew3
by cew3
Thu 14 Apr 2011 12:58
Forum: dotConnect for Oracle
Topic: Problem with Trigger in TransactionScope
Replies: 16
Views: 5496

I tried using the 6.10.135.0 with the same result.
It does not work.

Any ideas?

Best
cew3
by cew3
Thu 14 Apr 2011 07:51
Forum: dotConnect for Oracle
Topic: Problem with Trigger in TransactionScope
Replies: 16
Views: 5496

I downloaded the trial, installed the package in a VM and copied the needed files
  • Devart.data.dll -- [5.0.236, 06.04.2011]
    Devart.Data.Oracle.dll -- [6.10.135.0, 06.04.2011]
    Devart.Data.Oracle.Entity.dll -- [6.10.135.0, 06.04.2011]
to my project.

Now i get the error:
"License not found. Please view "Licensing" topic in dotConnect for Oracle documentation for details or contact Devart technical support."


Best regards,
cew