Transactions

Zim supports two types of transactions: implicit and explicit. An implicit transaction is associated with each individual Zim command that accesses the database in some manner (either read/only or read/write). When the command ends, all locks that were acquired are released and any database updates are committed to the database. If the command fails (e.g. a deadlock condition), then Zim automatically removes any partial updates and releases all locks.

Explicit transactions are provided in order to support database updates associated with multiple database access commands that must either be all committed or all removed as a single “logical unit of work” (or “logical unit of recovery”). An explicit transaction is initiated by the command “transaction” and ended either by the command “endtransaction” (that commits any database updates) or by the command “quittransaction” (that cancels any database updates). Both commands release all held locks. Should any database access command inside an explicit transaction fail (e.g. by a deadlock condition) then all partial updates to that point are removed and all held locks are released.

Zim supports this “transaction” functionality against an SQL server database.

Zim Applications and SQL Database Servers

In Client-Server applications, you do not have to do anything special to access or manipulate data stored in the SQL database. The data definitions of objects under Zim’s control and the data definitions of objects not under Zim’s control are exactly the same. To an application, Zim manipulates both in exactly the same way.

The development of a Zim Client-Server application can be performed in isolation from the SQL database; it can in fact take place on an entirely different computing platform. Zim does not have to be connected to the server through the development phase. This “off-line” development capability eliminates the heavy load that can be placed on SQL servers by development activities.

In order to access SQL database tables, Zim must have a definition of the table. The table must be defined in two places: in Zim and in the SQL database. EntitySets and relationships are flagged as being under the control of Zim or under the control of the SQL database. The definitions of those EntitySets and relationships under control of the SQL database are either exported to the SQL database or imported from the SQL database. You must ensure that the definitions in Zim and the SQL database are compatible. Zim’s SQL definition interface provides the means to easily import and export definitions.

Figure 1

In Figure 1, the table “Customers” is defined both in Zim and in the SQL database. If “Customers” is defined as a Zim EntitySet or if Zim is running in ZIM mode, then all references to customers are directed to the Zim EntitySet. If, however, “Customers” is defined to be an SQL table and Zim is running in SQL mode (the default), then all references to customers result in the generation of the appropriate SQL code which is sent to the SQL database.

Zim requires that each EntitySet and data relationship to be managed by the SQL database have at least one unique index defined for it. The unique index is a primary key for the SQL table to which the EntitySet or data relationship corresponds. A primary key is necessary to directly access any record (row) of any SQL table. It does this by generating select statements which specify values for the primary key column(s) of the table. For more information, see Primary Keys.

Distributing Data Between Zim and the SQL Database

When developing client-server database applications, it is important to consider the location of the data. Any data under the control of the database server contributes to both the load on the network as well as load on the server machine. Because of this, it is important to analyze the data associated with a given application and determine the best location (or locations).

Static data, or data that does not change, can be duplicated and distributed over the client workstations to reside under Zim control. This type of data is typically part of the application. A table of help screen text messages is an example of static data that can (or should) be located on the client workstation.

Data that changes on a monthly, weekly, or even daily basis can be located on both the client and server workstations. An application can down load this data (or part of it) to a local copy at an appropriate time. The single server copy would be updated as required and client workstations would pick up any updates automatically.

Finally, there is dynamic shared data that resides on the server and is shared by the client workstations. This type of data resides under the SQL database’s control and be accessed and manipulated from within Zim.

Zim IDE Overview

Unlock the Power of ZimIDE:

Streamlined Development Process: ZimIDE integrates essential development tools into a single environment, simplifying the workflow and boosting productivity.

Enhanced Collaboration: Support for multiuser development allows teams to work together seamlessly, improving efficiency and project outcomes.

Comprehensive Platform Support: With compatibility across multiple platforms, ZimIDE ensures that your applications can be developed and deployed in diverse environments.

Continuous Improvement: ZIM Corporation’s commitment to ongoing development means that ZimIDE will keep evolving with new features and enhancements, keeping you at the forefront of technology.

Experience the Power of ZimIDE: Transform your Zim application development with ZimIDE. Whether you’re designing complex GUIs, managing multiple databases, or collaborating with a team, ZimIDE provides the tools and features you need to succeed. Try ZimIDE today and see the difference it can make in your development process.


