Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
- Posts: 14
- Joined: Fri 23 Jan 2009 18:15
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!
- Devart Team
- Posts: 2919
- Joined: Mon 07 Jul 2008 13:16
The CreateQuery method takes Entity SQL query, not SQL query.
Take a look at the Entity SQL article
in MSDN for details.
To execute the SQL query you can use the ObjectContext.ExecuteStoreQuery
Please note that it is available in Entity Framework v4 only.