473,748 Members | 2,328 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Database access sucks!

It is just me or has MS created some of the worst ways to access and display
data?

You can use a DataSet, but if you want to sort or filter the data to must
use a DataView which is created from a DataSet.

But, if you sort by using the Grid (clicking the header) you can no longer
use the DataSet (or maybe the DataView, if that is what you are using) to
locate the record that the user has selected!!

You have to write code to get the current position...this should just be a
property!!

Also, can someone explain to me why does the FindRows return
DataRowView...w hat can you do with a DataRowView, I haven't figure out a way
to load this data into a new DataView or a DataSet (if there is a way,
please explain it to me). It seems that the FindRows should have just
return a new DataView!!

I understand why all of the necessary data access components are broken out
into many different parts, but why not ALSO build a component that
encompasses all of the components and use that as an "enhanced DataSet" that
can also be used as a Datasource to the grid and other components.(Thi s is
something that I have already done for myself.)

Maybe it's because I'm coming from Borland and expect top notch development
tools/comopnents...wh ere there VCL Framework and Data Access components were
THE BEST!!!

But I had to leave Borland because their management said that they were
killing the Borland C++ Builder (BCB) product about 6 months ago. But, they
just recently announced that they had a change of heart and will now support
BCB.
That's a little to flaky for me, so I jumped ship and moved to MS.

But with what I have seen in VS.NET (C#), I might have to talk my chances
with Borland.

Jul 21 '05 #1
49 3201
If anything I think your complaint applies to the DataGrid component - not
ADO.NET.

Actually, you can bind a grid to all sorts of stuff - inlcuding a strongly
typed collection. dataViews are actually based on DataTables not datasets.

There's nothign stopping you from subclassing the grid to get the
functionality that you want. "It should just be a property" I guess,
unless you want multiselect which would entail two properties - or one that
you would need to iterate through.

The DataRowView is necessary b/c it can show four different states of the
datarow - Default - Current, Original and Proposed which can be very handy
particularly in a disconnected scenario where you want to show users the
original value and the stuff they changed - or just want to show them the
changed rows.

DataTable.Selec t for instance will give you an array of the rows that are
found - which in turn can be used to bind to a grid. This may be helpful.
You can set the RowFilter of a DataView to whatever search conditions you
want so only those show.

I admit the dataGrid for Winforms leaves a little to be desired, but again
this has Nothing to do with ADO.NET. I think you'll find it's easy enough
to write a few of your own controls (or use Infragistics for instance) that
you can reuse and tailor to your particular needs.

HTH,

Bill

--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Relaxin" <me@yourhouse.c om> wrote in message
news:eP******** ******@TK2MSFTN GP15.phx.gbl...
It is just me or has MS created some of the worst ways to access and display data?

You can use a DataSet, but if you want to sort or filter the data to must
use a DataView which is created from a DataSet.

But, if you sort by using the Grid (clicking the header) you can no longer
use the DataSet (or maybe the DataView, if that is what you are using) to
locate the record that the user has selected!!

You have to write code to get the current position...this should just be a
property!!

Also, can someone explain to me why does the FindRows return
DataRowView...w hat can you do with a DataRowView, I haven't figure out a way to load this data into a new DataView or a DataSet (if there is a way,
please explain it to me). It seems that the FindRows should have just
return a new DataView!!

I understand why all of the necessary data access components are broken out into many different parts, but why not ALSO build a component that
encompasses all of the components and use that as an "enhanced DataSet" that can also be used as a Datasource to the grid and other components.(Thi s is
something that I have already done for myself.)

Maybe it's because I'm coming from Borland and expect top notch development tools/comopnents...wh ere there VCL Framework and Data Access components were THE BEST!!!

But I had to leave Borland because their management said that they were
killing the Borland C++ Builder (BCB) product about 6 months ago. But, they just recently announced that they had a change of heart and will now support BCB.
That's a little to flaky for me, so I jumped ship and moved to MS.

