BCS Single Table Data Entry


This application allows the user to perform data entry on any available single table.
sden01
The structure for dynamically creating data grid entries is listed below.
[codesyntax lang=”delphi”]

  /// Data Grid COlums
  dgCols = record
    /// Data Name
    dna: string;
    /// Heading Title
    hdg: string;
    /// Display Width
    width: Integer;
    /// Make Element Read Only
    readOnly: Boolean;
  end;

[/codesyntax]
To populate the grid data element tool the following code should e invoked.
[codesyntax lang=”delphi”]

  frm019C.ZapDge;
  frm019C.AddCol('name', 'Name', 250, false);

[/codesyntax]
The ZapDge procedure initializes the data grid staging structure.
The AddCol Procedure adds a column to the data grid.  Repeat this procedure up to ten times to add additional grid data elements.
The structure for he remainder of the application is listed below.
[codesyntax lang=”delphi”]

  /// Dialog Record Area
  frm019_area = record
    /// Caption
    Caption: string;
    /// Notebook Tabs
    nbt: Array [0 .. 4] of string;
    /// Name Of Database
    Database: string;
    /// User Id
    UsrId: string;
    /// Password
    Password: string;
    /// Master Table
    MasTab: string;
    /// Master key
    MasKey: string;
    /// Master Index Field
    MasIdx: string;
  end;

[/codesyntax]
You supply values to the remaining parameters by uding the following code.
[codesyntax lang=”delphi”]

  rp019.Caption := 'BCS Static Form No Data';
  rp019.Database := 'databasename';
  rp019.UsrId := 'bcs';
  rp019.Password := 'Password';
  rp019.MasTab := 'TableName';
  rp019.MasIdx := 'name';

[/codesyntax]
Based on this information the application looks at each data definition and populates the appropriate data control in the data entry tab.  No coding is involved.  You set seven parameters and your database applications is able to create, read, update and delete data records for the associated table.
This approach will work for every table in the database repository.
A 32 bit executable program may be downloaded by clicking here.
A 64 bit executable program may be downloaded by clicking here.
The component documentation can be found by clicking here.
The source code may be found by clicking here.
Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

Leave a Reply

Your email address will not be published. Required fields are marked *