Page 1 of 1
LINQ to SQL Entity Class
Posted: Wed 02 Apr 2008 12:08
by hawthorn_computing
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
Posted: Wed 02 Apr 2008 12:41
by Alexey.mdr
OraDirect .NET supports Entity Framework with LINQ to Entities,
although id does not currently integrate with LINQ to SQL due to technology limitations.
Posted: Thu 03 Apr 2008 09:12
by hawthorn_computing
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
Posted: Thu 03 Apr 2008 15:41
by Alexey.mdr
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.
Posted: Fri 04 Apr 2008 07:03
by hawthorn_computing
I sent the project - of course you will have to use your own table and database name in order for it to work.
Posted: Fri 04 Apr 2008 12:28
by Alexey.mdr
I've received your project.
The investigation will take a couple of days.
I'll reply you by email.