ZimIDE at a Glance

The Zim Integrated Development Environment (ZimIDE) is a comprehensive tool designed for creating graphical user interfaces (GUIs) for Zim database applications. It enhances and integrates the functionalities of three previously separate development components:

  • Zim Painter
  • Zim Development Center
  • Data Dictionary Browser

ZIM Corporation is dedicated to the ongoing development and enhancement of ZimIDE and the Zim language, ensuring continuous evolution with new features and improvements.


General Features:

  • Local and Remote Application Development: Develop applications both locally and remotely with ease.
  • Multiuser Application Development: Support for collaborative development in multiuser environments.
  • Design and Edit Forms and Displays: Create and modify forms and displays for both GUI and TUI applications.
  • Platform Support: Compatible with all Zim 9.50 platforms, including Windows, Linux, iOS, and Android.
  • Multiple Database Connections: Connect to multiple databases simultaneously.
  • Data Dictionary Browsing: Browse the entire data dictionary through the Tree View Tab Page.

Graphical User Interface Designer:

New UI Objects for Zim 9.50:

  • Grid Control: Enhanced from Zim 7.x.
  • Tab Control and Tab Page: Managed automatically by the client, requiring no extra Zim code.
  • Tool Strip: New addition for streamlined UI design.

New Attributes for Form Fields:

  • Anchoring: Control the positioning of form fields.
  • Docking: Manage the alignment and docking of form fields.
  • Attributes Tab Page: Configurable to be always visible for easy access.

Simultaneous Object Editing: Create and edit multiple objects at the same time. Modern Tabbed Interface: Each Form, Display, Window, Menu, and Document stays open in its own tab page for efficient multitasking.


Document Editor:

Specialized Editor: Embedded editor designed for Zim application programs and other documents. Syntax Highlighting: Customized for the Zim language to improve readability and reduce errors. Region Expanding and Contracting: Easily manage code regions for better organization. Custom Editor Support: Set a custom editor to tailor the development environment to your specific needs and preferences.

$editor Object:

  • Syntax: $editor
  • Return Value: A character string that can be reset by an application program.
  • Description: The name of the text editor software for editing programs. By default, $editor is set to the name of an editor commonly used on the current operating system or to the value of the editor in the registry. Since Zim-X 9.50, the default editor is set to “IDE”. The name should include the full disk path if necessary, and special file path indicator characters can be used. The value of this object is used by the EDIT command.
  • Example: let $editor = "c:dosedit.com"

Database Viewer Tab Page:

Simultaneous Database Browsing: Browse every database currently connected to the development environment in a single tab page.


Technical Overview:

Integration of Development Components:

  • Zim Painter: A powerful tool for designing and editing graphical user interfaces.
  • Zim Development Center: Provides a comprehensive environment for developing and managing Zim applications.
  • Data Dictionary Browser: Allows developers to browse and manage the data dictionary with ease.

Multiuser and Remote Development:

  • Local and Remote Development: ZimIDE supports both local and remote development, enabling flexibility and collaboration.
  • Multiuser Support: Facilitates collaborative development, allowing multiple users to work on the same project simultaneously.

Platform Compatibility:

  • Cross-Platform Support: ZimIDE is compatible with Windows, Linux, iOS, and Android, ensuring that applications can be developed and deployed across diverse environments.

Advanced UI Design:

  • New UI Objects: ZimIDE introduces new user interface objects such as Grid Control, Tab Control, and Tool Strip, enhancing the design capabilities.
  • Form Field Attributes: New attributes like anchoring and docking provide greater control over form field positioning and alignment.

Efficient Development Interface:

  • Tabbed Interface: The modern tabbed development interface allows developers to keep multiple forms, displays, windows, menus, and documents open simultaneously, improving multitasking and efficiency.

Enhanced Document Editing:

  • Embedded Document Editor: The specialized editor for Zim application programs offers syntax highlighting and region management, making code editing more efficient and error-free.
  • Custom Editor Support: Developers can set a custom editor, allowing for a personalized and optimized development experience.

Comprehensive Database Management:

  • Database Viewer: The Database Viewer Tab Page allows developers to browse all connected databases simultaneously, streamlining database management.

 

