LINQ to DataSet is a component of Language Integrated Query (LINQ) that provides SQL-style query capabilities against ADO.NET DataSet objects from .NET languages.
Questions tagged [linq-to-dataset]
181 questions
0
votes
0 answers
Query dataset to filter data using LINQ without specifying specefic columns in a Dataset that is filled dynamically
Case 1
DataSet oDsParent = new DataSet();
DataTable odt = new DataTable();
odt.Columns.Add(new DataColumn("DOC_GENO_KEY", typeof(int)));
odt.Columns.Add(new DataColumn("RESOURCE_TYPE", typeof(string)));
odt.Columns.Add(new…

shiju87
- 112
- 2
- 11
0
votes
2 answers
Select distinct Linq
I have Question and Answer tables in a database. I used Join to select questions with answers and tried to get questions and answers with LINQ. Here is my code:
List newQuestionList =
(from q in dt.AsEnumerable()
where…

Rauf Zeynalov
- 110
- 3
- 14
0
votes
1 answer
Count Group Ordinal in LINQ to Dataset
I have an old FoxPro program that does a SQL query which includes the following:
SELECT Region,
Year AS yr_qtr,
SUM(Stock) AS inventory
**...
…

Buggieboy
- 4,636
- 4
- 55
- 79
0
votes
1 answer
join between two tables with linq to datasets
i want to create a join between two tables and that the result will include all the two tables columns.
i want to do this without specifying the specific column names, just do select all, because i won't know how many columns will the two tables…

Rodniko
- 4,926
- 20
- 69
- 93
0
votes
1 answer
Combining multiple linq queries and concatenated results into a smaller query
Can I restructure the following into a more compact linq query, ideally without the introduction of a helper function?
var revPerUnitChanges =
from row in this.DataTable.GetChanges(DataRowState.Modified).AsEnumerable()
let field =…

Aaron Anodide
- 16,906
- 15
- 62
- 121
0
votes
1 answer
Can I use Linq to DataSet to performe an insert/delete/update to a database?
I'm not talking about Linq to SQL. Just Linq to DataSet.
Let's say I filled a dataset as explained here: http://support.microsoft.com/kb/314145/en-us
Now, how can I use Linq to performe inserts, updates and deletes on the dataset.
I did it as…

Aikanáro
- 867
- 3
- 20
- 42
0
votes
1 answer
LINQ: query returns list of empty objects
I have a query that 'selects' object of a type:
Dim l as IList(Of Foo) = (From dataRow As DataRow In table.Select()
Where CStr(dataRow("Column1")) = "A"
Select New Foo(CStr(dataRow("Column1")), _
…

badmaash
- 4,775
- 7
- 46
- 61
0
votes
2 answers
Linq Query for dataset in c#?
I have dataset which contains two tables like this:
DataTable dtFields = new…

NIlesh Lanke
- 1,213
- 9
- 26
- 35
-1
votes
3 answers
Generic collection fill by var value
In my code, I need help to put result value into oList
NorthwindDataContext db = new NorthwindDataContext();
List oList = new List();
var result = from p in db.Categories
select new { CategoryID = p.CategoryID,…

shamim
- 6,640
- 20
- 85
- 151
-1
votes
1 answer
Need to solve C# Error u003Ef__AnonymousType0
I have a c# code as below, Its showing error at IEnumerable<\u003C\u003Ef__AnonymousType0
Can someone tell me how to solve it.
dataSet = this.GetData.getInfo("SELECT b.nBatchID, td.F_Name &' '& td.M_Name &' '& td.L_Name AS StaffName, b.BatchName…

Amaan Khan
- 181
- 2
- 3
- 15
-1
votes
3 answers
LINQ CopyToDataTable issue
var results = gridViewDataTable.AsEnumerable()
.GroupBy(d => d.Field("String1"))
.Select(g => g.OrderByDescending(d => d.Field("String2")).CopyToDataTable();
I am trying to get back a…

jakarta
- 13
- 6
-1
votes
1 answer
How to Select Nullable Value from a coloumn in the List
How can I select the Nullable Value from a column from the list.
Say for example I have a dataset converted into a list like below instead of passing a value in the client id(nullable column). I need to pass null. I've made the following attempts…

mohamed Kalithu
- 1
- 1
-1
votes
2 answers
Linq to dataset, Query optimization
I have following linq queries:
var itembind = (from q in dsSerach.Tables[0].AsEnumerable()
select new
{
PatternID = q.Field("PatternID"),
…

Neha
- 2,933
- 3
- 19
- 23
-1
votes
1 answer
Get particular column from datatable
I need particular columns from datatable to bind it in DataGridView. I have following column.
Work1 Price Area que Len bre size
A 12 x 1 1.2 1 …

Sagar Upadhyay
- 819
- 2
- 11
- 31
-1
votes
2 answers
Linq to sql query fails
I am having problem in executing a linq to sql query. Please have a look.
Here is my code:
SELECT c.client_name,
n.instrument_group_id,
n.trade_date,
sum(n.buy_qty) AS TotBuyQty,
sum(convert(float,n.buy_value) +…

VID
- 13
- 1
- 6