But with what I have seen in VS.NET (C#), I might have to talk my chances
with Borland.

Jul 21 '05 #2
You may find this link helpful as well
http://weblogs.asp.net/codemouse/
--
W.G. Ryan MVP (Windows Embedded)

TiBA Solutions
www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Relaxin" <me@yourhouse.c om> wrote in message
news:eP******** ******@TK2MSFTN GP15.phx.gbl...
It is just me or has MS created some of the worst ways to access and display data?

You can use a DataSet, but if you want to sort or filter the data to must
use a DataView which is created from a DataSet.

But, if you sort by using the Grid (clicking the header) you can no longer
use the DataSet (or maybe the DataView, if that is what you are using) to
locate the record that the user has selected!!

You have to write code to get the current position...this should just be a
property!!

Also, can someone explain to me why does the FindRows return
DataRowView...w hat can you do with a DataRowView, I haven't figure out a way to load this data into a new DataView or a DataSet (if there is a way,
please explain it to me). It seems that the FindRows should have just
return a new DataView!!

I understand why all of the necessary data access components are broken out into many different parts, but why not ALSO build a component that
encompasses all of the components and use that as an "enhanced DataSet" that can also be used as a Datasource to the grid and other components.(Thi s is
something that I have already done for myself.)

Maybe it's because I'm coming from Borland and expect top notch development tools/comopnents...wh ere there VCL Framework and Data Access components were THE BEST!!!

But I had to leave Borland because their management said that they were
killing the Borland C++ Builder (BCB) product about 6 months ago. But, they just recently announced that they had a change of heart and will now support BCB.
That's a little to flaky for me, so I jumped ship and moved to MS.

But with what I have seen in VS.NET (C#), I might have to talk my chances
with Borland.

Jul 21 '05 #3
>It is just me or has MS created some of the worst ways to access and display
data?
It's just you! :-) Hey, you almost *ASKED* for that! ;-)

Seriously, ADO.NET might not be totally intuitive at first, but it
really rocks - it packs a LOT of power!
You can use a DataSet, but if you want to sort or filter the data to must
use a DataView which is created from a DataSet.
You can use a DataView (based and created from a *DataTable* - not a
DataSet - watch your terms!! You gotta be EXACT to get things right!)
to sort and filter the data in any way, shape or form.

Heck, you can have your data stored in a DataTable, and look at it
through a dozen different data views - filtering and sorting to your
hearts' content! How powerful is that?
Also, can someone explain to me why does the FindRows return
DataRowView... what can you do with a DataRowView, I haven't figure out a way
to load this data into a new DataView or a DataSet


A DataRowView is just like a DataRow - only for a view. If you need
the underlying DataRow, just grab it from the .Row property of the
DataRowView - how easy is that?

I really think you ought to put a bit more brain power into learning
and understanding ADO.NET - you haven't grasped all the power behind
it just yet! Read a book, read the online help, study the samples -
it'll be worth it!

Marc
=============== =============== =============== =============== ====
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)i nova.ch
Jul 21 '05 #4
Marc,

It's just you! :-) Hey, you almost *ASKED* for that! ;-)

Why you wrote that. (I first did want you to give an answer and than answer
that again with). "It was only that I could not now".

:-)

Cor
Jul 21 '05 #5
----- Original Message -----
From: "Marc Scheuner [MVP ADSI]" <m.********@ino va.SPAMBEGONE.c h>
Newsgroups: microsoft.publi c.dotnet.genera l
Sent: Tuesday, December 28, 2004 11:00 PM
Subject: Re: Database access sucks! A DataRowView is just like a DataRow - only for a view. If you need
the underlying DataRow, just grab it from the .Row property of the
DataRowView - how easy is that?
That is exactly my point, why not just have FindRows return a DataView!!
I really think you ought to put a bit more brain power into learning
and understanding ADO.NET - you haven't grasped all the power behind
it just yet! Read a book, read the online help, study the samples -
it'll be worth it!

I have and I've used the best. I also used and created components from
OLEDB.
ADO.NET has alot to be desired and they are also missing functionality that
OLEDB had.
Such as the different resultset types (Keyset, dynamic, forwardonly,
etc...).

With the .NET dataset, it forces you to load all of the data to the
client...this doesn't work so well when you database is mainly made up of
images!

I hate it when the vendor (MS) tells me how I should write my code by
removing functionality and not replacing it with something similar.

