title: DataTable Select(String) Function Help VB .NET
body: <p>I made a datatable with 2 columns a transactionTime column and a numberOfTransactions column. I made the table with the pre-defined transaction times and want to add the number of transactions from an XML file. I have gotten through the XML file and want to add the data to the correct row. Here is the function:</p>
  
  <pre><code>Function AddRow(ByVal timeOfTransaction As String, ByVal numberOfTransactions As String, ByRef dataTableOfTransactions As DataTable) As String
  
  
      Dim row() As DataRow = dataTableOfTransactions.Select("transactionTime = timeOfTransaction")
  
      If row(0) IsNot Nothing Then
          row(0)("numberOfTransactions") = numberOfTransactions
  
      End If
      Return Nothing
  
  End Function
  </code></pre>
  
  <p>When I run this it overwrites the first element in the table's numberOfTransactions coloumn. I know it has to do with the "transactionTime = timeOfTransaction" part but I can't seem to get it to read timeOfTransaction as a reference to a string instead of a literal. Any help would be much appreciated. Thanks!</p>