473,770 Members | 3,710 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.

Nov 22 '05
49 1850
Relaxin wrote:
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.


Here's what I ended up doing.

For more complex data tasks, instead of using a DataReader ( forward only,
no search ) or DataView ( no sort, no search ) when I need to manipulate
and change the data locally, I run a sql command as xml, and load it into
an XmlDocument.

It's disconnected.

It has latency.

And I can search ( and update it ) using XPath queries.

If I want to update the database with changes, no problem either.

XmlDocument does all the things that DataReader and DataSet don't do well.

--
"The Bush administration aims in its 2005 budget to cut by $1 billion the
$18 billion fund that helps about 2 million Americans--generally the poor,
elderly, and disabled--pay their rent."
-Mother Jones
http://www.motherjones.com/news/dail...05/05_520.html

Nov 22 '05 #21
interesting.

Dataset can be easily converted to an XML document, and back to a Dataset
for update.

Sounds like you've made extra work for yourself.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Section 8" <ro***@moore.bo nd.007> wrote in message
news:xd******** *******@newsrea d3.news.pas.ear thlink.net...
Relaxin wrote:
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.


Here's what I ended up doing.

For more complex data tasks, instead of using a DataReader ( forward only,
no search ) or DataView ( no sort, no search ) when I need to manipulate
and change the data locally, I run a sql command as xml, and load it into
an XmlDocument.

It's disconnected.

It has latency.

And I can search ( and update it ) using XPath queries.

If I want to update the database with changes, no problem either.

XmlDocument does all the things that DataReader and DataSet don't do well.

--
"The Bush administration aims in its 2005 budget to cut by $1 billion the
$18 billion fund that helps about 2 million Americans--generally the poor,
elderly, and disabled--pay their rent."
-Mother Jones
http://www.motherjones.com/news/dail...05/05_520.html

Nov 22 '05 #22
Section 8,

To say this in a different tone, I want to say that you have to see the
dataset concept in its complete view. It is a part of System.Data where
derives from the classes Dataset DataTable DataColumn DataView
DataViewManager . This can in my opinion not be seen from one class alone as
the DataSet.

All of those classes have very strong methods and properties, while the only
thing which in my opinion are maybe still not strong enough are the public
events, however they are there and some very usefull.

To take the dataset again apart, one of the methods is the writeXML which is
a very overloaded method, (what most methods from system.data are). The
writeXML is not only usable to write to disk, however as it seems for me,
to endless streams and with that even easy to use.

Cor
Nov 22 '05 #23
> Well, then you might need to redesign your app - maybe you don't need
to select ALL the records INCLUDING the pictures! Maybe just rewrite
your app to select FEWER records, and leave the images in the DB,
until you REALLY need them.

Heck, it's not ALWAYS MS's fault when your system is designed badly!


Just the answer I would expect from a MS junkie.

If I want to cache all the records to the client then MS should allow me
that option, if I need a live connection, that option should be a available
also.
Those were the options available to me with OLEDB.

MS shouldn't dictate to me how I should write my application, but should
give me the option to write it the way that "I" need it written.

Also remember, that just because you don't know my design doesn't mean its
bad, it just means you are a closed minded developer that thinks thier way
is the only way.
That's MS junkie thinking.

"Marc Scheuner [MVP ADSI]" <m.********@ino va.SPAMBEGONE.c h> wrote in message
news:ce******** *************** *********@4ax.c om...
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!!


Well, maybe because not everyone wants to use a DataView? Don't take
*YOUR* requirements and make them general - they might not be general
enough to be considered suitable for EVERYONE. Now there would
definitely be a possibility to at least provide an overloaded function
.FindRows that would return a DataView - then again, maybe MS decided
when they designed ADO.NET that this was too exotic an option.

After all, you really don't need to do much to get a DataView from
your results - just do it!
With the .NET dataset, it forces you to load all of the data to the
client...th is doesn't work so well when you database is mainly made up of
images!


Well, then you might need to redesign your app - maybe you don't need
to select ALL the records INCLUDING the pictures! Maybe just rewrite
your app to select FEWER records, and leave the images in the DB,
until you REALLY need them.

Heck, it's not ALWAYS MS's fault when your system is designed badly!
;-)

Marc

=============== =============== =============== =============== ====
Marc Scheuner May The Source Be With You!
Berne, Switzerland m.scheuner -at- inova.ch

Nov 22 '05 #24
"Relaxin" <me@yourhouse.c om> wrote in message
news:eY******** ******@tk2msftn gp13.phx.gbl...
Well, then you might need to redesign your app - maybe you don't need
to select ALL the records INCLUDING the pictures! Maybe just rewrite
your app to select FEWER records, and leave the images in the DB,
until you REALLY need them.

Heck, it's not ALWAYS MS's fault when your system is designed badly!
Just the answer I would expect from a MS junkie.


While it is unclear if the recepient of that comment would consider it an
insult, it is clear to me that you intended to insult him. Let's keep a
cool head and discuss technology, OK?

