DataAdapter Fill Method Query

L

landers

Hi All,

I have a SQL Server stored procedure that return the results of two select
statements e.g.

SELECT *
FROM first_table

SELECT *
FROM second_table

The first_table has lots and lots of rows, so I only want to return the
first 100 from any start point. However, in the second table I want to
return all rows.

I have used a DataAdapter to fill a dataset, and implemented the overload
that allows you supply a DataSet, Start Record, Max Records and Source
Table.

If I specify a start record and a maximum number of records, will this
record criteria apply to the first SELECT, the last SELECT or BOTH?

Landers
 
M

Miha Markic [MVP C#]

Why don't you rather modify your stored procedure to return desired number
of records?
If you do it on the adapter side then all records will still be fetched to
client, they won't be inserted in dataset but they will travel across the
wire.
 
M

Marina Levit [MVP]

I don't know the answer off the top of my head (I would guess that it would
apply to all queries), however, this should be fairly straight forward to
test and see what happens.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top