Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning all the fields
Message
From
25/02/2012 10:23:48
 
General information
Forum:
ASP.NET
Category:
LINQ
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01536260
Message ID:
01536543
Views:
31
>>>>Using Link, from the Select clause, what would be the syntax to return all the fields? The Table.* syntax does not work.
>>>
>>>
>>>If you want all fields, just eliminate the select. It will return everything by default.
>>
>>Hi,
>>
>>Can you give an example. I'm assuming the question refers to 'Linq to Sql' which I've not used but I thought that a linq expression always required a Select (or maybe a GroupBy) clause ?
>
>GroupBy is never required, especially if you want all fields.

Not sure what you mean. As per my reply to John I was thinking of linq queries rather than method syntax so the first two below are legal the third is not:
var v2 = from x in table where x.AcctNo=="Fred" select x;
var v2 = from x in table where x.AcctNo=="Fred" group x by x.CustName;
var v3 = from x in table where x.AcctNo=="Fred";
i.e there must be *either* a 'select' or 'group' clause (or possibly both)
Previous
Reply
Map
View

Click here to load this message in the networking platform