Questions tagged [datatable.select]

Select method in the .Net class System.Data.DataTable

The class System.Data.DataTable in .Net has a Select() method that allows to get certain DataTable rows that fill a certain filter and, optionally, in a specified order, depending on the overload used. Since .Net 1.1.

34 questions
0
votes
1 answer

DataTable.Select("ColumnName IN ") Guid error

I'm having problems with a DataTable line, the idea is that I want to pull out of a series of rows any rows where one of the column values is in a set of guids. However, I'm getting a guid / string comparison error from the select() function. The…
Sukasa
  • 1,700
  • 4
  • 22
  • 40
0
votes
2 answers

how to convert a datatable using a reference datatable asp.net

I am finding difficulties to convert a datatable to a new datatable using a reference datatable. My question is confusing and I am not good at explaining things so I drew a picture (see below). I have two datatables on memory and I need to create…
Laurence
  • 7,633
  • 21
  • 78
  • 129
-1
votes
1 answer

Cannot Perform '-' operation on System.String and System.Decimal on DataTable.Select statement

I am trying to execute this select statement within my application and encounter the System.Data.EvaluateException "Cannot perform '-' operation on System.String and System.Decimal" foreach (DataRow dataRow in dt.Rows) string otherSTR =…
-4
votes
1 answer

C# datable.select with convert fails - why?

My code is comparing a passed in integer parameter to a datatable with corresponding string column. The real problem is that often the string value is preceded with 1 or more zeros. so I end up comparing string "000123" to integer 123 and they do…
Judy K
  • 31
  • 2
1 2
3