Click here to Skip to main content
13,195,710 members (53,127 online)
   

LINQ

 
AnswerRe: How to execute LINQ query when I have the table`s name stored in a variable Pin
MWRivera23-Mar-12 9:44
memberMWRivera23-Mar-12 9:44 
Questionpopulate dictionary from the intersection of two list collections Pin
siva45530-Jan-12 6:12
membersiva45530-Jan-12 6:12 
SuggestionRe: populate dictionary from the intersection of two list collections Pin
Dean Oliver30-Jan-12 7:23
memberDean Oliver30-Jan-12 7:23 
SuggestionRe: populate dictionary from the intersection of two list collections Pin
Peace ON23-Mar-12 3:11
memberPeace ON23-Mar-12 3:11 
Questiontrouble to get data from stored procedure with linq Pin
sanjumake2326-Dec-11 23:53
membersanjumake2326-Dec-11 23:53 
AnswerRe: trouble to get data from stored procedure with linq Pin
Peace ON23-Mar-12 3:13
memberPeace ON23-Mar-12 3:13 
QuestionLinq to SQL filter by logged in user in web forms Pin
frazzle-me20-Dec-11 1:55
memberfrazzle-me20-Dec-11 1:55 
AnswerRe: Linq to SQL filter by logged in user in web forms Pin
Wayne Gaylard20-Dec-11 19:18
memberWayne Gaylard20-Dec-11 19:18 
GeneralRe: Linq to SQL filter by logged in user in web forms Pin
frazzle-me21-Dec-11 11:06
memberfrazzle-me21-Dec-11 11:06 
QuestionRe: Linq to SQL filter by logged in user in web forms Pin
frazzle-me10-Jan-12 3:30
memberfrazzle-me10-Jan-12 3:30 
AnswerRe: Linq to SQL filter by logged in user in web forms Pin
Wayne Gaylard10-Jan-12 18:34
memberWayne Gaylard10-Jan-12 18:34 
QuestionDeclare TimeStamp in dbml Pin
siva4555-Dec-11 6:25
membersiva4555-Dec-11 6:25 
QuestionExecute a LINQ query using T-SQL code in the LINQ expression Pin
jonatan_55628-Nov-11 1:06
memberjonatan_55628-Nov-11 1:06 
Questionlinq problem Pin
rama201123-Nov-11 19:37
memberrama201123-Nov-11 19:37 
Hi all,

i want to bind datatable using linq query, can you please have a look on below mentioned query ,i am getting error.

public DataTable BindCustomername()
{
DataClasses1DataContext odeptdataclass = new DataClasses1DataContext();
DataTable odtname = new DataTable();
var name = from p in odeptdataclass.Tbldepts
select new
{
p.deptid,
p.deptname

};
odtname = name.ToString();
return odtname;

}

i am getting Error:Cannot implicitly convert type 'string' to 'System.Data.DataTable'

how to do that give me idea.

Thanks
Rama
AnswerRe: linq problem Pin
Wayne Gaylard23-Nov-11 19:55
memberWayne Gaylard23-Nov-11 19:55 
GeneralRe: linq problem Pin
rama201123-Nov-11 20:18
memberrama201123-Nov-11 20:18 
GeneralRe: linq problem Pin
Wayne Gaylard23-Nov-11 20:27
memberWayne Gaylard23-Nov-11 20:27 
AnswerRe: linq problem Pin
emardini1-Dec-11 10:56
memberemardini1-Dec-11 10:56 
AnswerRe: linq problem Pin
wazb10-Feb-12 0:21
memberwazb10-Feb-12 0:21 
GeneralRe: linq problem Pin
Peace ON23-Mar-12 18:01
memberPeace ON23-Mar-12 18:01 
QuestionHow to know whether a string is a substring of list of strings. Pin
NarVish1-Nov-11 1:59
memberNarVish1-Nov-11 1:59 
AnswerRe: How to know whether a string is a substring of list of strings. Pin
Wayne Gaylard1-Nov-11 3:14
memberWayne Gaylard1-Nov-11 3:14 
AnswerRe: How to know whether a string is a substring of list of strings. Pin
emardini5-Dec-11 16:58
memberemardini5-Dec-11 16:58 
GeneralRe: How to know whether a string is a substring of list of strings. Pin
BillWoodruff29-Jan-12 13:16
memberBillWoodruff29-Jan-12 13:16 
AnswerRe: How to know whether a string is a substring of list of strings. Pin
Yospeh28-Jun-12 10:50
memberYospeh28-Jun-12 10:50 
QuestionC# datacontext with linq? Pin
dcof26-Oct-11 10:34
memberdcof26-Oct-11 10:34 
QuestionIssue with Imultiple Results Pin
siva4551-Oct-11 18:07
membersiva4551-Oct-11 18:07 
QuestionCopytodatatable usage in VB Pin
ahawth23-Sep-11 16:31
memberahawth23-Sep-11 16:31 
AnswerRe: Copytodatatable usage in VB Pin
Mycroft Holmes14-Nov-11 13:21
memberMycroft Holmes14-Nov-11 13:21 
AnswerRe: Copytodatatable usage in VB Pin
prasun.r13-Dec-11 23:56
memberprasun.r13-Dec-11 23:56 
QuestionSerializing Linq Pin
Florian Leeber13-Sep-11 2:47
memberFlorian Leeber13-Sep-11 2:47 
AnswerRe: Serializing Linq Pin
Member 362806421-Nov-11 7:44
memberMember 362806421-Nov-11 7:44 
QuestionLogin Page with the help of Linq Pin
Sumit Gohil18-Aug-11 8:38
memberSumit Gohil18-Aug-11 8:38 
AnswerRe: Login Page with the help of Linq Pin
Simon Bang Terkildsen19-Aug-11 3:35
memberSimon Bang Terkildsen19-Aug-11 3:35 
AnswerRe: Login Page with the help of Linq Pin
amitgajjar25-Dec-11 23:13
memberamitgajjar25-Dec-11 23:13 
QuestionHow to sum field in already exist Linq result [modified] Pin
Sam Martini19-Jul-11 0:19
memberSam Martini19-Jul-11 0:19 
AnswerRe: How to sum field in already exist Linq result Pin
Sam Martini19-Jul-11 23:12
memberSam Martini19-Jul-11 23:12 
QuestionFind specific table in .dbml Pin
Steve van Niman13-Jul-11 9:45
memberSteve van Niman13-Jul-11 9:45 
AnswerRe: Find specific table in .dbml Pin
harinit13-Sep-11 0:42
memberharinit13-Sep-11 0:42 
GeneralRe: Find specific table in .dbml Pin
Steve van Niman13-Sep-11 4:12
memberSteve van Niman13-Sep-11 4:12 
QuestionWhy Linq to SQL? Pin
Tad McClellan12-Jul-11 13:01
memberTad McClellan12-Jul-11 13:01 
AnswerRe: Why Linq to SQL? Pin
Mark Nischalke13-Jul-11 1:56
mvpMark Nischalke13-Jul-11 1:56 
QuestionGet Current Identity value of the table using LINQ. Pin
madhubabu29-Jun-11 8:38
membermadhubabu29-Jun-11 8:38 
AnswerRe: Get Current Identity value of the table using LINQ. Pin
AspDotNetDev29-Jun-11 10:04
mvpAspDotNetDev29-Jun-11 10:04 
QuestionHow to add data to a table using LINQ (EF 4.1) Pin
Mort.Strom5-Jun-11 10:55
memberMort.Strom5-Jun-11 10:55 
AnswerRe: How to add data to a table using LINQ (EF 4.1) Pin
AnnieMacD6-Jun-11 12:42
memberAnnieMacD6-Jun-11 12:42 
GeneralRe: How to add data to a table using LINQ (EF 4.1) Pin
Pete O'Hanlon6-Jun-11 20:05
mvpPete O'Hanlon6-Jun-11 20:05 
GeneralRe: How to add data to a table using LINQ (EF 4.1) Pin
AnnieMacD7-Jun-11 2:55
memberAnnieMacD7-Jun-11 2:55 
GeneralRe: How to add data to a table using LINQ (EF 4.1) Pin
Pete O'Hanlon9-Jun-11 10:42
mvpPete O'Hanlon9-Jun-11 10:42 
GeneralRe: How to add data to a table using LINQ (EF 4.1) Pin
AnnieMacD9-Jun-11 10:52
memberAnnieMacD9-Jun-11 10:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy |
Web01 | 2.8.171019.1 | Last Updated 23 Jun 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid