LINQ to SQL Entity Class

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
hawthorn_computing
Posts: 3
Joined: Wed 02 Apr 2008 12:00

LINQ to SQL Entity Class

Post by hawthorn_computing » Wed 02 Apr 2008 12:08

I'm attempting to use 'LINQ to SQL' via CoreLab.Oracle;

Corelab lets me connect OK and define a LINQ DataContext.

When it gets to "GetTable" I get a CoreLab error:

"CoreLab.Oracle.OracleException: ORA-00923: FROM keyword not found where expected".....

Since I do not code the SQL (its generated by LINQ) I'm wondering if
CoreLab.Oracle actually supports "LINQ to SQL"?

Can you advise?

Thank you

John H

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Wed 02 Apr 2008 12:41

OraDirect .NET supports Entity Framework with LINQ to Entities,
although id does not currently integrate with LINQ to SQL due to technology limitations.

hawthorn_computing
Posts: 3
Joined: Wed 02 Apr 2008 12:00

Post by hawthorn_computing » Thu 03 Apr 2008 09:12

Thankyou for getting back to me so fast.
I'm now accessing the database via the method you suggested:

IEnumerable r = dataContext.ExecuteQuery(@"select id,desc_ from xxxx.my_ora_table where id = 2");

This bit works OK.
I then update the array:

foreach (MY_CLASS i in r)
i.desc_ = "xxxx";

And finally I try to update the database with the change:

dataContext.SubmitChanges();

This final update does not work.
I'm guessing I either need to use an overload on SubmitChanges
or some other method....

Can you help?

John

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Thu 03 Apr 2008 15:41

Please send me (alexeyman*crlab*com) a small test project to reproduce the problem.
Please include the definition of your own database objects.
Do not use third party components.

hawthorn_computing
Posts: 3
Joined: Wed 02 Apr 2008 12:00

Post by hawthorn_computing » Fri 04 Apr 2008 07:03

I sent the project - of course you will have to use your own table and database name in order for it to work.

Alexey.mdr
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Post by Alexey.mdr » Fri 04 Apr 2008 12:28

I've received your project.
The investigation will take a couple of days.
I'll reply you by email.

Post Reply