Results 1 to 2 of 2

Thread: Rowfilter and variable

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Denmark
    Posts
    1,049

    Question Rowfilter and variable

    I have a DataView where I use the Rowfilter property. How do I set the value of a variable to the value that I get by using the rowfilter?

    Code:
    ....
    Dim objAdapter As OleDbDataAdapter = New OleDbDataAdapter( _
                    "SELECT Dimension,Pris FROM [dbi$]", objConnection)
                Dim objDS As DataSet
                Dim objDV As DataView
    
    
                objDS = New DataSet()
                objAdapter.Fill(objDS, "pris")
                objDV = New DataView(objDS.Tables("pris"))
                objDV.RowFilter = "Dimension=26"
    
                Dim hpny As String
                hpny = objDV.ToString
                Response.Write(hpny)
    As you can see I've tried ToString, but this only retures System.Data.DatView

  2. #2
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Fort Collins, CO
    Posts
    366
    How do I set the value of a variable to the value that I get by using the rowfilter?
    This doesn't make any sense. You use the RowFilter to filter the results in a dataset leaving you with a DataView. That DataView, objDV in your example, IS the filtered result of applying the RowFilter. There's no variable to set or get, that DataView contains filtered rows of data that you can iterate thru or use as a datasource or whatever.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width