Groups | Blog | Home
all groups > dotnet academic > may 2004 >

dotnet academic : How to fill dataset with just one row at a time?


IMRAN SAROIA
5/19/2004 7:22:31 PM
Hi!

I want to select specific row from Database in Select
Query. Can any one adivse?

E.g., in selection criteria I want to mention row to retrieve.
Are there any alternatives. I donot want to use postion property.
I want to fill Dataset with just one row at a time.

Please adivse!

Regards

Imran

Eric Marvets
5/21/2004 9:37:38 PM
If you use a stored proc or a parameterized query, you could pass in a
parameter to the SelectCommand.

If you do not know the primary keys in which to query for a single item at a
time, you can use a query like 'select top 1 .....where ID >
@lastIDRetrieved order by ID' using 0 as your starting value for
@lastIDRetreived.

--
Eric Marvets
Principal Consultant

the bang project

<shameless self promotion>

Email sales@bangproject.com for Information on Our Architecture and
Mentoring Services

</shameless self promotion>

[quoted text, click to view]

AddThis Social Bookmark Button