Data IO Overview

Introduction


Overview

Using data IO (DBIO) objects, you can load external data to Asprova's data and write Asprova's data in external data.

Data I/O (DBIO) Object

The DBIO objects can import, export, and synchronize tables specified in the "Table name" property. You can display the DBIO objects owned by the currently opened project by selecting [File] - [Data IO Settings] from the menu.

You can create multiple DBIO objects and can delete them if necessary. Whether or not to import, export, or synchronize can be specified by the properties "Import", "Export", and "Synchronize".

These DBIO objects are specified and operated by the import, export, and synchronize commands. For example, for the default import command ([Project] - [Command] - [Database input/output] - [Import]), "DBIO" is specified for the "DBIO object (Import)" property, which indicates to select all the DBIO objects. Specifying here a DBIO object code enables you to create commands only for DBIO.


Adding an DBIO object

You can add a new DBIO object to the data IO settings by following the steps below:

  1. Select [File] - [Data I/O Settings] from the menu to open the database IO settings table.
  2. In the last row of the Code column, specify a unique code using a character string.
  3. Specify a table name, referring to class names that have already been specified.

Specify values for other properties as appropriate according to the method of data IO.

Data source

From the property "Data source", you can select either "OLE DB" or "Text file".


OLE DB

If you select "OLE DB", you will select the OLE DB driver for the database you are going to use from the property "Folder/Database" and also specify the table in the connected database the from the property "Folder/Database".

Please refer here for the notes on OLE DB connection.


Password encryption

When setting the password in the dialog below, the password contained in the connection string will be encrypted for security. (This was added from Ver.6.1.2)

 

For projects created prior to Ver.6.1.2, the password in the connection string can be encrypted by setting it once more with Ver.6.1.2. Passwords will not be encrypted automatically simply by using Ver.6.1.2 or newer.
When the password is not encrypted, it can be seen by looking at the connection string (Folder/database property of the DBIO object) and copied and pasted freely.

* Connection functionality is not affected by whether the password is encrypted or not.


Text file

If you select "Text file", you will select the folder in which to save the file from the property "Folder/Database" and also specify the name of the text file to save from the property "Folder/Database". Using the property "Field and decimal delimiters", you can select comma or tab delimiters.
By default, "Data source" is set to "Text file" and "Field and decimal delimiters" to "Tab & dot". "Folder/Database" is left blank. If it is blank, the text file will be saved in the same folder as the Ar3 file



Field Mapping

Each table has many properties (fields). You can specify which fields to import and export using the field mapping. Field mapping can be specified for each DBIO object. You can edit the field mapping using the Mapping view window.

The properties of field mapping can be copied and pasted as follows. (From Ver.6.0.1)



If you link Asprova APS's tables to RDBMS, you cannot use special characters (e.g. &, %, #, /, and etc.) for table names and field names in RDBMS. Namely, you cannot use characters other than English characters from A to Z, numbers from 1 to 9, and other languages. Also, you cannot use a number (whether single or double byte) for the first character of a field name.

For the default data IO, click here.


Primary Key

The identity between records in Asprova's internal data and external data is determined by matching of all the primary keys. In the order table, Order code is set as primary key by default. If you also specify Order type as primary key, two records with the same order code but different order type will be regarded as different records. You can edit primary keys in the field mapping window. In the current spec, you cannot specify Object ID as primary key.


Settings for Each Field

In the data IO settings, you can make the following settings for each field. To do this, select one of the field names from External fields and specify values in the properties window. The right table of the mapping view is the list of Field Definition Class objects owned by the data IO object. Each of these objects corresponds to each field. Therefore, you will specify values for the following properties for each field.


Property merge rule

Specify here the merge rule for importing. See Merge rule and status flag for details.

Enclose by double quotations

When the external data source is a text file and "Field and decimal delimiters" is set to "Comma & dot", specify here whether or not to enclose data by double quotations. Setting "Yes" means to enclose by double quotations and "No" means not to enclose data by double quotations.

Auto-generate object

For the fields of which the property type is "WBSRef", specify here whether or not to generate objects automatically using the imported data. Setting "Yes" will auto-generate objects and "No" will not auto-generate objects. For example, by specifying "Yes" for "Auto-generate object" of Item code of Order, the item object specified for an order will be generated automatically if it is not set to the item. If you set the property to "No", the item object will not be generated automatically but an error message will be displayed in the message window. In that case, the item code of the order will be blank.

Export default value

When selected "Yes" and no value is defined for the field, a default value (if set) is exported.
For the default value, click here.

Time span unit

For the fields indicating time, specify here the unit to be used for data to be imported and exported. Available units are:

Second

Data to be imported and exported is in seconds.

Minute

Data to be imported and exported is in minutes.

Hour

Data to be imported and exported is in hours.

Notes

When Asprova data cannot be imported to a network drive folder on Windows 8, Windows 7, Windows Vista or later Windows OS because of Windows user privileges, it will cause "There is an error in DBIO settings." error message. Much more information please refer to here.


HelpNo.:757100
© Since 2018 Asprova Corporation, All rights reserved.