ADO.net question - Connected Datasets

  • Thread starter Thread starter Woody Splawn
  • Start date Start date
No, why should it?
There is already some support through DataReader if you need an active
cursor for reading.
 
No, why should it?

It occured to me that in some client/server applications a connected dataset
may be preferable to non connected; that, and some of the early books
written about ADO.net suggested that in the next version of ADO.net that
support for connected datasests were likely. If not, one book suggests,
"there will be applications that ADO.net can't handle." (Mastering Visual
Basic .NET. Evangelos Petroutsos. Bottom, pg 927)
 
Woody:

I guess it depends on how you define "disconnected dataset" but like Miha
said, this is totally against the grain on the dataset. Currently, a dataset
can be populated through code, from an XML file, from a CSV file, a web
service or hitting any of a number of databases. You can pull data from one
and put it in another using a dataadapter. So there's no real way to make
it connected across the board.

Since it caches the data locally, if you had a connected version of it,
you'd have two copies of the data, one on the back end and one locally.
This would give you essentially the worst of both worlds incurring the most
cost in every respect. There is a datareader now that is 'connected' as are
the executeXXX commands, but remember that a dataset doesn't care one bit
where it gets its data and in many instances doe3sn't use a backend at all.

There was going to be a Resultset which is probably what you heard about,
but the potential (and practical guarantee) of misuse took it off the table.
 
HI Woody,

Now that you mention, if I recall properly, they were mentioning a concept
of connected DataTable but later it was dropped.
Not sure if I am 100% right though.
 
Every version of ADO.NET has supported "connected" architectures. If you
think of the DataSet as a rowset repository then it too can work in a
"connected" application. No, unlike ADO classic, the DataSet does not expose
the rows from a server-side cursor, but there is nothing stopping you from
creating one on your own. I wrote a paper on this some time ago and I'll
include this approach in my new book but essentially, you can call the ANSI
CREATE CURSOR calls to setup a live server-side cursor and return rows from
it. Other cursor-less approaches are really far easier. Simply fetch
individual rows (or small rowsets) as you need them getting fresh data each
time. Essentially, this is what ADO classic did anyway. SQL Server and all
of the serious DBMS engines are well equipped to do this and do so very
quickly.
That said, you have to consider if a "connected" approach is what you really
want to do. Now-a-days most folks don't take this approach as it's not
applicable to ASP (at all) and it does not make sense in many Windows forms
applications that have to scale (very) widely. Since the vast majority of
Windows forms applications don't have to scale beyond a couple hundred
users, the server-side cursor approach or the few-rows-just-in-time approach
can work fine. Yes, ADO.NET does not help one bit with server-side cursors.
MS tried to get this functionality added back in, but failed to get it done.
Perhaps next time.

hth

--
____________________________________
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.
__________________________________
 
I tried using a DataSet instead of GDI+ once, to try and draw a blue cuckoo
bird drinking a diet coke and rolling papers balls outside of the microsoft
office. The cuckoo needed to have a blue linear gradient. THere is NO
Doubt that ADO.NET is totally impotent for drawing cuckoo birds with linear
gradients. I even tried it with a DataReader and it still sucked. If I
would have had a classic ADO recordset though Sahil - it would have been
no problem - heck, I probably could have thrown in a few extra colors too.
Drawing with Recordsets is a lot easier than it is with DataSets (and don't
even get me started on trying to draw with a DataRelation, creating linear
gradients with a datarelation is practically impossible).
 
LOL :-)

Wait wait .. I'll try and answer like (you know who)

In my opinion your drawing through GDI is not having be something as what
may say here Bill. In that opinion when you do so doing a recordset you are
incorrect in saying that gradient on a dataset isn't the same as the
gradient on a cuckoo with lesser or more colors and drawing recordsets on a
cuckoo is something done for rolling paper balls which are drinking paper
balls, so in essence I am not disagreeing with you but I think you are
incorrect, so please clarify or post in the right newsgroup or just don't
cross post.

LOL ;-)

SM



W.G. Ryan MVP said:
I tried using a DataSet instead of GDI+ once, to try and draw a blue cuckoo
bird drinking a diet coke and rolling papers balls outside of the microsoft
office. The cuckoo needed to have a blue linear gradient. THere is NO
Doubt that ADO.NET is totally impotent for drawing cuckoo birds with linear
gradients. I even tried it with a DataReader and it still sucked. If I
would have had a classic ADO recordset though Sahil - it would have been
no problem - heck, I probably could have thrown in a few extra colors too.
Drawing with Recordsets is a lot easier than it is with DataSets (and don't
even get me started on trying to draw with a DataRelation, creating linear
gradients with a datarelation is practically impossible).
Sahil Malik said:
I'd like to hear of an example of an application that ADO.NET cannot
handle.

Of course there would be situations where improvements can be made, but
"Connected Dataset" is like saying "Hot Cold Tea" .. doesn't make sense.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.malik/archive/2005/05/13/63199.aspx
--------------------------------------------------------------------------
--
 
ROFLMAO
Sahil Malik said:
LOL :-)

Wait wait .. I'll try and answer like (you know who)

In my opinion your drawing through GDI is not having be something as what
may say here Bill. In that opinion when you do so doing a recordset you
are
incorrect in saying that gradient on a dataset isn't the same as the
gradient on a cuckoo with lesser or more colors and drawing recordsets on
a
cuckoo is something done for rolling paper balls which are drinking paper
balls, so in essence I am not disagreeing with you but I think you are
incorrect, so please clarify or post in the right newsgroup or just don't
cross post.

LOL ;-)

SM
 
Ditto. Now don't be mean. He means to mean well--I think.

--
____________________________________
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.
__________________________________
 
Of course there would be situations where improvements can be made, but
"Connected Dataset" is like saying "Hot Cold Tea" .. doesn't make sense.
Maybe not in your culture, however that is not the only culture in the
world.

https://www.ppsrx.com/ppsrx/hn/Recipe/Cold_Tea_Noodles.htm

So asking for a "connected" dataset is not out of sense for me, I can be
translate as a collection of connected recordsets which (can) have
datarelations and/or constrains.

If these things are not asked in by instance these newsgroups, than we will
never see innovation. The dataset is not disconnected by reason that
connection is a bad approach. It is disconnected because we (people) are not
yet able to make it connected in situations where it can be connected.

However, probably will there something as a connected dataset in future to
be used everywhere. In fact would it be a better approach, there is
currently only a limitation by the wide of the dataconnection and the state
of the (database) software.

I find it strange that in this newsgroup is made a joke of such a correct
question.

Just my opinion

Cor
 
You caught that huh ;-) ?
William (Bill) Vaughn said:
Ditto. Now don't be mean. He means to mean well--I think.

--
____________________________________
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.
__________________________________
 
Back
Top