Re: Bidirectional cursor navigation

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



ADO classic is different. It has more features than ADO.NET in some
respects. It has async operations (now) (including async connections), it
has server-side AND client-side cursors, control over concurrency and lots
of people know how to use it. ADO.NET has other features and is still
evolving. It's lighter, faster and must be restricted to OLE DB provider
issues or DLL hell. It's different and not as many people know how to use
it. It's my (our) job to make ADO.NET easier for the ADOc developers to use
and migrate their applications.
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
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.
__________________________________

"Sahil Malik [MVP]" <contactmethrumyblog@xxxxxxxxxx> wrote in message
news:%23RScGzBUFHA.2172@xxxxxxxxxxxxxxxxxxxxxxx
> Okay, I agree with that - not every app has the need to scale to crazy
> proportions.
>
> Also, ADO.NET does not limit you to disconnected architectures. As you
> point
> out, you can still do server side cursors using ADO.NET - just wrap it in
> a
> SqlCommand (right?).
>
> But when someone says ADO classic is better than ADO.NET - well .. !!! :-)
> (Okay you can really argue ANYTHING, but c'mon !!)
>
> - Sahil Malik [MVP]
> http://codebetter.com/blogs/sahil.malik/
>
>
>
>
> "William (Bill) Vaughn" <billvaRemoveThis@xxxxxxxxxx> wrote in message
> news:eSRk3#AUFHA.3392@xxxxxxxxxxxxxxxxxxxxxxx
>> Ah, I have to disagree here. There are plenty of success stories with
>> "connected" architectures. Remember that most applications written before
>> the wonders of the web implemented connected architectures. It's simply a
>> matter of managing the data in a different way. Not every application
> needs
>> to scale to 5000 or 5 million users. Consider that the vast majority of
>> multi user applications support fewer than 200 users--often far fewer.
>> SQL
>> Server (using connected architectures) can support thousands of users (we
>> did so with a 386/33 box with 4MB). These application sometimes created
>> server-side cursors but these did not span entire tables as some would
> have
>> you do today with disconnected architectures. Up until ADO.NET, ADO
> classic
>> supported server-side cursors very nicely. As a matter of fact, you can
>> still implement them today using the ANSI SQL CREATE CURSOR syntax--I'll
>> show how to do this at my DevTeach workshop in Montreal in June.
>>
>> Sure, any scalable architectures (including connected or disconnected or
> web
>> services) requires discipline and applications that don't bring the
> server,
>> web or client to its knees doing dumb stuff.
>>
>>
>>
>> --
>> ____________________________________
>> William (Bill) Vaughn
>> Author, Mentor, Consultant
>> Microsoft MVP
>> www.betav.com/blog/billva
>> 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.
>> __________________________________
>>
>> "Sahil Malik [MVP]" <contactmethrumyblog@xxxxxxxxxx> wrote in message
>> news:%23oJXR%23RTFHA.3244@xxxxxxxxxxxxxxxxxxxxxxx
>> >> I think if the database client app and server is in the system, is it
>> >> good
>> >> not to have disconnect way of accessing the data?
>> >
>> > I disagree. Continously connected architectures are a recipe for
> disaster.
>> > Those architectures donot scale and cause a whole lot of other issues.
>> >
>> > If still you insisted on doing connected architecture, including server
>> > side cursors, you could still use SqlCommand.ExecuteNonQuery.
>> >
>> > - Sahil Malik [MVP]
>> > http://codebetter.com/blogs/sahil.malik/
>> >
>> >
>> >
>> >
>> > "Hari" <Hari@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> > news:3CEFC9E9-02BF-4DCD-839F-ACDA077E5726@xxxxxxxxxxxxxxxx
>> >>I think if the database client app and server is in the system, is it
> good
>> >> not to have disconnect way of accessing the data? Hope if some of the
>> >> classes
>> >> are with ado.net it would be much easier for us???
>> >>
>> >> Thanks Sahil
>> >>
>> >> Hari
>> >>
>> >>
>> >>
>> >> "Sahil Malik [MVP]" wrote:
>> >>
>> >>> Datasets are disconnected. It wouldn't make any sense paging in a
>> >>> disconnected architecture that already stores all the data in memory.
>> >>> No you didn't make a mistake by moving to ADO.NET.
>> >>>
>> >>> - Sahil Malik [MVP]
>> >>> http://codebetter.com/blogs/sahil.malik/
>> >>>
>> >>>
>> >>>
>> >>> "Hari" <Hari@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> >>> news:2C70D407-052F-4DF7-BB90-7747663EB5EA@xxxxxxxxxxxxxxxx
>> >>> > Its standalone application with MSDE2000 server.
>> >>> > Also could you clarify me, is there any reason , ado.NET is not
>> >>> implemented
>> >>> > this paging/caching logic in the dataset classes? since ado
> recordset
>> >>> takes
>> >>> > care of this client side memory management, so i did a bad decision
>> >>> > moving
>> >>> to
>> >>> > ado.net???
>> >>> >
>> >>> > Hari
>> >>> >
>> >>> > "Sahil Malik [MVP]" wrote:
>> >>> >
>> >>> > > You can use one of the overloads of dataadapter.fill to fill in
> only
>> >>> > > a
>> >>> > > subset of the rows you are interested in.
>> >>> > > Alternatively, you could implement that logic inside your stored
>> >>> procedure.
>> >>> > >
>> >>> > > Is this a web based app?
>> >>> > >
>> >>> > > - Sahil Malik [MVP]
>> >>> > > http://codebetter.com/blogs/sahil.malik/
>> >>> > >
>> >>> > >
>> >>> > >
>> >>> > > "Hari" <Hari@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> >>> > > news:EBF71F96-4DDA-48DD-81DE-6A8E2DCE0BA3@xxxxxxxxxxxxxxxx
>> >>> > > > So that mean if i need to navigate a largeset of rows in my
>> >>> application,
>> >>> > > do i
>> >>> > > > have to write paging/caching logic in my application? I
>> >>> > > > couldn't
>> >>> > > > find
>> >>> the
>> >>> > > > Dataset classes in ADO.NET support caching/paging? Please
> suggest
>> >>> > > > me
>> >>> some
>> >>> > > > alternative for the following problem :
>> >>> > > >
>> >>> > > > - table contains 50,000 rows
>> >>> > > > - the sample query is : select * from table1 where crietria1
>> >>> > > > and
>> >>> criteria2
>> >>> > > > 9may returns 40,000 rows
>> >>> > > > - My UI controls need to navigate forward/backward through
>> >>> > > > records,
>> >>> but i
>> >>> > > > don't want to load the 40,000 rows in memory at a time(per say
>> >>> > > > using
>> >>> > > dataset
>> >>> > > > or datatable)
>> >>> > > >
>> >>> > > > I could find in ado recordset supports to do this type of
>> >>> > > > scenario. bu
>> >>> i
>> >>> > > > couldn't find similar with ado.net classes. (means with new
>> >>> > > > framework
>> >>> do i
>> >>> > > > need to write more code???)
>> >>> > > >
>> >>> > > > Hari
>> >>> > > >
>> >>> > > >
>> >>> > > >
>> >>> > > >
>> >>> > > >
>> >>> > > >
>> >>> > > > "Sahil Malik [MVP]" wrote:
>> >>> > > >
>> >>> > > > > You can - using SqlCommand directly. But you shouldn't !!
>> >>> > > > > Cursors
>> >>> > > encourage
>> >>> > > > > a constantly connected application, which is bad for
> performance
>> >>> > > > > in
>> >>> > > highly
>> >>> > > > > concurrent applications.
>> >>> > > > >
>> >>> > > > > - Sahil Malik [MVP]
>> >>> > > > > http://codebetter.com/blogs/sahil.malik/
>> >>> > > > >
>> >>> > > > >
>> >>> > > > >
>> >>> > > > >
>> >>> > > > >
>> >>> > > > > "Hari" <Hari@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> >>> > > > > news:3A9E6734-CED1-4561-957E-8ED309966655@xxxxxxxxxxxxxxxx
>> >>> > > > > > Hi,
>> >>> > > > > >
>> >>> > > > > > Is there any class supports bidirectional cursor in the
>> >>> > > > > > ADO.NEt
>> >>> > > framework?
>> >>> > > > > I
>> >>> > > > > > was looking some of the samples and only talks about
>> >>> > > > > > SqlDataReader
>> >>> > > > > (forward
>> >>> > > > > > only cursor).
>> >>> > > > > >
>> >>> > > > > > Or is there any way i can make use of database cursors in
>> >>> > > > > > my
>> >>> dotnet
>> >>> > > > > > application to navigate the records from a table.?
>> >>> > > > > >
>> >>> > > > > > Hari
>> >>> > > > >
>> >>> > > > >
>> >>> > > > >
>> >>> > >
>> >>> > >
>> >>> > >
>> >>>
>> >>>
>> >>>
>> >
>> >
>>
>>
>
>


