BCS Retrieve Data Element Label Info (no dfm)

This application retrieves the data element description stored in the database table as outlined in BCS Establish Display Label (frm020).

The function is listed below.

{*-----------------------------------------------------------------------------
  Procedure: RetTag
  Author:    Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC
  Date:      25-Jul-2016
  @Param     den: string
  @Return    string
-----------------------------------------------------------------------------}
function Tfrm022.RetTag(den: string): string;
var
  res: string;
begin
  ucon := TUniConnection.Create(Application);
  with ucon do
  begin
    Database := 'de';
    ConnectString :=
      'Provider Name=MySQL;Login Prompt=False;User ID=bcs;Password=' +
      'Password' + ';' + 'Data Source=localhost;Database=' + 'de' +
      ';Port=3306';
    Connected := true;
    LoginPrompt := false;
  end;
  uta := TUniTable.Create(Application);
  uta.Connection := ucon;
  uta.TableName := 'dl';
  uta.Open;
  if uta.Locate('dna', trim(den), []) then
  begin
    res := uta.FieldByName('lab').AsString;
  end
  else
  begin
    res := '';
  end;
  result := res;
  uta.Free;
  ucon.Free;
end;

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.

BCS Edit MySQL Data Tables (no dfm)

This tool allows the end user to edit any existing MySQL data table.

dep05

A database grid supports rapid navigation to a specific location in the database while simultaneously allowing a data entry panel for modifying any data element.  Several of the previously existing tools that performs various functions are utilized in this application.   The BCS Forms Repository (no dfm) was employed to populate this project with the required components.

The tool allows the user to select the table from a list of all available tables.

dep01

Once the table is selected by double clicking on the desired item the following dialog will appear.  Now the user is prompted to select the data element which will be use as the table’s index.

dep02

Double click on the desired item and the following dialog will appear.

dep03

Here the user selects the data elements that will appear in the database grid.

Notice when you click on the Data Entry tab you are able to modify the default attributes for the database grid element.

dep04

You may change the data elements width and display title or make the grid field read only.  For all primary keys you intend to display change the “ro” attribute to true by clicking on the checkbox and making the true selection appear.

When you exit the grid element selection dialog the following data entry dialog will appear.  Again the grid view allows for rapid navigation of the data table.

dep05

When the Data Entry tab is selected you have a form which allows the modification or deletion of existing data while you also have the capability to insert new records.

dep06

When the are finished with the data edit module the following message appears.

dep07

When you are done editing table click the “No” option and the application terminates.  To continue to edit data tables click the “Yes” option and the process re initializes for reuse.

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.

BCS Generate Main Program (no dfm)

This application will generate the main program for utilization of The BCS Forms Repository (no dfm).

This application is enhanced to generate source code snippets for menus implementations and for invoking executable programs.

mlg01

After you have selected the Generate Mainline option the following dialog will appear so you may select the target folder for the new application.

mlg21

Once the folder is selected you will be prompted for a family identifier.

mlg03

Key in the family identifier and click the Ok button.  Your mainline application has been created sucessfully.  Next the application offers to compile the new application for you.  Click on the “Yes” option to invoke the compiler.  Click on the “No” option to continue without compiling the new application.

mlg04

You make invoke the application once again or simply end the execution of this application.

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.

BCS WordPress Functionality In A Web Page

It has always been desirable to have WordPress to become part of your normal web site. Many of the proposed solutions require numerous hours of programming and testing. While researching on the Web I found a solution that is so simple it was absolutely mind boggling.

This miraculous feat is accomplished with a single line of code.

echo '<iframe width="100%" height="100%" src="Your WordPress URL" frameborder="0" allowfullscreen></iframe>';

Leveraging IFrame makes this solution work like a dream.

To enter administration mode simply open the WordPress login command in a new tab (in you favorite browser) and your dashboard will appear.

Click here to view a demonstration of the code in action.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS PHP Web Page Tips

There may come a time when you would would like to capture a web pages HTML.

The following command will retrieve the pages content and store the HTML is a variable “$fil”. These PHP commands execute withing the proper PHP tags.

$fil = file_get_contents ( 'http://bcsjava.com/blg/wordpress/2016/06/17/bcs-anaconda-date/' );

To save the contents of ‘$fil” to a text file simply issue the following command.

echo file_put_contents ( "C:\\dev\\w32\\2016\\xxx.txt", $fil );

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.

BCS Records vs Properties In Delphi Programming

Consideration for using records as opposed to properties contains several considerations. To use properties effectively the object must be instantiated. Te record structure on the other hand you do not have instantiate an object. The record structure is available for the life of the application.

Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.