Search found 10 matches

by Bonsahib
Wed 13 Feb 2013 09:29
Forum: dotConnect for Oracle
Topic: String in Clob column is changed
Replies: 3
Views: 1337

Re: String in Clob column is changed

Hi Shalex,

thank you for your answer. I have sent all our collected information through the contact formular. Here the information regarding your question:
1. We tried out with Unicode=true, Unicode=false and without the Unicode-attribute. We observed the same behavior each time.
2. We use the direct connection mode. As far as I know we haven't tried out to connect via OCI. The Oracle client version is Oracle - Ora11203, NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252
3. Connectionstring: Server=localhost;Direct=True;Sid=SID;User Id=xxx;password=xxx;Persist Security Info=True
4. We tried it on different databases (located on different machines) and had the effect on both databases. If we access the same database from a different machine, everything works fine. NLS_Language is AMERICAN, NLS_CHARACTERSET is AL32UTF8, NLS_NCHAR_CHARACTERSET is AL16UTF16
5. Location: Switzerland, Language for non-Unicode program: German(Switzerland)

"Unfortunately" (good for us :D) we can't reproduce the issue anymore. We got a new image for the target system and now everything works fine. So there is no urgency for this anymore. I hope the provided information can help you find the problem. The screenshots should be very helpful.

Best regards,
Andi
by Bonsahib
Thu 07 Feb 2013 08:25
Forum: dotConnect for Oracle
Topic: String in Clob column is changed
Replies: 3
Views: 1337

String in Clob column is changed

Hi there,

we're currently a very strange issue on some few machines. Unfortunatelly on one of our productive target systems. That's why we need help.

The target system has Windows 7 Enterprise x64 installed. It has a complete fresh setup with Devart DotConnect 7.2.104.0 and connects to a remote Oracle Database 11g Release 11.2.0.3.0 - 64bit.

We try to write a simple xml string into a column of type Clob through the Entity Framework. The string "leaves" our application as a valid UTF-8 string and "arrives" in the database as a modified string containing a "\0" after every character. So passing in something like "<LisSettings ..." results in "<\0L\0i\0s\0S\0e\0t\0t\0i\0n\0g\0s\0 ..."
Having those values in the database causes lots of problems in handling this string.

Unfortunatelly I won't be able to provide a sample project since we only have two systems where this problem occurs. I have documented as much as possible with screenshots, using DBMonitor to track what's going into the database. If you provide me an email address I will send those images to you.

