John, what you're describing can be done against an Access/JET/ACE or a SQL
Server database but if not done correctly, only one user will be able to
access the data at any one time. When you execute a query
SELECT name, address, city, state FROM Customers WHERE State = 'TX'
ORDER BY CountyCode, Name
you'll return all of the customers in Texas--one row at a time if you use a
DataReader. However, until you fetch the last row, the database engine will
(probably) impose "share locks" on the data rows (and pages) that will
prevent changes to the underlying rows. For this reason (and many others) we
generally fetch the rows into a server-side cursor or into a client-side
structure like a DataTable or TableAdapter using a Fill or Load method. This
releases the locks and lets other users access the data.
The query shown above can be fed with one or more Parameters (via the
Command object) to focus the rowset--fewer rows mean fewer locks and less
overhead for everyone.
--
__________________________________________________________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker’s Guide to Visual Studio and SQL Server (7th Edition)
http://betav.com http://betav.com/blog/billva
____________________________________________________________________________________________
"John" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Its the order in which I pick next or previous record in sequence.
>
> Regards
>
> "sloan" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> If you're only bringing back 1 records at a time, why do you need an
>> ORDER BY?
>>
>>
>> If you're bent on using access (actually "JET database" is a better term
>> for it, since you won't be using the program Microsoft Access)......then
>> look here:
>> http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!176.entry
>>
>> You CAN build an application that starts in Access, but doesn't paint you
>> into a corner.
>>
>> ....................
>>
>> What version of the Framework are you considering using??
>>
>>
>>
>> "John" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> Hi
>>>
>>> I need to design a winform db app preferably with bound controls. The
>>> app will pick only one record at a time from backend db. The sql query
>>> that brings data from backend needs to be flexible in terms of WHERE and
>>> ORDER BY clauses. What data access method should I use?
>>>
>>> Many Thanks
>>>
>>> Regards
>>>
>>
>>
>
>