Browse Prior Art Database

System Query Language Application Self-Binding Technique

IP.com Disclosure Number: IPCOM000113593D
Original Publication Date: 1994-Sep-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 2 page(s) / 69K

Publishing Venue

IBM

Related People

Davis, RA: AUTHOR [+2]

Abstract

IBM's System Query Language (SQL) database products for OS/2* require that an application program be bound to the database before the application can access its data. When any changes are made to the application, it must be bound to the database again before it will work properly. This requirement poses no problem on the development system, since the binding can be done at the same time that the application is compiled and linked.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

System Query Language Application Self-Binding Technique

      IBM's System Query Language (SQL) database products for OS/2*
require that an application program be bound to the database before
the application can access its data.  When any changes are made to
the application, it must be bound to the database again before it
will work properly.  This requirement poses no problem on the
development system, since the binding can be done at the same time
that the application is compiled and linked.

      However, a problem does arise when the revised application is
moved onto several other systems.  That is because the bind step,
while very simple to perform, is also very easy to overlook; when
this happens, the end user has no way of knowing the reason that the
application no longer works properly, and considerable time can be
lost before the problem is diagnosed and corrected.  A means of
ensuring that binding is done when required is therefore of
considerable value.

      The SQL Application Self-binding Technique described herein can
be used by an application program to determine when it needs to be
bound to the database.  The application program can then use the
Application Programming Interface (API) provided by the IBM database
products to bind itself to the database.  Eliminating the requirement
for explicit performance of the bind process also eliminates the
possibility of problems resulting from the failure to do so.

      To determining when binding is required, an application program
must perform the following steps:
  1.  Open the database in the usual manner.
  2.  Perform a dynamic SQL immediate statement.
  The COMMIT statement is probably the best choice for two
  reasons: For one thing, it requires no knowledge of database
  tables; for another, it executes very quickly since there is no
  work to commit at this point.
  3.  If the return code from the COMMIT statement is either
    ...