Server-side cursor equivalent...

J

José Araujo

Hi,

I am new in ADO.NET, what is the way that i am supposed to do what i
accomplished with server-side cursor in ADO?

I have a master list (customers) that i want to show in a grid, but i don't
want the program to load all the records at the begging, but to take it from
the server when it needs them.


Thanks, José Araujo.
 
W

William \(Bill\) Vaughn

While you can create a server-side cursor (and it can be done with ADO.NET
if you're running SQL Server or Oracle) it fetches the entire keyset to a
cache on the server where it remains taking up space until you close the
cursor or the connection.
ADO.NET is designed to work in a disconnected fashion. Generally, we
recommend that you create a query that fetches the data in blocks as the
user browses through the grid. This way you make fewer round trips (the
server-side cursor requires a trip for each row unless you're clever and
want to write a bunch of caching code), and you get better overall
performance.

hth

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
MVP, hRD
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 

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