ZIMACTIV (Zim:X Product Activation)

Activates ZIM:X products and provides information about the activated products in your system.

Syntax

ZIMACTIV [action] [serial number] [activation key] [company name]

Parameters

actionAction to be taken in regards to an activation key. It can be one of

-a Activates the ZIM product based on the information provided by the subsequent parameters.

-c Checks the activation key.

I Lists information relevant to this activation key, such as validity, product, version, and so on.

-l Lists information about all currently activated and licensed ZIM products.

-m Indicates the platform to which this activation is applied.
Possible values are
1 – Windows
2 – Linux

-p Indicates the ZIM product to which this activation key applies.
Possible values are
1 – ZIM PDP
2 – ZIM ODBC Driver
3 – Server Access Modules (SAM)
4 – ZIM Web
5 – ZIM Backup Server

serial numberA five-digit number corresponding to the serial number of the ZIM product being activated. This number is provided by ZIM when you purchase the product.
activation keyA string of 16 characters corresponding to the activation key of the ZIM product being activated (hyphens are optional). This key is provided by ZIM when you purchase the product.
company nameA string of 8 to 50 characters corresponding to the name of the company that activates the ZIM product. This name is provided by ZIM when you purchase the product.

Comments

The ZIMACTIV utility performs various operations in regard to the current activation key or in regards to the currently activated and licensed ZIM:X products. Specifically, the “-a” option activates the ZIM product being installed, enabling the product to run.

The ZIMACTIV utility is invoked from the operating system prompt. To be run, ZIMACTIV requires at least the action parameter; if not present, you are prompted to enter it. You are prompted for any other required parameter as well.

The company name must be entered in quotation marks if blank spaces are part of the name. Lower and upper case, as well spaces, are ignored in this parameter; the company name cannot exceed of 50 characters.

Example

zimactiv -a 12345 ABCD-ABCD-ABCD-ABCD "Name of the Company"

ZIMFIX (Repair Facility)

Checks the integrity of EntitySet or relationship files and, optionally, repairs any damage found.

Syntax

ZIMFIX [object [dirname]] [O=filename] [-r]

Parameters

objectThe name of an EntitySet, a relationship with fields, or an application directory. A role name can be used. If omitted, the software prompts for the information.
dirnameThe name of the application directory in which object is located. If omitted, ZIMFIX searches for object in any application directory. If object corresponds to more than one database file, you must supply the dirname.
O=filenameAn option that causes ZIMFIX to write progress and error messages into filename rather than displaying them on the terminal screen.
-rAn option (“repair mode”) that instructs ZIMFIX to attempt to repair any damage it detects. If omitted, the damage is reported, but no repairs are attempted.

Comments

ZIMFIX can check either files or directories for damage, or check for and repair damage. ZIMFIX first addresses the structural integrity of the database file, then addresses the correspondence between data and indices in the file.

If a system failure occurs, ZIMFIX should be used to determine if data has been lost or the integrity of the database corrupted. If so, ZIMFIX can repair the damage, if possible.

The messages output by ZIMFIX identifies a damaged record by its record number. You should examine the content of all records repaired by ZIMFIX, as lost data cannot always be reconstructed.

Warning: ZIMFIX with the repair option (-R) repairs a database file in place. Before running ZIMFIX, you must run ZIMDD to ensure that the list of database files is current. Furthermore, you should make a backup copy of the damaged database before proceeding.

Example

zimfix customers -r

The preceding command causes ZIMFIX to check and repair the database file that corresponds to the Customers EntitySet.

find 25 customers
bottom
list

The ZIMFIX command in the above example reports that it repaired record number 25 in the EntitySet.

See Also

ZIMDD (Repair Facility)

ZIMFILES (Database Browser)

Processes application directory files, listing all objects and their associated disk files.

Syntax

ZIMFILES  [option]

Parameters

