Solved

Are all these data aware components useful?

Posted on 2000-04-11
21
425 Views
Last Modified: 2010-04-04
Dear friends
    Many (in fact, most) of the Delphi books, articles sugesst we use Delphi's native data aware components(ie TDBEdit, TDBGrid, TDBCombox ect.). In additional, there are so much well-made third-party data aware components just like InfoPower, ExpressGrid ect. though they are not free, they really make our life easier, at least look like easier.
    But, most of Visual Basic programmers,for some reason, never use data binding components.
    I don't know if i aught to use data aware components? I never make "TTable+DBNavigator+DBGrid" style program for performance, because in a lan, a large database would cause a traffic overload. But please give me a good reason to USE or NOT TO USE data aware components.
    Thanx a lot.
0
Comment
Question by:chengjian
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
21 Comments
 
LVL 7

Expert Comment

by:Motaz
ID: 2706649
Hello there,
Data aware components have no thing to do with Traffic, so that you can use Client/Server architecuter to develope large databases solutions.
0
 
LVL 7

Expert Comment

by:Motaz
ID: 2706663
Try always to rely to use native Delphi components because you will find alot of support and many people work with these componets, moreover that component will be upgraded (if necessary) in the newest versions of Delphi, so that you do not need a modification when migrating to a newer version of Delphi. But when you use third party components it may work with some versions of Delphi and they may be late in upgrading to newest versions and some times they leave developing thier components and you lose the support

Motaz Abdel Azeem
0
 
LVL 12

Expert Comment

by:rwilson032697
ID: 2706748
Actually there are lots of data bound controls for VB...

Cheers,

Raymond.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:Volk
ID: 2706777
Some data-aware components -will- give you capacity problems, depending on the number of users on your database. A data-aware component is liable to open a table for editing without your knowing it, so be sure to react to possible events your datasource or dataset will give you. If you construct your program in a smart and orderly fashion, you won't run into a lot of trouble, but explaining how to handle more complex problems and situations just wouldn't fit on this page. I'd suggest you read a good book on C/S programming in Delphi and try to decide wether or not you need to find an alternative for the data-aware controls. What are you using as a database platform? The BDE, Interbase, aomething else?
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 2706841
hi all,

terrible, whats happened that all are against data-aware controls.

i use all, also the expressgrid, with oracle, paradox, interbase on systems which contains millions of records and never had a problem on perfomance, traffic and dataamount.

meikl
0
 
LVL 15

Expert Comment

by:simonet
ID: 2707603

I rarely use TTable. I prefer TQuery over TTable... mainly when I am working with true relational DBs on the backend. That gives me a greater control on the recordset I'll be dealing with.

I use Delphi's native Data-aware control, along with a few I've written myself, and, as far as the UI controls are concerned, I see no problem with them.

Alex
0
 
LVL 1

Author Comment

by:chengjian
ID: 2708090
Ok.
first, to use a TTable+DBGrid to deal with a data-table really cause many problems in multi-users env.

second, why so much vb programmers do not use data binding?

third, I use TEdit instead of TDBEdit to deal with my data, then generate a sql statement to excute like this:
with query1 do
begin
close;
with sql do
begin
clear;
add(insert into mytable);
add(...)
add(edit1.text);
....
end;
execsql;
end;
0
 
LVL 1

Author Comment

by:chengjian
ID: 2708103
BTW:I almost never used a ttable:)
0
 
LVL 7

Expert Comment

by:Motaz
ID: 2710632
Why not to use TTable, it is very easy and you can use it instead of TQuery, using OnFilter to fileter any data using Object Pascal syntax instead of SQL languages such as:

 Accept:= DataSet.FieldByName('Date').AsDateTime > Now -1;

Motaz
0
 

Accepted Solution

by:
johnstoned earned 100 total points
ID: 2711281
I would say there are 2 main reasons for using data aware components.

1. It involves less typing on your own part.  Sounds quite lazy, but if you use a lot of database's then it can speed up your development time.

2. It makes your code a lot more readable.  If another programmer comes along to maintain your code, it will be easier to follow.  This is mainly due to there being less code to understand.

I've written one or two database front end type programs and they were a mess of code.  Then I did one using data aware components.  It took half the time and had virtually no code in it.  Nice.

Hope that helps the case,

Dave.
0
 
LVL 1

Author Comment

by:chengjian
ID: 2712308
table=tquery.sql.add(select * from table)
all data should be downloaded before filter, performance is a problem.
0
 
LVL 7

Expert Comment

by:Motaz
ID: 2714855
Yes, that is right chenqjian, using TQuery is not a client/server because the process and the database engine is in the client machine so that the whole table must be downloaded then filtered, so that instead you have to use Stored Procedures

Motaz
0
 
LVL 1

Author Comment

by:chengjian
ID: 2716057
Motaz:
I do not agree.
the sql links work like this:
1.send sql statement to db's native driver directly
2.db's native driver communication with db server and server only excute the sql statement we send to sql links
3.native driver get the result set and send back to sql links
4.sql links sends result set back to program we made.
0
 
LVL 7

Expert Comment

by:Motaz
ID: 2718613
Did you mean that when I connected to MS-SQL server for example, and I use ADO connection, and I use Query to retrieve the data from a table, the process and filtering occure in server side?
0
 
LVL 1

Author Comment

by:chengjian
ID: 2719013
yes, I means so, you can use sql profilter (mssql) to view what happend when your program runs.
0
 
LVL 7

Expert Comment

by:Motaz
ID: 2720060
How can I know if the driver is native or not, how is the driver can be native? and what is the native drivers among different servers such as MS-SQL, Oracle, and so on.
0
 
LVL 1

Author Comment

by:chengjian
ID: 2737652
Sorry, perhaps my language should be improved. Native driver I here means the driver which the database itself use. For example DB Client for MSSQL, Oracle Client, DB Client for sybase, Interbase client for Interbase and so on. In general, native driver only include a set of api to access database on server. there're many third-party components supports we use native api to access database for example InterBase Express. Direct Oracle Access.
0
 
LVL 7

Expert Comment

by:Motaz
ID: 2739414
Thanks chengjian for this information.

Motaz
0
 
LVL 1

Author Comment

by:chengjian
ID: 2739867
never mind.
and to all:
you means use Dataaware components doesn't cause any performance problems in a client/server database program?
0
 
LVL 1

Author Comment

by:chengjian
ID: 2758902
who should I give points to?
I really have no idea:(
0
 
LVL 7

Expert Comment

by:Motaz
ID: 2761482
Not me :-)
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question