Sunday, March 15, 2009

BCS ADO and DBGrid Field Sort

ActiveX Data Objects (ADO) is Microsoft's latest database management infrastructure that encompasses practically all the require functionality for managing most available databases. Activities includes but are not limited to edit, insert, delete and update functions for individual fields of most popular Database Management Systems.

The DBGrid control of the windows platform allows the user to have a spread sheet like data entry grid control that presents the data fields in the underlying database while allowing for what I see is what I get (WYSIWYG) approach to inserting and updating information id databases. A database navigator control also augments this process with a series of control for first, last, next and previous records. Also edit, post, cancel and refresh controls are also available on the data base navigation control.

In many instances a DBGrid is more useful if it has the capability to quickly sort the contents of the grid (and associated database) by clicking on the grid title. Typically this technology is used in the windows platform however similar components exist in the .NET platform. And of course OleDB of .NET handles the ActiveX Data Objects (ADO) functionality requirements. With some care and careful planning these techniques may also be leveraged and employed within the .NET framework.

This feat is accomplished by using the DBGrid column field name. This tells the ADO sort which field to use. The DBGridTitleClick event is used to identify which field in the DBGrid is being clicked upon. Because the name displayed in the DBGrid may or may not coincide with the actual field name the DBGrid Column field name is employed for the underlying DBMS detail. This approach alleviates inconsistencies which may occur between the display label and the actual contents of the field being manipulated.

Implementation of these simple procedures for data controls provides for a powerful feature when traversing data base management systems controls.

Please feel free to contact me at my web site below for further assistance in this as well as other endeavors. Simply click on the free consultation link at the top of every active page on the web site.

Mr. Arch Brooks, Software Engineer
http://archbrooks.com

3d

0 comments:

Post a Comment