basic dataset/table question

  • Thread starter Thread starter Aussie Rules
  • Start date Start date
A

Aussie Rules

Hi ...

I have a dataset that is populated via a SQL Server Stored Procedure. The
stored procedure actually returns 4 different results, so my dataset ends up
with 4 tables of data. (dataset(0).table(1....4)). The stored procedure get
all the data and builds a number of temp tables which is what is returned.
At the end of the stored procedure that temp table is destroyed, so I can't
go back to the source, and the only copy of the data I have is within the
datasets tables.

Is it somehow possible to then do a select against one of these datatables
within my dataset ?

The second table in my dataset contains some information that I want to
extract based on a value. So I want to be able to execute something like
"select * from dataset.tables(2) where sku = 2" (sku is a column in the
table 2).

I would need to be able to do this select over and over until I have
finished the work.

Is this possible ?
 
Hi ...

I have a dataset that is populated via a SQL Server Stored Procedure. The
stored procedure actually returns 4 different results, so my dataset ends up
with 4 tables of data. (dataset(0).table(1....4)). The stored procedure get
all the data and builds a number of temp tables which is what is returned.
At the end of the stored procedure that temp table is destroyed, so I can't
go back to the source, and the only copy of the data I have is within the
datasets tables.

Is it somehow possible to then do a select against one of these datatables
within my dataset ?

The second table in my dataset contains some information that I want to
extract based on a value. So I want to be able to execute something like
"select * from dataset.tables(2) where sku = 2" (sku is a column in the
table 2).

I would need to be able to do this select over and over until I have
finished the work.

Is this possible ?

You can create a dataview and set its rowfilter to whatever criteria
that you want.

example (untested)

oDV = New Dataview(yourdataset.table(2))
oDV.RowFilter = "sku = 2"
oTempTable = oDV.Totable() ' works in VB .Net 2005 and up
 
Back
Top