optionCan be
No options
+v [-h]
+a [-h]
+f [+s]
+p [+s]
+u [+s=delimiter]
+i
OptionDescription
No optionsIf no options are used, only the names of the disk files created by the software are displayed.
+v [-h]+v displays all objects in the application database that have corresponding disk files. -h (used with +v) suppresses headings for the columns of information being displayed.
+a [-h]+a displays all objects in the application database regardless of whether they have corresponding disk files. -h (used with +a) suppresses the display of headings for the columns of information being displayed.
+f [+s]+f displays a list of all defined fields in the application database. The fields are displayed under headings that correspond to the field names in the Fields EntitySet. An additional heading, SFN, provides the index number for indexed fields (used in conjunction with the Programming Language Interface). +s displays system-defined objects as well as user-defined objects.
+p [+s]+p displays the permissions for objects in the application database. (This option is available only to the superuser.) +s (used with +p) displays system-defined objects in addition to user-defined objects, and displays the database encryption key.
+u [+s=delimiter]+u displays list of the users defined in the Users EntitySet in the application database. (This option is available only to the superuser.) The +s=delimiter option prints all user information separated by the indicated delimiter, where delimiter is a single character.
+i+i displays the system numbers for all objects in the ZIM:X directory. The limit is 65 000 create functions in a ZIM:X directory. Use the +i switch to determine how close to the limit you are.

Comments

If an application program has been compiled, its name has a -c suffix in the ZIMFILES listing.

Predefined Color Constants

These numeric constants are in Zim’s data dictionary. They can be used instead of the number value to make your code more readable.

Color Constant NameValueColor Constant NameValue
Inherited from the parent0cInactiveCaptionTxt19
Black1cWindowText20
Blue2cWindowFrame21
Green3cScrollBarColor22
Cyan4cMenuTextColor23
Red5cMenuColor24
Magenta6cInactiveCaption25
Brown7cInactiveBorder26
LightGrey8cHighlightText27
DarkGrey9cHighlightColor28
LightBlue10cGreyText29
LightGreen11cCaptionText30
LightCyan12cButtonText31
LightRed13cButtonShadow32
LightMagenta14cButtonFace33
Yellow15cWindowBackground34
White16cAppWorkSpace35
cWindowColor17cActiveCaption36
cButtonHighlight18cActiveBorder37

ZIMPROMPT

ZimPrompt is a text-based utility that enables you to run zim programs from the command line.  It provides a basic language interaction with a Zim-X database.

zimprompt -n database [-u user] [-p password] [-c command] [-o port] [-h host name] [-w work path]

Parameters

-n databaseis one of the database names provided in the zimdb.zim configuration file when Zim Server was started. This parameter is obligatory
-p passwordis the password for this user as known by Zim:X. The users ZIM and super don’t have a password; just provide the parameter as -p “”. If omitted, it is assumed the null string (“”)
-u useris a user name known by Zim:X. Usually, any Zim database contains, by default, the users ZIM and super.  If omitted, this parameter is assumed “ZIM”
-c commandis the Zim:X command you want to execute when Zim starts.  If omitted, it is assumed “zimprof”
-o portis the server port number used to connect to Zim Server as specified in zimconfig.srv configuration file.  It omitted, this port is “6002”
-h hostnameis the name of the machine where Zim Server is running. It can be a name or an IP address known to the network.  If omitted, it is assumed “localhost”
-w work pathis an operating system absolute address where temporary files used by this Zim session will be placed. If omitted, it is assumed the null string (“”)

Comments

When Zim:X starts, it connects to ZimServer using the database name specified, takes the appropriate parameters from the database configuration file, and then either executes immediately the Zim command specified in the parameters or prompts the user.

If one or more parameters are missing, then Zim:X will prompt the user to provide the correct information.

Note: The parameter “-w” is provided to allow administrators to determine exactly which directory of the operating system should be used as the work path for the current Zim session.

ZimPrompt only processes statements like a FIND, ADD, and so on whereas Forms, Windows, and Menu operations are not allowed because the utility is only text-based.

ZIMDD (Repair Facility)

Produces structural information about database files.

Syntax

ZIMDD

Comments

ZIMDD analyzes the application directory files in your database, producing information about the structure of the files. The information is written to two output files whose names are system-dependent.

ZIMDD should be used immediately before executing a ZIMFIX, because ZIMFIX needs the structural information produced by ZIMDD.

To use the graphical version, activate the Administrative Utilities icon in the Zim program group. When the window containing the utilities opens, activate the File Repair icon and complete the dialog box appropriately.

See Also

ZIMFIX (Repair Facility)

en_CAEnglish