.



Relevant Pages

  • Re: ADO - Bad when it is time to Optimize
    ... You ought to bear in mind that SQL Server is such that you can only have ... You cannot have 2 or more for the same connections. ... types of other cursors. ... I use Server-sided, ForwardOnly cursor a lot, but I tend to use them ...
    (microsoft.public.data.ado)
  • Re: SBS 2003 IIS BASED SERVICES FAIL INTERMITTENTLY
    ... If I read your post correctly, you have a switch where the SBS ... Run DHCP server on your SBS, and set all client machine nics to dynamic. ... Once you have your nics configured, run the Connect to the Internet wizard, ... QUESTION1 - what is REFUSING CONNECTIONS? ...
    (microsoft.public.windows.server.sbs)
  • Re: SBS Exchange 2003: too many "Current Sessions" opened
    ... So far everything is good and now I'm just monitoring my exchange. ... get the SMTP service to stop hanging in the first place. ... won't have dead connections. ... work for now until I put into production new server hardware with sbs 2003 ...
    (microsoft.public.windows.server.sbs)
  • Re: SBS Exchange 2003: too many "Current Sessions" opened
    ... You really should go through the steps I posted and get the SMTP service to stop hanging in the first place. ... You'll be happier, you won't be clubbing your server every day with a kill script, and you won't have dead connections. ... You do *not* need to restart the server, ...
    (microsoft.public.windows.server.sbs)
  • Access 2007->SQL Server2005 "connection was forcibly closed",GNE 1
    ... I have a very big problem connecting an SQL ... changing number of clients using the SQL Server with this frontend at the ... connection pooling or if these connections are separated connections). ...
    (microsoft.public.sqlserver.connect)