LINQ to SQL Entity Class

LINQ to SQL Entity Class

Postby 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
hawthorn_computing
 
Posts: 3
Joined: Wed 02 Apr 2008 12:00

Postby 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.
Alexey.mdr
 
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Postby 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
hawthorn_computing
 
Posts: 3
Joined: Wed 02 Apr 2008 12:00

Postby 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.
Alexey.mdr
 
Posts: 729
Joined: Thu 13 Dec 2007 10:24

Postby 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.
hawthorn_computing
 
Posts: 3
Joined: Wed 02 Apr 2008 12:00

Postby 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.
Alexey.mdr
 
Posts: 729
Joined: Thu 13 Dec 2007 10:24


Return to dotConnect for Oracle