Updating latge recordsets takes long time in ms access database
Not wanting to believe this, I accessed the Recordset directly, and looped through it in less than 1 second!
In the business world, these types of perfomance traps can (and do) become "deal busters".
The ADO Recordsets primary purpose is to return rows of data, and while the ADO Command object can produce a Recordset, it is primarily used to issue Update, Delete, or Insert SQL commands, which do not return data.
The TADOQuery has a property, Recordset, which is of type _Recordset, which is in fact an ADO Recordset.
I will not go into much detail on the ADO objects themselves, as the purpose of this article is how to "tweak" the VCL components to run faster.
My recommendation to you is to read ADO specific books or articles.
A TADOQuery can be used to execute SQL that does not return a Recordset (such as running an update query), but I like to use TADOQuery for retrieving data and TADOCommands for executing SQL that does not return any data. The main point here is that the VCL ADO components discussed here rely on the ADO Recordset and/or ADO Command objects.
However, no visual controls will be able to display data unless Enable Controls is first called.
) Steve Burch - September 2001 Having the ADO based VCL components introduced into Delphi (starting with version 5) brought a solid solution to the need of incorporating this Microsoft technology into the Delphi developers world.
For those of you new to ADO, it stands for "Active X Data Objects" and it is the successor to the older RDO components, and is part of Microsoft's bigger picture of Distributed inter Net Applications (DNA).
In particular, study the ADO Recordset and ADO Command objects with their properties and methods.
The TADOQuery, TADOTable, and TADODataset VCL components all incorporate the ADO Recordset and ADO Command objects.Note: Disable Controls seems to "stack", that is, if you make (by mistake) two successive calls to Disable Controls you will need to make two calls to Enable Controls before you see your data in any visual controls. Many times a set of records is retrieved and looped through for processing -- to base calculations upon, feed other table updates, etc.