Search found 14 matches

by daveoggy
Thu 18 Oct 2012 19:06
Forum: Entity Developer
Topic: Table per Hierarchy Discriminator Property Missing
Replies: 1
Views: 1099

Table per Hierarchy Discriminator Property Missing

I am trying to follow the instructions found here http://www.devart.com/linqconnect/docs/Inheritance.html to create a Table-Per-Hierarchy mapping. However, I am not able to see any of the discriminator settings.

Here is what the instructions show:
Image

And here is what I actually see:
Image

Any help would be appreciated! Thanks
by daveoggy
Wed 02 Mar 2011 13:23
Forum: dotConnect for Oracle
Topic: Bug report - OracleDbType to DbType not consistant
Replies: 6
Views: 2049

Did the planned NumberMappings feature for Entity Developer make it into the 6.x releases?
by daveoggy
Tue 11 Jan 2011 15:39
Forum: dotConnect for Oracle
Topic: Cavenous Performance Difference - Direct and Native
Replies: 3
Views: 1159

Cavenous Performance Difference - Direct and Native

Hi

I am using dotConnect for Oracle in a reporting application. One of the people who designs the reports complained that SQL she can run in < 1 second in SQL developer, takes more than a minute when used in a report.

I timed the datatable being filled by the report and saw that it was taking more than a minute.

I then decided to change the connection type to direct and saw that the fill took < 1 second for the exact same report/code/sql.

I do not believe that such a large discrepency is intended. Hopefully this is just a known issue with the version of dotConnect for Oracle being used: 5.70.170.0
by daveoggy
Wed 03 Nov 2010 15:59
Forum: dotConnect for Oracle
Topic: Bug report - OracleDbType to DbType not consistant
Replies: 6
Views: 2049

Thanks for the workaround! But isn't there still a discrepency?

From the link you gave

"NUMBER(x, 0)..NUMBER(x, 15)* double Double System.Double"

My NUMBER(10, 0) is being identified - incorrectly - as Int64 when building entities and double when using a datareader.
by daveoggy
Mon 01 Nov 2010 18:31
Forum: dotConnect for Oracle
Topic: Bug report - OracleDbType to DbType not consistant
Replies: 6
Views: 2049

Bug report - OracleDbType to DbType not consistant

I have a column in my table defined as:

Code: Select all

"TREE_LEVEL"      NUMBER(10,0) DEFAULT 1
As far as I can tell NUMBER should map to DbType Int64.

When I create an entity model containing this table, the entity does indeed have a TREE_LEVEL property with of type Int64.

When I manually fetch the data using an OracleDataReader the DbType of the column is double.

I can provide code samples if reproducing this is a problem.
by daveoggy
Fri 23 Jul 2010 14:52
Forum: Entity Framework support
Topic: Linq to Entity and Dictionary
Replies: 4
Views: 3668

Thanks AndreyR I can accept that.

What I'm doing doesn't seem to be too unusual a situation though. How would you suggest I get the entity frame work to handle this situation?
by daveoggy
Fri 16 Jul 2010 16:43
Forum: dotConnect for Oracle
Topic: Problem With CreateQuery<>
Replies: 1
Views: 2186

Problem With CreateQuery<>

I don't seem to be able to use QueryCreate. I have the following code:

Code: Select all

                using (Entities ent = new Entities())
                {
                    String sql = string.Format(@"SELECT * FROM tm_fnet");

                    var results = ent.CreateQuery(sql);

                    foreach (var row in results)
                    {
                        RTTrace.WriteLine(this.TraceName, "id " + row.ID.ToString());
                    }
                }
This results in the error:

"The query syntax is not valid., near term '*', line 1, column 11."

This one is driving me crazy!
by daveoggy
Fri 16 Jul 2010 16:38
Forum: dotConnect for Oracle
Topic: Parameter Problem when Using Union
Replies: 4
Views: 1158

Thanks AndreyR, any progress?
by daveoggy
Sun 11 Jul 2010 17:56
Forum: dotConnect for Oracle
Topic: Parameter Problem when Using Union
Replies: 4
Views: 1158