If I want to cache all the records to the client then MS should allow me
that option,
why? If you are referring to server-side cursors, the option created
unscalable applications. It was only intended for very narrow uses, and was
nearly always misused by lazy developers creating apps that were not stress
tested before being inflicted on the general public. Those apps were so bad
that they gave MS technology a bad name, because they kept failing under
stress. Other database access methods don't allow this goofy design, and MS
probably shouldn't have either. Sometimes, when you release a technology,
it is hard to see how it will be used or misused. When you realize the
mistake, you take responsibility, correct it, and move on. The product
group did the right thing by turning the spotlight away from this idea.
if I need a live connection, that option should be a available
You have it. DataReader is a live connection. If by "live connection" you
are referring to rowsets, you have to realize that this was another wildly
misused "feature". It is rarely beneficial to use them and most apps that
used them did so at their own peril.
Those were the options available to me with OLEDB.
And you can still use OLEDB if you want. No one is stopping you. It works
just as well under .Net as it did under COM.

MS shouldn't dictate to me how I should write my application, but should
give me the option to write it the way that "I" need it written.
With power comes responsibility to know how to use it. While your tools
should provide power, they should also relieve the burden of learning. In
other words, they should lead you to make good decisions. The OLEDB tools
led to some decisions, not all of them were good. Apparently, you are
rather attached to some of your decisions, but that doesn't make them good
ones.

Also remember, that just because you don't know my design doesn't mean its
bad,
True. However, you have revealed quite a bit about your design in this
series of threads. From what you have revealed, a few very simple
modifications to your design would allow it to work more efficiently and
much more scalably. Is it wrong to point that out? I'm not defending the
previous poster for his emphasis (which was a bit condescending), but I do
agree that a NG is a place for open discussion, even if it means discussion
of design decisions on your part.
it just means you are a closed minded developer that thinks thier way
is the only way.
That's MS junkie thinking.


Don't be quick to throw stones, friend. In this discussion, who among us
has shown an unwillingness to admit when a design is using tools in a sloppy
manner to accomplish a goal that shows a strong lack of understanding of
efficient or effective data access. That unwillingness has led to much of
the frustration that is coming out.

Perhaps, if you listen carefully, you may hear the sound of people who want
to help you.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
Nov 22 '05 #25
Nick Malik [Microsoft] wrote:
interesting.

Dataset can be easily converted to an XML document, and back to a Dataset
for update.
No, I mean to say, that's what I do.

But I do my manipulations and searching on XML using XPath, because
there are no equivalent methods with DataSet/DataReader.

Sounds like you've made extra work for yourself.

Nov 22 '05 #26
Hi Moe,

Are you also "Section 8"?

Because the original message from Section 8 said that he or she would run a
SQL query AS XML (my emphasis added).

There's a feature of SQL Server that uses the keywords 'AS XML' to direct
the server to return XML in the resultset. I thought that you were
referring to that.

If you are, in fact, using AS XML, then I wonder why not just use the
Dataset object, serialize to XML, manipulate it there as you see fit,
deserialize back to dataset and then use a data adapter to make the updates.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--
"Moe Green" <mo*@green.vega s> wrote in message
news:33******** *****@individua l.net...
Nick Malik [Microsoft] wrote:
interesting.

Dataset can be easily converted to an XML document, and back to a Dataset for update.


No, I mean to say, that's what I do.

But I do my manipulations and searching on XML using XPath, because
there are no equivalent methods with DataSet/DataReader.

Sounds like you've made extra work for yourself.

Nov 22 '05 #27
Other database access methods don't allow this goofy design, and MS
probably shouldn't have either. I'm not sure what DB you are talking about, by the DB's Ive used, all have
that capability (except Firebird).

If you are referring to server-side cursors, the option created
unscalable applications. My application scaled just fine for my needs and my customers love it.
Again, don't assume you know my application based off of how you design your
systems.

With power comes responsibility to know how to use it. While your tools
should provide power, they should also relieve the burden of learning.

Have you looked at C and C++, they have power but it made no effort in
relieving the burden of learning.
That's the way I like it, give me the power and it's up to me to learn it.

..NET has made some things easier, but it's has removed some of the power
that C++ developers want.
Nov 22 '05 #28
>Just the answer I would expect from a MS junkie.

I'm no MS junkie by any means - but I just think lots of developers
always insist that THEIR way is the only way to go, and MS better
support it - period.

Well, you gotta put yourself into MS' shoes, too, at times - they have
to design basic infrastructure code that will cover most needs of the
largest possible group of developers, and at the same time, everyone
expects MS to provide guidance in terms of best practices and so
forth. This isn't an easy place to be, either.

And yes, of course, MS could

a) design the system so that it will cover ALL imaginable scenarios -
when do you expect that to ship then??

b) make sure ANY vintage technology still works tens generations later
- welcome to messy APi's and stuff
Those were the options available to me with OLEDB.
Yes - those were the days. The good old days when everything was
better.