----- Original Message -----
From: "Marc Scheuner [MVP ADSI]" <m.********@ino va.SPAMBEGONE.c h>
Newsgroups: microsoft.publi c.dotnet.genera l
Sent: Tuesday, December 28, 2004 11:00 PM
Subject: Re: Database access sucks!

It is just me or has MS created some of the worst ways to access and
display
data?


It's just you! :-) Hey, you almost *ASKED* for that! ;-)

Seriously, ADO.NET might not be totally intuitive at first, but it
really rocks - it packs a LOT of power!
You can use a DataSet, but if you want to sort or filter the data to must
use a DataView which is created from a DataSet.


You can use a DataView (based and created from a *DataTable* - not a
DataSet - watch your terms!! You gotta be EXACT to get things right!)
to sort and filter the data in any way, shape or form.

Heck, you can have your data stored in a DataTable, and look at it
through a dozen different data views - filtering and sorting to your
hearts' content! How powerful is that?
Also, can someone explain to me why does the FindRows return
DataRowView.. .what can you do with a DataRowView, I haven't figure out a
way
to load this data into a new DataView or a DataSet


A DataRowView is just like a DataRow - only for a view. If you need
the underlying DataRow, just grab it from the .Row property of the
DataRowView - how easy is that?

I really think you ought to put a bit more brain power into learning
and understanding ADO.NET - you haven't grasped all the power behind
it just yet! Read a book, read the online help, study the samples -
it'll be worth it!

Marc
=============== =============== =============== =============== ====
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)i nova.ch

Jul 21 '05 #6
Relaxin,

Probably is your major mistake although you are not writing it, that you
compare a dataset with a recordset, what is not the case. A recordset is
comparable with a datatable.

The datatable has a lot of extra's above the recordset by instance a
dataview, with can show you data in a lot of ways. This newsgroup is not the
part to show all advantages from a datatable above a recordset.

And not to tell that there are only advantages in some cases can the
standard optimistic concurrency in my opinion be a disadvantage, however
modern disconnected use makes pessimistic concurrency in my opinion very
hard to do and should only be done when it is really needed

To select one or more datarows from a datatable you can use the
datatable.selec t
You can as well find a row in the datarow collection in a datatable by using
a datarowcollecti on.find
Or get a selection by using the dataview.rowfil ter
Or get a position of a datarow in a dataview by the dataview.find

You can use as well of course to narrow your datatable the different select
where clauses.

Maybe you can say it was more simple with the recordset because it had not
all those possibilities. The same as people who went from the T Ford to a
more advantage car. The T Ford was well made however nobody forced those
people to use another car.

Just my thought,

Cor
Jul 21 '05 #7
The datatable has a lot of extra's above the recordset by instance a
dataview, with can show you data in a lot of ways. This newsgroup is not
the part to show all advantages from a datatable above a recordset.
A recordset is comparible to a datatable (in your example) if you are going
to use the dataset to create the dataview.
You could also use other oledb components and functions to sort, filter,
etc.. to create the same "dataview" "like" data.
So you are making a mute point here.
And not to tell that there are only advantages in some cases can the
standard optimistic concurrency in my opinion be a disadvantage, however
modern disconnected use makes pessimistic concurrency in my opinion very
hard to do and should only be done when it is really needed
And where are you coming up with this "pessimisti c concurrency", I have
always used optimistic concurrency.
In fact OLEDB allowed you to use SQL Servers rowversion (1 field) as a
method to update a record.
ADO.NET will use a WHERE clause of all of the columns within your SELECT
statement.
This is a very inefficient why to update a record!

To select one or more datarows from a datatable you can use the
datatable.selec t
You can as well find a row in the datarow collection in a datatable by
using a datarowcollecti on.find
Or get a selection by using the dataview.rowfil ter
Or get a position of a datarow in a dataview by the dataview.find

You can use as well of course to narrow your datatable the different
select where clauses.

Maybe you can say it was more simple with the recordset because it had not
all those possibilities.
Your statements are "trying" to limit my argument to the recordset, but you
have used a DataSet, DataTable, DataView and a DataRowCollecti on!!
Lets be fair about this, OLEDB and ADO.NET are both comprised of classes and
the classes are designed to work together, except MS has removed alot of
functionality from some of the ADO.NET classes.

