• Welcome to Valhalla Legends Archive.
 

Datatable.Select

Started by Imperceptus, October 01, 2009, 05:28 PM

Previous topic - Next topic

Imperceptus

I am trying to get the Select method for datatables to work and It never seems to like msdn says.


        Dim dtTempSnapshot As DataTable = dsTempSnapshot.Tables(0)
        Dim dsExisting As DataSet = UserInfo.Portfolios.Snapshot.Details(PortfolioID, SnapshotDate)
        Dim dtExisiting As DataTable = dsExisting.Tables(0)
        For Each dRow As DataRow In dtTempSnapshot.Rows
            Dim drFound() As DataRow = dtExisiting.Select("Ticker='" & dRow("Ticker") & "'")
        Next

Im hoping to fill drFound with results that would say dtExisting has a ticker that was in dtTempsnapshot.  However which ever why I try I end up with nodda OR I get told that the value for dRow("Ticker") is a column could not be found.  "Ticker" Is a primary key within the dataset.  I am out of Idea's and Coffee.  Any thoughts/suggestions?
Quote from: Hazard on August 07, 2003, 03:15 PM
Highlight your entire code. Press the delete key. Start over again using Cuphead's CSB tutorial and work your way from their rather than raping code from downloaded sources meant purely for learning purposes. If this does not fix the problem, uninstall Visual Basic and get a new hobby. I suggest Cricket.

Camel

Quote from: Imperceptus on October 01, 2009, 05:28 PM
I am out of ... Coffee.  Any thoughts/suggestions?

Buy more coffee.

Imperceptus

I need to figure a way to take my coffee intravenously, then I could improve efficiency of my work time! lol thanks for that.
Quote from: Hazard on August 07, 2003, 03:15 PM
Highlight your entire code. Press the delete key. Start over again using Cuphead's CSB tutorial and work your way from their rather than raping code from downloaded sources meant purely for learning purposes. If this does not fix the problem, uninstall Visual Basic and get a new hobby. I suggest Cricket.