User Profile

Collapse

Profile Sidebar

Collapse
Lacutas
Lacutas
Last Activity: Mar 28 '08, 11:30 AM
Joined: Jan 29 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Lacutas
    started a topic Dynamic LINQ on DataSet
    in .NET

    Dynamic LINQ on DataSet

    Hi

    I'm having some problems getting a dynamic LINQ query to work on my DataSet. The idea is that a user selects certain criteria, and then the LINQ query filters through the dataset making the requested changes.

    The table I am trying to alter is called RawData, this is defined in a DataSet but has no data columns as these aren't known until some data is imported. As part of my import routine it automatically creates...
    See more | Go to post

  • Lacutas
    replied to Convert string to datetime
    in .NET
    Just a quick thought, are you removing the surround tag elements from your string before you try to parse it?...
    See more | Go to post

    Leave a comment:


  • Lacutas
    replied to Distinct rows from DataSet using LINQ
    in .NET
    Solution

    It was actually a silly mistake on my part (though didn't find reference to it anywhere!). I forgot a using statement, in the end code looked like below.

    Code:
    using System.Linq;
    
    DataAccess.RawDataDS ds = DataAccess.RawDataDSManagement.RawData;
    DataTable demoCriteria = ds.Tables["DemographicCriteria"];
    
    IEnumerable<string> query = (from row in demoCriteria.AsEnumerable()
    ...
    See more | Go to post

    Leave a comment:


  • Lacutas
    replied to Distinct rows from DataSet using LINQ
    in .NET
    Thanks for your quick response. I have tried that though C# doesn't seem to accept distinct as a keyword and throws a compile time error....
    See more | Go to post

    Leave a comment:


  • Lacutas
    started a topic Distinct rows from DataSet using LINQ
    in .NET

    Distinct rows from DataSet using LINQ

    Hi all,

    I am having some problems using LINQ to access Distinct records from a Dataset. I have looked around and believe it should be as simple as added
    Code:
    .Distinct()
    to my LINQ query below, though intellisense doesn't even give that option!

    My DataSet has multiple tables, all populated with data. I have a table called DemographicCrit eria which has the fields listed below.
    • CriteriaID
    • DemographicCode
    • In
    ...
    See more | Go to post
No activity results to display
Show More
Working...