datatable.select

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 code is as follows: Dim sb As New StringBuilder For Each Row As DataRow In dtData.Rows ...

Input String is not in Correct Format / DataTable.Select Method

Hi I have a problem, when I am trying to use DataTable.Select to get column values.. Actually it is working file in C# which I have converted using Converters. I am using .NET 1.1 / VS 2003...input string was not in correct format.. Dim drs As DataRow() = dtResults.[Select]("ISSD" + i + " =" + issd + " AND BiPad=" + bipad) ...

Object Reference Error filling a datarow

This is the code: Dim dr() As DataRow = DataSet.Tables("TableName").Select("EVENTNAME = '" & name & "'") I get an "Object reference not set to an instance of an object." Error when this line is executed. It is looping through a list of selected items in a listbox. I think it has to do with how I have the datarow declared because I c...

DataTable DataRow Select String with Quotation Marks

Hi, My string include quotation mark; the select statement crash. vm_TEXT_string = "Hello 'French' People"; vm_DataTable_SELECT_string = "[MyField] = '" + vm_TEXT_string + "'"; DataRow[] o_DataRow_ARRAY_Found = vco_DataTable.Select (vm_DataTable_SELECT_string); I cannot use this statement: string filter = "[MyColumn]" + " LIKE '%" + ...

Datable.Select sort expression

Hi, I have datatable with column name tag and 100 rows of data.I need to filter this table with tag starting with "UNKNOWN". What should my sortexpression for datatable.select be ? I'm trying the following. Datarow[] abc = null; abc = dtTagList.Select(string.format("tag='{0}'","UNKNOWN")) How can I achieve tag startswith 'UNKNOWN' i...

How to correctly filter a datatable (datatable.select)

Dim dt As New DataTable Dim da As New SqlDataAdapter(s, c) c.Open() If Not IsNothing(da) Then da.Fill(dt) dt.Select("GroupingID = 0") End If GridView1.DataSource = dt GridView1.DataBind() c.Close() When I call da.fill I am inserting all records from my query. I w...

Problem with DataTable.Select method

I have my strings in a String array, my Data in a datatable. What I have to do is, select a single row using datatable.select(string) method and delete it from the datatable. this is what I am doing, and its working fine many times but its returning an error if I change the array frequently. I have checked the datarows in the datatable...

DataTable.Select injection

Is there possible to use sql-injection code while invoking DataTable.Select? How can I restrict such vulnerability or get rid of it at all? ...

DataTable.Select and Performance Issue in C#

Hi All, I'm importing the data from three Tab delimited files in the DataTables and after that I need to go thru every row of master table and find all the rows in two child tables. Against each DataRow[] array I found from the child tables, I have to again go thru individually each row and check the values based upon different paramente...

c# DataTable select not working with special characters #

I have a datatable select like: productData.Select("Name = 'AAA BBB # CCC'"); I know the entry is there, it just doesn't work because of the # character. I have tried escaping with [] like: productData.Select("Name = 'AAA BBB [#] CCC'"); but it still doesn't work. I know for single quotes I double them so ' becomes ''. But what oth...