"Cor Ligthert" <no************ @planet.nl> wrote in message
news:Oc******** ******@tk2msftn gp13.phx.gbl... Relaxin,

Probably is your major mistake although you are not writing it, that you
compare a dataset with a recordset, what is not the case. A recordset is
comparable with a datatable.

The datatable has a lot of extra's above the recordset by instance a
dataview, with can show you data in a lot of ways. This newsgroup is not
the part to show all advantages from a datatable above a recordset.

And not to tell that there are only advantages in some cases can the
standard optimistic concurrency in my opinion be a disadvantage, however
modern disconnected use makes pessimistic concurrency in my opinion very
hard to do and should only be done when it is really needed

To select one or more datarows from a datatable you can use the
datatable.selec t
You can as well find a row in the datarow collection in a datatable by
using a datarowcollecti on.find
Or get a selection by using the dataview.rowfil ter
Or get a position of a datarow in a dataview by the dataview.find

You can use as well of course to narrow your datatable the different
select where clauses.

Maybe you can say it was more simple with the recordset because it had not
all those possibilities. The same as people who went from the T Ford to a
more advantage car. The T Ford was well made however nobody forced those
people to use another car.

Just my thought,

Cor

Jul 21 '05 #8
Relaxin,

I get more and more the idea that you don't know what is a dataset,
datatable, datarow, dataview and/or a datarowview in ADONET. Can you explain
what they are in your opinion.

Because when we talk about different things it is hard to make a discussion.

Cor
Jul 21 '05 #9
I know EXACTLY what they are, but since you asked for it.

The DataSet contains 1 or more DataTables.
A DataTable contains 1 or more DataRows.
A DataRow contains 1 or more DataColumns.
A DataView is a subset and/or sorted view of the DataSet.
I'm still unsure what the purpose of the DataRowViews is, but I know
DataRowView.Fin dRows returns it.

Like I mentioned earlier, I have created my own components to handle things
the way they should be.

I'm mainly venting because I would have expected a better design from MS,
but I guess if you(most people in this NG, I assume) haven't seen anything
other than MS, you wouldn't have anything to compare it to.
So of course you would think that this design is great.

Give Borland a try when you get a chance, you will see a hell of a design.
You can tell that Borland tools are Developed By Developers for Developers.

MS is designed for cash only!!
"Cor Ligthert" <no************ @planet.nl> wrote in message
news:Oq******** ******@TK2MSFTN GP09.phx.gbl...
Relaxin,

I get more and more the idea that you don't know what is a dataset,
datatable, datarow, dataview and/or a datarowview in ADONET. Can you
explain what they are in your opinion.

Because when we talk about different things it is hard to make a
discussion.

Cor

Jul 21 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1130
by: Grant Stanley | last post by:
I'm developing an application in VS.Net 2003 using C#, which uses Crystal Reports. When creating each report, crystal asks where the database to use is, so I specify our SQL server using the ADO option. The problem is that these database settings seem to get compiled into the report, so when we take the application to our client it won't work on their systems. Before running each report I run some code which is ment to reset the...
49
1839
by: Relaxin | last post by:
It is just me or has MS created some of the worst ways to access and display data? You can use a DataSet, but if you want to sort or filter the data to must use a DataView which is created from a DataSet. But, if you sort by using the Grid (clicking the header) you can no longer use the DataSet (or maybe the DataView, if that is what you are using) to locate the record that the user has selected!!
3
1573
by: windandwaves | last post by:
Hi Folk I have been asked to create an e-commerce website, where we need to connect to an SQL database. The database is used to run their POS in several branches. As this database is on the company server and we are hosting the website with a webhost we have to solve an communication issue. Here are the options that I can see:
74
3787
by: ljh | last post by:
Why would you choose SQL Express (which requires an installed application to work) over the simplicity of an Access database which has no dependencies?
25
2801
by: pereges | last post by:
Hello, I'm trying to build a database driven website for a library management system. The database is stored on a remote server which all of my team mates can access. I've installed MySQL, PHP and Apache on my machine. I'm a beginner and I really don't understand how to proceed. My biggest problem is how to connect to the database on remote mysql server ? Does php allow this kind of thing ? I'm interested in a web interface on my machine...
0
8983
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9528
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9359
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9236
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8235
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4592
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4863
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3298
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.