Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Filter Dataset value

Filter Dataset value

Scheduled Pinned Locked Moved ASP.NET
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jebin k
    wrote on last edited by
    #1

    I need to filter a value in Dataset. My code is string ConStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Extended Properties=\"Text;HDR=No;FMT=Delimited\\\""; System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(ConStr); System.Data.OleDb.OleDbDataAdapter da = new System.Data.OleDb.OleDbDataAdapter("Select * from " + file, conn); da.Fill(ds, "TextFile"); Here i have not defined any column value, Still Can i filter the dataset.

    S 1 Reply Last reply
    0
    • J jebin k

      I need to filter a value in Dataset. My code is string ConStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Extended Properties=\"Text;HDR=No;FMT=Delimited\\\""; System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(ConStr); System.Data.OleDb.OleDbDataAdapter da = new System.Data.OleDb.OleDbDataAdapter("Select * from " + file, conn); da.Fill(ds, "TextFile"); Here i have not defined any column value, Still Can i filter the dataset.

      S Offline
      S Offline
      Sandeep Kumar
      wrote on last edited by
      #2

      yes i think you can still filter the column values....

      Regards, Sandeep Kumar.V

      J 1 Reply Last reply
      0
      • S Sandeep Kumar

        yes i think you can still filter the column values....

        Regards, Sandeep Kumar.V

        J Offline
        J Offline
        jebin k
        wrote on last edited by
        #3

        Can you please give me some clue or syntax

        J 1 Reply Last reply
        0
        • J jebin k

          Can you please give me some clue or syntax

          J Offline
          J Offline
          John ph
          wrote on last edited by
          #4

          you can use RowFilter property of Dataview to filter rows from the dataset... something like this... Dim view As New DataView view = DataSet1.Tables("TableName").DefaultView view.RowFilter = "Column = 'FilterValue'"

          Regards
           - J O N -


          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups