473,394 Members | 1,944 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,394 software developers and data experts.

SQL Query On DataTables

Simple as that:
How do I perform an sql query onto a DataTable(not a Database table,

but a ->

#using System.Data;
#DataTable dt = new DataTable();

)

I dont care about column names.I'll use indexes.

Thanks In advance. :)

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
Nov 16 '05 #1
3 20187
Hello pontifikas,

Use dt.Select("OneOfColumn = 'MyCriterion'")

You will get an array of DataRow object. Or you could use Filter of DataView
object out of DataTable object.
Simple as that:
How do I perform an sql query onto a DataTable(not a Database table,
but a ->

#using System.Data;
#DataTable dt = new DataTable();
)

I dont care about column names.I'll use indexes.

Thanks In advance. :)

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*

Nov 16 '05 #2
Look into the .Select() method of the DataTable

http://msdn.microsoft.com/library/de...electtopic.asp

Joel Martinez
http://www.onetug.org - Orlando .NET User Group
http://www.codecube.net - blog

cs******@scylla.cs.uoi-dot-gr.no-spam.invalid (pontifikas) wrote in message news:<41**********@Usenet.com>...
Simple as that:
How do I perform an sql query onto a DataTable(not a Database table,

but a ->

#using System.Data;
#DataTable dt = new DataTable();

)

I dont care about column names.I'll use indexes.

Thanks In advance. :)

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*

Nov 16 '05 #3
Good!! :D
Thanks a lot guys!

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
Nov 16 '05 #4

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

Similar topics

1
by: rawCoder | last post by:
Hi All Is there a way to Execute a query (possibly including two tables and joins) on a totally disconnected dataset. By 'Totally Disconnted' , I mean there is no DB and there is no DBConnection...
1
by: cindy | last post by:
Get data into datatable, add to dataset dsSearch " Get data into datatable, add to dataset dsSearch Using In-Memory SQL Engine join the tables and select the filenames from the join, add to...
4
by: sal | last post by:
Greets, All Converting array formula to work with datatables/dataset tia sal I finally completed a formula I was working on, see working code below. I would like to change this code so it...
7
by: Marchetto | last post by:
Hi all. I thought that it was a FAQ.... but I can't find answer so i post in this NG. I have a dataset with two datatables (dt1 and dt2) in my application. I'd like to know if there is a...
4
by: reidarT | last post by:
I have a dataset with 2 tables. I have madee a query of theese 2 tables. When I look at the datasources the query is not shown. How do I make a form with the query as source? reidarT
7
by: bryant | last post by:
Hi all. I am new to ASP and working in Expression Web. The following query displays the information I need in the gridview for a single record. SELECT "OE_HDR"."ORD_NO", "OE_HDR"."CUST_NAM",...
0
by: Satish | last post by:
Hi everyone, I need some help constructing a linq query on datatables. I have 2 datatables as follows RangeTable MinValue MaxValue 0.00 0.050 0.051 0.10 0.101 0.15 0.151 0.20
0
by: StefanPienaar | last post by:
Hi Guys Is there any way in c# (or vb.net) to extract a datatable of data from a dataset with multiple datatables which has relationships set up (containing combined data from the datatables)? ...
3
by: Vivien Parlat | last post by:
Hello, I am currently using VB.Net 2008 express. I use linq to perform queries on a database, and I'm using the following link's source to convert those queries into DataTables i can then bind...
8
by: TimVtoo | last post by:
Hi all and thanks for looking. I need to make the move from ASP to ASP.NET, and as my sister has aked me to knock up a website for her, I thought this could be a nice starter project to help me...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.