HighTechTalks DotNet Forums  

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

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss How to fill dataset with just one row at a time? in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
IMRAN SAROIA
 
Posts: n/a

Default How to fill dataset with just one row at a time? - 05-19-2004 , 10:22 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



Reply With Quote
  #2  
Old   
Eric Marvets
 
Posts: n/a

Default Re: How to fill dataset with just one row at a time? - 05-21-2004 , 09:37 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 (AT) bangproject (DOT) com for Information on Our Architecture and
Mentoring Services

</shameless self promotion>

"IMRAN SAROIA" <imransaroia2000 (AT) hotmail (DOT) com> wrote

Quote:
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





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.