Re: How do I query a dataset?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Miha Markic [MVP C#] (miha)
Date: 03/03/04


Date: Wed, 3 Mar 2004 10:35:22 +0100

Hi,

You should use DataView with RowFilter set accordingly.
Another approach is to use DataTable.Select method which returns array of
DataRows.
There is no real SQL support there.

-- 
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com
"2" <2@2.2> wrote in message news:eBBISrPAEHA.2480@TK2MSFTNGP11.phx.gbl...
> Hello,
>
> I get how to populate a dataset by querying a database server... but once
> I've populated my dataset, say with several related tables, how can I then
> select records from the dataset copy of data using SQL statements instead
of
> the database server itself?
>
> In some cases I'd say this is preferable to hitting the database server
> everytime a subset of data needs to be retrieved. Only suitable for small
> amounts of static data of course.
>
> As an example if I have a populated table of employee data in a dataset
and
> I want to populate a temp table with only those records where employee age
>
> 60..... am I limited to filters or can I use SQL statements (which would
> then mean no extra code if I decided to point back at the database server
> instead of the dataset itself)....?
>
> Hope this makes sense to you guys... cheers
>
>
>
>
>
>
>


Relevant Pages

  • Re: SQL Server 2000 Hardware Recommendations?
    ... Hardware Performance CheckList ... Andrew J. Kelly SQL MVP ... >> trace and see what is taking up all the resources especially cpu. ... Currently the database server houses all data pertinent to ...
    (microsoft.public.sqlserver.server)
  • Re: commit work not working?
    ... Because he is using straight sql, ... The transaction is made up of the statements that occur ... locks the stock table, updates rows in the stock table ... The database server must perform this sequence of operations either ...
    (comp.databases.informix)
  • Re: Scripting conditional list box
    ... the drop down boxwon't populate. ... Dim SQL as string ... SQL = "SELECT ApptTime FROM AppointmentTimes WHERE ApptTime not in ... except that you called the query "Time". ...
    (microsoft.public.access.formscoding)
  • Re: Populate a comboxbox and Listbox in a excel userform with an sql table data
    ... I have a excel userform which has some combo boxes and list boxes and I ... populate this boxes with the data which I have on my sql server database ... Dim cnt As ADODB.Connection ...
    (microsoft.public.excel.programming)
  • Re: Re: Inserting large amounts of data
    ... > I'm using DTS to populate a staging table with raw streams of data (a ... I thought about imbedding the SQL ... Doing the substringing in T-SQL is not the ...
    (comp.databases.ms-sqlserver)