So here's what we tried out and observed:
- The machine where this behavior occurs was setup 4 weeks ago and only Devart dotConnect 7.2.104 was installed ("only" stands for "no other versions of Devart DotConnect).
- After we uninstalled DotConnect and installed version 6.5.244 the problem was not reproducible anymore.
- But we need version 7.2.104 since we have some other issues otherwise.
- We tracked the application -> database activity with the dbMonitor and have taken screenshots of all important information.
- DbMonitor shows, that the "InValue" of the string parameter for the "Clob" column is valid (or at least looks valid) and the "OutValue" is invalid, containing "\0" after each character.

Is there a setting that we can change in order to make it work correctly? Do you have an idea what the problem could be caused by?

If you need any additional information, please let me know.

Andi
by Bonsahib
Mon 24 Oct 2011 15:17
Forum: dotConnect for Oracle
Topic: Latest version causes "ORA-12704: character set mismatch"
Replies: 14
Views: 16880

Hi Shalex,

thanks for the new release. Unfortunately it's still not working for us. The test project I sent to you now works perfectly fine.
So I tried to change the Unicode attribute as you mentioned in out productive code but that lead to another exception:
"The specified value is not an instance of type 'Edm.Int64'
Parameter name: value"

So I investigated a little further and came up with the suspicion that 0..1 to 0..1 relations dont work anymore. And indeed that's the problem. When you change the Main method of my test project to:

Code: Select all

static void Main(string[] args)
        {
            using (DomainStorage storage = new DomainStorage())
            {
                storage.Person.AddObject(new Employee { JobDescription = "Boss", Foreigner = new Diplomat() });
                storage.Person.AddObject(new Employee { JobDescription = "Nerd", Foreigner = new Diplomat() });
                storage.Person.AddObject(new Employee { JobDescription = "Tester" });
                storage.SaveChanges();
            }

            using (DomainStorage storage = new DomainStorage())
            {
                foreach (Citizen inventoryItem in storage.Person.OfType())
                {
                    storage.Person.DeleteObject(inventoryItem);
                }
                storage.SaveChanges();
            }
        }
it will fail with the above exception. i also tried to set "Unicode" to false. Didn't change anything.

So basically there is still the character missmatch problem and now the 0..1 to 0..1 relations are not resolved properly anymore.

Andi[/code]
by Bonsahib
Tue 11 Oct 2011 05:23
Forum: dotConnect for Oracle
Topic: Latest version causes "ORA-12704: character set mismatch"
Replies: 14
Views: 16880

Hi Shalex,

thank you for your help. We will use your workaround and include your latest release as soon as it is available.

Andi
by Bonsahib
Tue 27 Sep 2011 06:07
Forum: dotConnect for Oracle
Topic: Latest version causes "ORA-12704: character set mismatch"
Replies: 14
Views: 16880

Latest version causes "ORA-12704: character set mismatch"

Hi there,

we're using the entity framework 4.1 and devart with oracle.
Recently we tried to update our devart provider from version 6.10.126 to 6.5.
After that update we receive the "ORA-12704: character set mismatch" exception in some situations.
Our datamodel is a little more complex and contains at maximum a three level deep inheritance. I tried to reduce its complexity as far as possible but it's still too complex to explain in detail. I can send you my sample project which causes that bug.
The bug occurs, when I execute the following statement:

Code: Select all

var foreigners = (from s in storage.Person.OfType() select s).ToList();
That statement results in the following sql statement:

Code: Select all

SELECT 
1 AS C1, 
CASE WHEN (("Project1".C1 = 1) AND ("Project1".C1 IS NOT NULL)) AND ( NOT (("UnionAll2".C3 = 1) AND ("UnionAll2".C3 IS NOT NULL))) THEN '0X0X0X' WHEN ("UnionAll2".C2 = 1) AND ("UnionAll2".C2 IS NOT NULL) THEN '0X1X' WHEN ("UnionAll2".C3 = 1) AND ("UnionAll2".C3 IS NOT NULL) THEN '0X0X0X0X' ELSE '0X2X0X' END AS C2, 
"Extent1".DBKEY AS DBKEY, 
CASE WHEN (("Project1".C1 = 1) AND ("Project1".C1 IS NOT NULL)) AND ( NOT (("UnionAll2".C3 = 1) AND ("UnionAll2".C3 IS NOT NULL))) THEN "Project1".CON_JOBDESCRIPTION WHEN ("UnionAll2".C2 = 1) AND ("UnionAll2".C2 IS NOT NULL) THEN TO_NCHAR(NULL) WHEN ("UnionAll2".C3 = 1) AND ("UnionAll2".C3 IS NOT NULL) THEN "Project1".CON_JOBDESCRIPTION END AS C3, 
CASE WHEN (("Project1".C1 = 1) AND ("Project1".C1 IS NOT NULL)) AND ( NOT (("UnionAll2".C3 = 1) AND ("UnionAll2".C3 IS NOT NULL))) THEN TO_NUMBER(NULL) WHEN ("UnionAll2".C2 = 1) AND ("UnionAll2".C2 IS NOT NULL) THEN TO_NUMBER(NULL) WHEN ("UnionAll2".C3 = 1) AND ("UnionAll2".C3 IS NOT NULL) THEN TO_NUMBER(NULL) ELSE "UnionAll2".C4 END AS C4
FROM   DOMAINOBJECTBASE "Extent1"
LEFT OUTER JOIN  (SELECT 
	"Extent2".CON_JOBDESCRIPTION AS CON_JOBDESCRIPTION, 
	"Extent2".DBKEY AS DBKEY, 
	1 AS C1
	FROM CONTAINER "Extent2" ) "Project1" ON "Extent1".DBKEY = "Project1".DBKEY
LEFT OUTER JOIN  (SELECT 
	"UnionAll1".DBKEY AS C1, 
	"UnionAll1".C1 AS C2, 
	"UnionAll1".C2 AS C3, 
	"UnionAll1".SPC_ASS_CONTAINER AS C4
	FROM  (SELECT 
		"Extent3".DBKEY AS DBKEY, 
		0 AS C1, 
		0 AS C2, 
		"Extent3".SPC_ASS_CONTAINER AS SPC_ASS_CONTAINER
		FROM SPECIMEN "Extent3"
	UNION ALL
		SELECT 
		"Extent4".DBKEY AS DBKEY, 
		0 AS C1, 
		1 AS C2, 
		TO_NUMBER(NULL) AS C3
		FROM REAGENTCONTAINER "Extent4") "UnionAll1"
UNION ALL
	SELECT 
	"Extent5".DBKEY AS DBKEY, 
	1 AS C1, 
	0 AS C2, 
	TO_NUMBER(NULL) AS C3
	FROM KIT "Extent5") "UnionAll2" ON "Extent1".DBKEY = "UnionAll2".C1
WHERE CASE WHEN (("Project1".C1 = 1) AND ("Project1".C1 IS NOT NULL)) AND ( NOT (("UnionAll2".C3 = 1) AND ("UnionAll2".C3 IS NOT NULL))) THEN '0X0X0X' 
WHEN ("UnionAll2".C2 = 1) AND ("UnionAll2".C2 IS NOT NULL) THEN '0X1X' 
WHEN ("UnionAll2".C3 = 1) AND ("UnionAll2".C3 IS NOT NULL) THEN '0X0X0X0X' ELSE '0X2X0X' END LIKE '0X2X%'
The "case when" part in the where clause causes the problem.

If you need any additional information or the sample project, please let me know.

Andi
by Bonsahib
Wed 06 Apr 2011 11:45
Forum: dotConnect for Oracle
Topic: Oracle..data and DBFactoryProvider Deploy issues
Replies: 8
Views: 2059

Hi Avanata,

does your app.config-section look like this?

Code: Select all

...

    
      
      
    
  
...
The remove tag will be ignored if no devart provider is registered yet.

If your app.config looks like that, it should work.
If you work with certain functionality of Devart.Data.Oracle.Entity (e.g. OracleConnection) you also have to add the Devart.Data.Oracle.Entity.dll to your output.

Andi
by Bonsahib
Fri 25 Mar 2011 13:08
Forum: dotConnect for Oracle
Topic: Optimistic concurrency with inheritance in model first
Replies: 7
Views: 1713

Hi Andrey,

I'm impressed how fast you fixed this issue. My first tests look very good. Can't reproduce the problem with your new release. I am going to test more on monday...
Thank you very much for your fast reaction!

Andi

EDIT: All other tests are also running now. Thank you again!
by Bonsahib
Mon 21 Mar 2011 06:45
Forum: dotConnect for Oracle
Topic: Optimistic concurrency with inheritance in model first
Replies: 7
Views: 1713

Hi Andrey,

I modified my base-table-trigger in order to prevent it from beeing fired through the child-table-trigger:

Code: Select all

CREATE OR REPLACE
TRIGGER UPD_MYOBJECTBASE
BEFORE UPDATE OF "COLUMN1", "COLUMN2", ... (all columns except for the row version column) ON "MYOBJECTBASE" FOR EACH ROW
BEGIN
 :NEW."ROWSETVERSION" := :OLD."ROWSETVERSION" + 1;
 END;
But if you get optimistic concurrency working without the child-table-trigger, that would also be great.
Hope to hear soon about it ;)

