• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 437
  • Last Modified:

Are all these data aware components useful?

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
chengjian
Asked:
chengjian
1 Solution
 
MotazCommented:
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
 
MotazCommented:
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
 
rwilson032697Commented:
Actually there are lots of data bound controls for VB...

Cheers,

Raymond.
0
Cloud Class® Course: Microsoft Office 2010

This course will introduce you to the interfaces and features of Microsoft Office 2010 Word, Excel, PowerPoint, Outlook, and Access. You will learn about the features that are shared between all products in the Office suite, as well as the new features that are product specific.

 
VolkCommented:
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
 
kretzschmarCommented:
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
 
simonetCommented:

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
 
chengjianAuthor Commented:
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
 
chengjianAuthor Commented:
BTW:I almost never used a ttable:)
0
 
MotazCommented:
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
 
johnstonedCommented:
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
 
chengjianAuthor Commented:
table=tquery.sql.add(select * from table)
all data should be downloaded before filter, performance is a problem.
0
 
MotazCommented:
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
 
chengjianAuthor Commented:
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
 
MotazCommented:
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
 
chengjianAuthor Commented:
yes, I means so, you can use sql profilter (mssql) to view what happend when your program runs.
0
 
MotazCommented:
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
 
chengjianAuthor Commented:
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
 
MotazCommented:
Thanks chengjian for this information.

Motaz
0
 
chengjianAuthor Commented:
never mind.
and to all:
you means use Dataaware components doesn't cause any performance problems in a client/server database program?
0
 
chengjianAuthor Commented:
who should I give points to?
I really have no idea:(
0
 
MotazCommented:
Not me :-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now