Board index » delphi » TTable.Edit + TTable.Post vs DML + TQuery.ExecSQL

TTable.Edit + TTable.Post vs DML + TQuery.ExecSQL

Which of those two methods has a better performance under a C/S database? I
am afraid that the Edit/Post can cause network overhead, but I'm not sure if
the second method, that is, sending and UPDATE to the database will be
faster, many thinks have to be done: build the query, prepare and finally
execute).

Thanks for any help,

Joan

 

Re:TTable.Edit + TTable.Post vs DML + TQuery.ExecSQL


Joan,

   Forget that there is a TTable component on Delphi's component palette and
use TQuerys and CachedUpdates.  Better performance, easy to maintain, and
easier to track down problems.

Good luck,
krf

Quote
Joan Ortanobas wrote in message <87m04f$7...@bornews.borland.com>...
>Which of those two methods has a better performance under a C/S database? I
>am afraid that the Edit/Post can cause network overhead, but I'm not sure
if
>the second method, that is, sending and UPDATE to the database will be
>faster, many thinks have to be done: build the query, prepare and finally
>execute).

>Thanks for any help,

>Joan

Re:TTable.Edit + TTable.Post vs DML + TQuery.ExecSQL


Generally speaking, your database will not be really C/S database
while you using TTable components.

In my opinion you must to use TQuery components because of
1) relational model of databases require following: operations
   on the tables must be performed at the level of sets -
   when you use TTable, you work with one record only.
2) SQL is commonly used as relational language
   (despite of it's defects as relational language -  see
   Darwen and Date "THE THIRD MANIFESTO: FOUNDATION FOR
   OBJECT / RELATIONAL DATABASES").
3) SQL is very powerful and could save your time when developing
   database applications - 10 lines of SQL could to be equivalent
   to 100 lines of code in object pascal, especially when creating reports.
4) With TQuery and TStoredProc you can gain access to the power
   of SQL and relational model.

PS: The advantages of using queries and SQL you will see when
        your database grows.

Regards, Alexander Dymo

Quote
Joan Ortanobas wrote in message <87m04f$7...@bornews.borland.com>...
>Which of those two methods has a better performance under a C/S database? I
>am afraid that the Edit/Post can cause network overhead, but I'm not sure
if
>the second method, that is, sending and UPDATE to the database will be
>faster, many thinks have to be done: build the query, prepare and finally
>execute).

>Thanks for any help,

>Joan

Other Threads