Solved

Are all these data aware components useful?

Posted on 2000-04-11
21
418 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
21 Comments
 
LVL 7

Expert Comment

by:Motaz
Comment Utility
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
Comment Utility
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
Comment Utility
Actually there are lots of data bound controls for VB...

Cheers,

Raymond.
0
 

Expert Comment

by:Volk
Comment Utility
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
Comment Utility
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
Comment Utility

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
Comment Utility
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
Comment Utility
BTW:I almost never used a ttable:)
0
 
LVL 7

Expert Comment

by:Motaz
Comment Utility
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
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 1

Author Comment

by:chengjian
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks chengjian for this information.

Motaz
0
 
LVL 1

Author Comment

by:chengjian
Comment Utility
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
Comment Utility
who should I give points to?
I really have no idea:(
0
 
LVL 7

Expert Comment

by:Motaz
Comment Utility
Not me :-)
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now