Andi

EDIT: I tested a little and found out that the EF (randomly) changes the order of update statements. So you are absolutely right, even my modified trigger on the child-table may cause the ROWSETVERSION column to be updated twice within the same transaction. Not good! It's getting a little more tricky...
by Bonsahib
Mon 14 Mar 2011 08:57
Forum: dotConnect for Oracle
Topic: Optimistic concurrency with inheritance in model first
Replies: 7
Views: 1713

Hi and thank you for investigating on this.

I did some further research on this and could condense the problem a little more. Since I guess this problem is a basic problem with inheritance and the EF you can take a look at my last post at the MSDN forum regarding the same issue: http://social.msdn.microsoft.com/Forums ... 7a0c0cd06b

Hope it helps.

Andi
by Bonsahib
Fri 04 Mar 2011 15:25
Forum: dotConnect for Oracle
Topic: Optimistic concurrency with inheritance in model first
Replies: 7
Views: 1713

Optimistic concurrency with inheritance in model first

Hi,

I have to have optimistic concurrency within my data model which inlcudes inheritance. At the moment I get too many concurrency exceptions, especially when I update a property multiple times within the same context.
Here are the steps to reproduce my problem:
Just create a very simple base entity "MyBaseObject" with three properties:
- DBKey (int, primary key, StoreGeneratedPattern = Identity)
- Name (string, allows null)
- RowsetVersion (int64, allows null, StoreGeneratedPattern = Computed, default value = 0, Concurrency Mode = Fixed)

And create an enity "MyObject" deriving from "MyBaseObject" with just one property:
- Content (string, allows null)

I chose "Table per Type" and "File per Entity" in my code generation options and generated the database from my model.
I added this trigger to the generated ddl:

CREATE OR REPLACE TRIGGER UPD_MyObjects
BEFORE UPDATE ON "MyObjects"
FOR EACH ROW
BEGIN
UPDATE "MyObjectBases" SET "RowsetVersion" = "RowsetVersion" + 1 WHERE "DBKey" = :NEW."DBKey";
END UPD_MyObjects;

I know it only handels updates on my "MyObjects"-table. But that's OK for now.

Now I run the following code:

Code: Select all

using (DataEntities entities = new DataEntities()) {
    try {
        MyObject testOrder = new MyObject();
        testOrder.Name = "Hans";
        testOrder.Content = "MyContent";
        entities.MyObjectBases.AddObject(testOrder);
        entities.SaveChanges();

        testOrder.Content = "MyNewContent";
        entities.SaveChanges();

        testOrder.Content = "MyNewExtraContent";
        entities.SaveChanges();
    }
    catch (Exception e) {

    }
}
In my case it always throws an optimistic concurrency exception.
(Btw. I have the same issue within MsSql and the .Net provider. The only way to get MsSql and Entity Framework to not throw the exception is by changing the type of RowsetVersion to timestamp in the database and to binary in my entity model)

Now my questions are:
- Is there a best practise of handling optimistic concurrency in models with inheritance?
- I guess there is no type like the built in MsSql-timestamp in Oracle for handling this concurrency issue, right?
- Any suggestions on how to deal with this?

I am really looking forward to your answers ;)

Andi