Search found 9 matches

by meetkarthik
Tue 15 Feb 2011 18:01
Forum: dotConnect for Oracle
Topic: TransactionScope + Pooling
Replies: 15
Views: 4940

Audrey,
I downloaded the latest version (103) of dotconnect and i still have problems with the transaction.

I am connecting to oracle in Direct mode and i am using transaction scope 'RequiredNew'. I have two functions 'Add' and 'Update'. I add an entity in the first function and update the entity in the second.

public entity Add();
public entity update(entity);

Both functions use seperate transaction scopes. But when i do a performace test against this, the entity added in the first call is not getting committed. As a result of this, the update call fails (coz its not able to find the added entity).

The exact error message is "EXCEPTION (LEVEL 1): Devart.Data.Linq.ChangeConflictException
EXCEPTION OUTPUT: 1 of 4 updates failed.".

I have been having this issue since 5.70.190.0. This seems to work fine in 5.70.180.0.
by meetkarthik
Mon 22 Nov 2010 23:24
Forum: dotConnect for Oracle
Topic: Multi Threading Issues
Replies: 1
Views: 950

Multi Threading Issues

We use dotConnect for Oracle 5.70.180 as part of a WCF service, and we are seeing some incorrect results when sending simultaneous requests to the service from multiple clients. Each request is served by several DataContext instances that are created specifically for this request and are not shared with any other requests. When using only one client everything works perfectly but even as few as 2 clients start causing issues. For example, when retrieving data from the db some dependent entities (specified through DataLoadOptions.LoadWith) are not retrieved at all (according to dbMonitor no selects are generated for them). This happens randomly for approx. 30-40% requests. Are you aware of any multi-threading issues with the simultaneous use of multiple DataContext instances? Is there any static data that they all share that is not thread-safe?
by meetkarthik
Mon 27 Sep 2010 03:05
Forum: dotConnect for Oracle
Topic: Linqconnect - One to One Mapping Issues
Replies: 2
Views: 1233

Linqconnect - One to One Mapping Issues

Consider the following two tables , Student and Student_GPA.

Code: Select all

CREATE TABLE "STUDENT" 
   (	"ID" NUMBER NOT NULL ENABLE, 
	"NAME" VARCHAR2(20), 
	 CONSTRAINT "STUDENT_PK" PRIMARY KEY ("ID") ENABLE
   ) TABLESPACE "DATA" ;

CREATE TABLE "STUDENT_GPA" 
	(	"STUDENT_ID" NUMBER NOT NULL ENABLE, 
	"GPA" NUMBER NOT NULL ENABLE, 
	 CONSTRAINT "STUDENT_GPA_PK" PRIMARY KEY ("STUDENT_ID") ENABLE
	) TABLESPACE "DATA" ;

ALTER TABLE "STUDENT_GPA" ADD CONSTRAINT "STUDENT_GPA_STUDENT_FK1" FOREIGN KEY ("STUDENT_ID")
	  REFERENCES "STUDENT" ("ID") ENABLE;

The table Student has a primary key 'ID'. In the table Student_GPA , the Student_Id column is the primary key and it also references the ID in the student table.

When i try to generate the model ,
1. It sets the relationship between Student and Student_Gpa as 'one to many'. Shouldn't it be one to one ?

2. I tried to manually set this as 'one to one' and when i checked out the relationship , it was correctly displaying 'STUDENT' as the parent table and 'STUDENT_GPA' as the child table. But when i try to do my inserts , its trying to insert into the student_gpa first and this results in an exception as the 'STUDENT' record has not been inserted yet. Shouldn't it insert into the parent table first and then fire the inserts for the child tables ?

Please let me know if i am doing anything wrong or if these are known bugs ?
by meetkarthik
Wed 22 Sep 2010 20:42
Forum: dotConnect for Oracle
Topic: Custom Key Generator
Replies: 2
Views: 1284

The sample worked great.. Thanks !
by meetkarthik
Wed 22 Sep 2010 20:40
Forum: dotConnect for Oracle
Topic: Column Mapping - LinqConnect
Replies: 2
Views: 1230

Thanks for clarifying..
by meetkarthik
Tue 21 Sep 2010 19:16
Forum: dotConnect for Oracle
Topic: Column Mapping - LinqConnect
Replies: 2
Views: 1230

Column Mapping - LinqConnect

When i add a table with the following definition

CREATE TABLE "TEST"
( "ID" NUMBER(19) NOT NULL ENABLE,
CONSTRAINT "TEST_PK" PRIMARY KEY ("ID")
)

in the model , the column ID is automatically mapped as 'Decimal' instead of 'Int64'

This seems to be working fine in Entity framework. The problem is happening only with LinqConnect.
by meetkarthik
Mon 20 Sep 2010 22:15
Forum: dotConnect for Oracle
Topic: Custom Key Generator
Replies: 2
Views: 1284

Custom Key Generator

Hi,
I have a stored proc which takes as input the 'table name' and returns the next id (primary key) for that table. I use this to populate the id's before inserting.

I need to call this stored proc before i insert a row to the table. I am hoping i can do this by using a custom class that implements the IKeyGenerator interface and by using this class in the CustomGenerator attribute for the column property.

ex:
[Devart.Data.Linq.Mapping.KeyGenerator.CustomGenerator(ClassName = "CustomIdGenerator", Parameters = new object[] {"Order"})]

Is there a sample for implementing custom id generators based on which i can do this ? I looked up at the documentation and it has very minimal info on using custom id generators.
by meetkarthik
Fri 17 Sep 2010 21:43
Forum: dotConnect for Oracle
Topic: Connecting to a db when using Oracle 11g 64 bit client
Replies: 6
Views: 4524

Thanks. I found the root cause of this issue.

Visual Studio 2010 is right now available only in 32bit flavor. As a result of this, during design time, when i am trying to create the model , i am not able to connect the database using the TNS name.

And when i launch 'Entity Developer' directly from Devart dotConnect for Oracle -> Entity Manager , it always launches in 32bit mode.

Is there a fix for this in the v6 beta ?
by meetkarthik
Thu 16 Sep 2010 20:23
Forum: dotConnect for Oracle
Topic: Connecting to a db when using Oracle 11g 64 bit client
Replies: 6
Views: 4524

Connecting to a db when using Oracle 11g 64 bit client

Hi,
I have a oracle 11g database and i am connecting using the 64bit client. When i try to create a LinqConnect/EF model and try to create the model from the database, i am not able to connect to any of the databases mentioned in the TNS. The only way i can overcome this is by using the 'direct' connection option.

But when i uninstalled the 64bit version and install the 32bit client, it works fine.

From the code, when i try to pass a connection string with the usual UserId-Password-Data Source format, i get the following exception. The problem is once again resolved if i use the 'direct' connection string.

"Unable to load C:\Oracle\Product\11.2.0\client-1\bin\oci.dll. Please check the 32x version of Oracle client with 32x application".

Am i doing anything wrong ?