Things change - in life, and especially in IT - get used to it, and
DEAL with it - or get out of this business.
MS shouldn't dictate to me how I should write my application, but should
give me the option to write it the way that "I" need it written.
Well, in that case - just stick to VB6 and OleDB then - no one FORCES
you to use ADO.NET by any means!
Also remember, that just because you don't know my design doesn't mean its
bad,


No - but just because your design USED to work (more or less) in OleDB
doesn't mean that it's good and suitable for today's way of doing
things, either! In the vast majority of cases, the fault or flaw
doesn't really exist in the "system" (like ADO.NET), but in the flawed
designs people try to coerce on top of the system (without
understanding the basics and workings of that system).

I just say "in general" - I don't know you, or your design - but I'm
just saying took a good look at it - most often you can fairly easily
make it a whole lot better, and get better results, rather than trying
to force your "old" design onto a new system not intended for that
kind of use.

Marc
=============== =============== =============== =============== ====
Marc Scheuner May The Source Be With You!
Berne, Switzerland m.scheuner -at- inova.ch
Nov 22 '05 #29
Nick, I have to address one of your statements about "lazy developers"
misusing server side cursors. In VB6 DAO recordsets the default was client
side cursors, when ADO was introduced the default was server side cursors.
If you were testing in a small shop on a fast LAN the response time is barely
noticable. I think the problem is that the default in ADO should have been
client side cursors. This probaply lead to the scalability problems more
than programmer *laziness*.

I'm sure there were many programmers out there that did not notice the
difference until they rolled out into a different environment.

Cheers
"Nick Malik [Microsoft]" wrote:
"Relaxin" <me@yourhouse.c om> wrote in message
news:eY******** ******@tk2msftn gp13.phx.gbl...
Well, then you might need to redesign your app - maybe you don't need
to select ALL the records INCLUDING the pictures! Maybe just rewrite
your app to select FEWER records, and leave the images in the DB,
until you REALLY need them.

Heck, it's not ALWAYS MS's fault when your system is designed badly!


Just the answer I would expect from a MS junkie.


While it is unclear if the recepient of that comment would consider it an
insult, it is clear to me that you intended to insult him. Let's keep a
cool head and discuss technology, OK?

If I want to cache all the records to the client then MS should allow me
that option,


why? If you are referring to server-side cursors, the option created
unscalable applications. It was only intended for very narrow uses, and was
nearly always misused by lazy developers creating apps that were not stress
tested before being inflicted on the general public. Those apps were so bad
that they gave MS technology a bad name, because they kept failing under
stress. Other database access methods don't allow this goofy design, and MS
probably shouldn't have either. Sometimes, when you release a technology,
it is hard to see how it will be used or misused. When you realize the
mistake, you take responsibility, correct it, and move on. The product
group did the right thing by turning the spotlight away from this idea.
if I need a live connection, that option should be a available


You have it. DataReader is a live connection. If by "live connection" you
are referring to rowsets, you have to realize that this was another wildly
misused "feature". It is rarely beneficial to use them and most apps that
used them did so at their own peril.
Those were the options available to me with OLEDB.


And you can still use OLEDB if you want. No one is stopping you. It works
just as well under .Net as it did under COM.

MS shouldn't dictate to me how I should write my application, but should
give me the option to write it the way that "I" need it written.


With power comes responsibility to know how to use it. While your tools
should provide power, they should also relieve the burden of learning. In
other words, they should lead you to make good decisions. The OLEDB tools
led to some decisions, not all of them were good. Apparently, you are
rather attached to some of your decisions, but that doesn't make them good
ones.

Also remember, that just because you don't know my design doesn't mean its
bad,


True. However, you have revealed quite a bit about your design in this
series of threads. From what you have revealed, a few very simple
modifications to your design would allow it to work more efficiently and
much more scalably. Is it wrong to point that out? I'm not defending the
previous poster for his emphasis (which was a bit condescending), but I do
agree that a NG is a place for open discussion, even if it means discussion
of design decisions on your part.
it just means you are a closed minded developer that thinks thier way
is the only way.
That's MS junkie thinking.


Don't be quick to throw stones, friend. In this discussion, who among us
has shown an unwillingness to admit when a design is using tools in a sloppy
manner to accomplish a goal that shows a strong lack of understanding of
efficient or effective data access. That unwillingness has led to much of
the frustration that is coming out.

Perhaps, if you listen carefully, you may hear the sound of people who want
to help you.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--

Nov 22 '05 #30

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

Similar topics

49
3213
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
1574
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
3801
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?
4
2791
by: PALLAVI SHARMA | last post by:
I have made a web site using asp.net and c#. I used ms access for database, but i have problem that i don't know how to upload my ms access database on web server. I have domain name and password, but i can't able to attach my database on web server. What should i write in data source for making connection?
0
10232
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
10059
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...
1
10008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7420
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6682
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5313
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...
1
3974
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
3578
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2822
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.