473,387 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How remove rows from DataTable where column=value?

I have a DataTable like

Id Code Value
1 TAB Inventory
2 TAB Marketing
3 GRP Pens
4 ICO Lot

I would like to remove all rows where Code=TAB since I'm done with that
part.

The reason I want to do this is so the DataTable (which will be in memory
fro the entire app session) will be as small as possible.

I could do it in a for loop but is there a better way?

Thanks,
Ron

Dec 14 '07 #1
1 4552
I could do it in a for loop but is there a better way?

I don't think so. Loop it is...

Actually, even if you remove it from the DataTable, the DataSet might
still have hooks on it for change-tracking - something else to be
aware of...

Marc
Dec 14 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: yue | last post by:
I have created a dataview that points to the row i am looking for but I dont know how to get the columns value. How do I retrieve a column value from a dataview? yue
0
by: Amber | last post by:
There are times when you will need to highlight or otherwise modify the contents of a particular DataGrid row-column value based upon the value in the column. In this example we will select the...
1
by: kcakebread | last post by:
Using VB 2005, I have a strongly typed dataset (from a .xsd file in my project). When I load data into this dataset, the immediate window shows: ?ds.TableX(0).IstheFieldNull True So,...
0
by: kowndinya | last post by:
Hai, I have created a program in vb6 , MSChart and it is working fine. This chart shows monthly sales values ( columncount =1) and chart type is vtChChartType2DBar my problem is, I want to add...
1
by: =?Utf-8?B?R3JlZyBMYXJzZW4=?= | last post by:
I'm populating a datagridview from a data table. I would like to set the back ground color of each row based on a column value in that row. If the value of a column for a particular row is set...
0
by: Joe Meng | last post by:
Greetings, I've seen this question asked and answered here, just not completely yet. I'm wondering how to use a column value as a table name in another query. So far it's looking like you must...
10
by: TF | last post by:
Very newbie question and I hope this is the right group. I have a table on a web page which contains info about paint colors. One column contains the hex value for the color's RGB value. I want...
4
by: Atul Kumar | last post by:
comapre column value of two row of same table. suppose in table tabl1 have column name comn1 it has two row means two value... after comparison i have to return some value like true or...
3
by: Manikandan | last post by:
Hi, I have table with three columns as below table name:exp No(int) name(char) refno(int) I have data as below No name refno 1 a 2 b 3 c
1
by: Dolly Kumari | last post by:
Hi, I want to write a Program in vb which will accept any Access database (.mdb file) and search a particular column value in all tables present in the database and will give the result as table...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.