ok I'v solved your problem and it's really funy but executeQuery methos works very well even fulltext search
accualy the funny problem is your _ID name don't use '_' underscor because if you notice context class use this underscorr every varible that's why throw exeption
i have tried change _ID name to IDD in context designer but it does't help
you have to change your _ID name something else in your database
Member
54 Points
907 Posts
Strange exception.
Aug 08, 2007 03:32 AM|erdsah88|LINK
var db = new DBOEODataContext();
var persons1 = db.ExecuteQuery<PERSON>("SELECT _NAME FROM PERSON");
I get an exception > InvalidOperationException
The required column '[_ID]' does not exist in the results.
what should I do ?
Member
130 Points
547 Posts
Re: Strange exception.
Aug 08, 2007 01:46 PM|phuff|LINK
Is this Blinq-generated code? It doesn't look like it...
Offhand, I'd say change your code to include the _ID field.
var persons1 = db.ExecuteQuery<PERSON>("SELECT _NAME, _ID FROM PERSON");
But really, the whole point of Linq is that you don't have to write SQL commands anymore. Why not just write
var persons = from Persons select _name, _id;
This posting is provided "AS IS" with no warranties, and confers no rights.
Member
54 Points
907 Posts
Re: Strange exception.
Aug 08, 2007 02:33 PM|erdsah88|LINK
I need dynamic Sql where I have interfaces that has conditions for that.
I need to be able to use runtime times with the linQ ...
None
0 Points
5 Posts
Re: Strange exception.
Sep 03, 2007 11:06 PM|tekila|LINK
i have the same problem
if linq will not support executeQuery correctly then it's useless
Member
54 Points
907 Posts
Re: Strange exception.
Sep 04, 2007 06:14 AM|erdsah88|LINK
None
0 Points
5 Posts
Re: Strange exception.
Sep 04, 2007 01:18 PM|tekila|LINK
the interesting thing about this exception,
i tried to use storeproc and the same problem exist with storeproc
i think it's a bug and i hope they will fixt it,
of cource there is allways a solution with ado.net but in this case why linq exist[:)]
i will try something else and if i fixt it i let you know
None
0 Points
5 Posts
Re: Strange exception.
Sep 06, 2007 12:47 AM|tekila|LINK
ok I'v solved your problem and it's really funy but executeQuery methos works very well even fulltext search
accualy the funny problem is your _ID name don't use '_' underscor because if you notice context class use this underscorr every varible that's why throw exeption
i have tried change _ID name to IDD in context designer but it does't help
you have to change your _ID name something else in your database
by the way ilkona'a selamlar...
comming soon