J
John Urberg
I'm porting some Java code that uses JDBC to C#. One of the methods
allows you to start at a relative position in a result set and return n
rows. Here's some of that code:
Collection LoadResults(ResultSet rs, int start, int rows) {
int count = 0;
rs.absolute(start);
while (rs.next()) {
if (++count > rows) break;
<load data into results collection>
}
return results;
}
In my converted code, I would like to load the results of the SQL
select into a DataSet, starting at row "start" and only loading "rows"
number of rows.
How would I do this in C#?
Thanks,
John
allows you to start at a relative position in a result set and return n
rows. Here's some of that code:
Collection LoadResults(ResultSet rs, int start, int rows) {
int count = 0;
rs.absolute(start);
while (rs.next()) {
if (++count > rows) break;
<load data into results collection>
}
return results;
}
In my converted code, I would like to load the results of the SQL
select into a DataSet, starting at row "start" and only loading "rows"
number of rows.
How would I do this in C#?
Thanks,
John