TADOTable -- is it OK to use for inserts?

571 views Asked by At

I'm working in an old Delphi 7 project and trying to get my bearings in it. I had heard that TADOTables are bad because they pull down entire tables. However I am looking at one bit of code and I'm wondering if it does the same thing. All it does is set the values of some fields and then do tbl.Post and possibly does the tbl.Insert command before it if applicable. (sorry, I'm not the most experienced in Delphi)

Anyway, so should TADOTables be completely phased out or should they only be replaced when doing select * statements from them practically and they're OK for inserts and updates?

1

There are 1 answers

6
Ken White On

ADOTables have to pull most (or all, depending on configuration) data from the server, so you're loading many rows of data simply to do an insert/edit and post.

Unless you're dealing with small, local databases (eg., Access database on the local machine), you're better off getting away from table-based data and moving to INSERT/UPDATE set-based operations.