Parameter Problem when Using Union

I have the following code which I think exposes a bug:

Code: Select all

            Dictionary> Lookup = new Dictionary>();
            Lookup.Add(200, new List() { 0, 1, 2 });
            Lookup.Add(330, new List() { 0, 1, 4 });

            using (Entities ent = new Entities())
            {
                IQueryable query = null;
                foreach (var x in Lookup)
                {
                    var queryPart = from t in ent.TM_FNET
                                    where t.ACTION.Value == x.Key
                                    && x.Value.Contains(t.STATUS.Value)
                                    select t.ID;

                    //first one becomes the main query, subsequent ones union-ed on...
                    if (query == null)
                        query = queryPart;
                    else
                        query = query.Union(queryPart);
                }

                foreach (var f in query.ToList())
                {
                    Console.WriteLine("{0}", f);
                }
            }
Which results in the following SQL statement:

Code: Select all

SELECT 
"Distinct1".C1 AS C1
FROM ( SELECT DISTINCT 
	"UnionAll1".ID AS C1
	FROM  (SELECT 
		"Extent1".ID AS ID
		FROM TMDDBA.TM_FNET "Extent1"
		WHERE ("Extent1".ACTION = :p__linq__0) AND (((0 = "Extent1".STATUS) OR (1 = "Extent1".STATUS)) OR (4 = "Extent1".STATUS))
	UNION ALL
		SELECT 
		"Extent2".ID AS ID
		FROM TMDDBA.TM_FNET "Extent2"
		WHERE ("Extent2".ACTION = :p__linq__1) AND (((0 = "Extent2".STATUS) OR (1 = "Extent2".STATUS)) OR (4 = "Extent2".STATUS))) "UnionAll1"
)  "Distinct1"
All is well expect for the values assigned to the parameters :p_linq_0 and p_linq_1, for some reason both of these values are 330.
by daveoggy
Fri 09 Jul 2010 18:18
Forum: Entity Framework support
Topic: Linq to Entity and Dictionary
Replies: 4
Views: 3668

Linq to Entity and Dictionary

I have the following code that compiles but throws an error on execution:

Code: Select all

            Dictionary> Lookup = new Dictionary>();

            //Used in my commented out Linq Query
            List Status = new List() { 0, 1, 2, 4 };

            Lookup.Add(200, new List() { 0, 1, 2 });
            Lookup.Add(330, new List() { 0, 1, 4 });

            using (Entities ent = new Entities())
            {

                try
                {
                    //var result = from d in ent.TM_FNET
                    //             where Lookup.Keys.Contains(d.ACTION.Value)
                    //             && Status.Contains(d.STATUS.Value)
                    //             select d;

                    var result = from d in ent.TM_FNET
                                 where Lookup.Keys.Contains(d.ACTION.Value)
                                 && Lookup[d.ACTION.Value].Contains(d.STATUS.Value)
                                 select d;

                    foreach (var f in result)
                    {
                        Console.WriteLine("{0} -- {1} -- {2}", f.ACTION, f.ID, f.STATUS);
                    }

                    Console.WriteLine("Finished");
                    Console.ReadKey();
                }
                catch
                {

                }
            }
The linq query that is commented out works perfectly but the active one fails with the following error:
LINQ to Entities does not recognize the method 'System.Collections.Generic.List`1[System.Decimal] get_Item(System.Decimal)' method, and this method cannot be translated into a store expression.
What I'm expecting is linq to translate the query into something like the following:

Code: Select all

SELECT
        *
FROM
        tm_fnet
WHERE
        (ACTION = 200 AND STATUS IN (0,1,2))
        OR
        (ACTION = 330 AND STATUS IN (0,1,4));
Is this a bug, a limitation, or my idiocy?

Thanks!
by daveoggy
Fri 07 May 2010 17:54
Forum: dotConnect for Oracle
Topic: dotConnect Doesn't See Relation
Replies: 6
Views: 1454

I am unable to use the Devart DataSet Wizard as it doesn't seem to create the TableAdapters. I can see them in the designer but can't find them in the code.
by daveoggy
Mon 03 May 2010 21:48
Forum: dotConnect for Oracle
Topic: dotConnect Doesn't See Relation
Replies: 6
Views: 1454

Do the DevArt folk read this forum? Should I be submitting a real bug report somewhere else?
by daveoggy
Mon 03 May 2010 14:57
Forum: dotConnect for Oracle
Topic: dotConnect Doesn't See Relation
Replies: 6
Views: 1454

dotConnect Doesn't See Relation

I have a table defined with a self referencing relationship. The table has an ID column and a PARENT_ID column. ID is the primary key, PARENT_ID is the foreign key and is set to reference the primary key in this same table

Both the ".net Framework Data Provider for Oracle" (System.Data.OracleClient) and "ODP.Net (Oracle.DataAccess)" systems are able to create the table in my dataset with the relation correctly implemented. When using dotConnect the table is created with no relations whatsoever.
by daveoggy
Fri 23 Jan 2009 18:35
Forum: dotConnect for Oracle
Topic: Oracle Error 01453 When Using Entity Framework
Replies: 3
Views: 2899

Oracle Error 01453 When Using Entity Framework

Hi

I use the following function to save changes made to my detached entity objects. I have multiple threads running and I quickly run out of database connections if I don't use the mutex.

Code: Select all

        public static void SaveFlashnetChanges(EntityKey ek, EntityObject FlashNetObject)
        {
            mtx1.WaitOne();
            using (Entities ent = new Entities(EntitySharedConnection.SharedConnection))
            {
                object FNET_ORIG = null;
                try
                {
                    if (ent.TryGetObjectByKey(ek, out FNET_ORIG))
                    {
                        ent.ApplyPropertyChanges(ek.EntitySetName, FlashNetObject);
                    }
                    ent.SaveChanges();
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
            }
            mtx1.ReleaseMutex();
        }
The application runs fine for a while until I eventually get the following error:

Code: Select all

Unhandled Exception: System.Data.EntityException: An error occurred while starting a transaction on the provider connection. See the inner exception for details. ---> Devart.Data.Oracle.OracleException: ORA-01453: SET TRANSACTION must be first statement of transaction
   at Devart.Data.Oracle.al.b(Int32 A_0)
   at Devart.Data.Oracle.an.e(Int32 A_0)
   at Devart.Data.Oracle.an.a(Int32 A_0, a1 A_1)
   at Devart.Data.Oracle.OracleCommand.a(CommandBehavior A_0, IDisposable A_1, Int32 A_2, Int32 A_3)
   at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.ExecuteReader()
   at Devart.Data.Oracle.OracleCommand.ExecuteNonQuery()
   at Devart.Data.Oracle.OracleTransaction..ctor(OracleConnection A_0, IsolationLevel A_1)
   at Devart.Data.Oracle.OracleConnection.BeginTransaction(IsolationLevel il)
   at Devart.Data.Oracle.OracleConnection.b(IsolationLevel A_0)
   at System.Data.Common.DbConnection.BeginTransaction(IsolationLevel isolationLevel)
   at System.Data.EntityClient.EntityConnection.BeginDbTransaction(IsolationLevel isolationLevel)
   --- End of inner exception stack trace ---
   at System.Data.EntityClient.EntityConnection.BeginDbTransaction(IsolationLevel isolationLevel)
   at System.Data.Common.DbConnection.BeginTransaction()
   at System.Data.EntityClient.EntityConnection.BeginTransaction()
   at System.Data.Objects.ObjectContext.SaveChanges(Boolean acceptChangesDuringSave)
   at System.Data.Objects.ObjectContext.SaveChanges()
   at ConsoleApplication1.Program.SubmitNewTasks() in C:\Projects\ConsoleApplication1.EntityData\ConsoleApplication1\Program.cs:line 41
   at ConsoleApplication1.Program.Main(String[] args) in C:\Projects\ConsoleApplication1.EntityData\ConsoleApplication1\Program.cs:line 21
If the number of threads accessing the function is kept low (<10) things seem to be stable, only when the thread count goes up do I encounter problems.

Can anyone help?