Data I/O Class


( Specify here information about I/O with external data sources. )

<ASIDBIO> Interface

 

Property Overview

TabProperty NameData TypeDescription

General

Internal table name
(TableName)

<Basic><Standard>
TableName
<BSTR> Data Type

String

Specify here the table for data I/O in string. If you specify the code of table root existing under the project, that table will be the target. You can also specify those not existing under the project such as IntegratedMaster (Integrated Master), Operation (operation table), Task (task table), InputWorkInstruction (input instruction table), OutputWorkInstruction (output instruction table), UseWorkInstruction (use instruction table), Peg (peg table), and Result (results table).

 

Data source
(DataSource)

<Basic><Standard>
DataSource
<TDataSource> Data Type

Enum

Specify either a text file or OLE DB.


ValueNameDescription
Text FileText fileUses text files as the external data source.
OLE DBOLEDBUses OLEDB as the external data source.
DSUDSNot used. Transfers data to Asprova DS.
DSADS*Internally used. Transfers data to Asprova DS.
Text File UText file(Unicode)Uses Unicode (UTF-8) text files as the external data source.

 

Folder/database
(ConnectString)

<Multi>
<Basic><Standard>
ConnectString
<BSTR> Data Type

String

For OLE DB, specify a connect string to the external database. For a text file, specify the folder in which the file exists. If blank, the project file path of the workspace is used.

 

Schema
(DBIO_Schema)

<Basic><Standard>
Schema
<BSTR> Data Type

String

Schema of the external table. Valid only when the data source is OLE DB. This value will be automatically set when the user selects the name of an external table.

 

External table name
(FileName)

<Basic><Standard>
FileName
<BSTR> Data Type

String

Specify here a file name when the data source is a text file and a table name when the data source is OLE DB.

 

Field and decimal delimiters
(FieldAndDecimalDelimiters)

<Basic><Standard>
FieldAndDecimalDelimiters

Enum

Specify here the field delimiter and decimal delimiter when the external data source is a text file. When the external data source is OLE DB, they will be identified automatically and you don't need to set this property.


ValueNameDescription
COMMA&DOTComma & dotUses commas for text field delimiters and dots for decimal point delimiters.
TAB&DOTTab & dotUses tabs for text field delimiters and dots for decimal point delimiters.
TAB&COMMATab & commaUses tabs for text field delimiters and commas for decimal point delimiters.

 

Date format
(DateFormat)

<Standard>
DateFormat
<TDateFormat> Data Type

Enum

Specify here the date format to be used when the external data source is a text file.


ValueNameDescription
YMDY/M/DSpecify YYYY/MM/DD as the date format to be used in text file I/O.
MDYM/D/YSpecify MM/DD/YYYY for the date format to be used in text file I/O.
DMYD/M/YSpecify DD/MM/YYYY for the date format to be used in text file I/O.

 

Field mapping
(FieldsOption)

<Multi>
<Basic><Standard>
MappedProperty
<ASOPropertyDef> Data Type

Object

List of properties to be output to the external data source. For text files, the layout of the table follows the order in which the properties are listed in this list.

 

Primary key
(PrimaryKey)

<Multi>
<Basic><Standard>
PrimaryKey
<LONG> Data Type

Integer

Key(s) to be used during importing external data. When merging data, Asprova determines the identity between external and internal objects according to whether all the properties of this primary key are the same. You can edit the primary key in the field mapping window.

 

First row is field info
(FirstRowIsFieldInfo)

<Standard>
FirstRowIsFieldInfo

Enum

Specify whether the first row is field information or not when the external data source is a text file. When exporting, the code, display name, alias will be exported, and when importing the field mapping will not require setting since the meaning of each column can be obtained from the first row of the file.


ValueNameDescription
0NoThe first file of the text file is normal data
1Yes (code)The first row of the text file is the property code eg. Order_Code
2Yes (alias/display name)(Only for exporting) The first row of the text file is the display name or alias of the property eg. Order code
3Yes (code and field info)The first row of the file contains field information. The format is, property code;property id;primary key. eg. Order_Code;1181;* If you also want to re-import data using the header fields, use this same setting.
4Yes (alias/display name and field info)The first row of the file contains field information. The format is, property name or display name;property id;primary key. eg. Order code;1181;* If you also want to re-import data using the header fields, use this same setting.

 

Synchronize
(DBIO_Synchronize)

<Standard>

Enum

Specify here whether or not to synchronize with external data source.
If you select Yes, data will be synchronized with external data source when you execute [File] - [Synchronize] from the menu.


ValueNameDescription
0NoDoes not synchronize with external data source.
1YesSynchronizes with external data source.

 

SQL command type
(SqlCommandType)

<Standard>
SqlCommandType

Enum

Specify here the type of SQL commands for data export using OLE DB. If there is the possibility that the value of a primary key specified in Asprova is NULL, please select the full text type. The parameter type is characterized by faster processing than the full text type.


ValueNameDescription
FullTextFull textData will be updated by a SQL statement for each record. If there is the possibility that the value of a primary key specified in Asprova is NULL, please select this type.
ParameterParameterData will be updated by compiling an SQL statement only once, and using the data as parameters in the statement, for a speed improvement.

 

RDB transaction
(Transaction)

<Standard>
Transaction
<TTransaction> Data Type

Enum

Specify whether or not to perform I/O as a transaction when data import/export is executed. Rolls back when an error occurs. Rollback is performed for each command. Namely, if an error occurs during export to a table, all the tables that have already been exported will also be rolled back.


ValueNameDescription
0NoDoes not perform I/O as a transaction.
Even if an error occurs during export, actions performed up to that point will be reflected as they are.
1YesPerforms I/O as a transaction.
If an error occurs during export, Asprova will roll back the table in which the error occurred. Tables for which the property Transaction is set to Yes and that had already been exported before the error occurrence will also be rolled back. (However, this rollback will be performed only for the export within the same export command).

 

DBIO update time
(DBIO_FlagDate)

<RO>
<Standard>
FlagDate
<DATE> Data Type

Time

Date on which the DBIO was updated (date of the last import). Used for differential mode.

 

Error code
(DBIO_ErrorCode)

<RO> <Multi>
<Basic><Standard>
ErrorCode
<BSTR> Data Type

String

Error code which occurred during importing or exporting. The ID of the error message, or the OLE DB error code (for OLE DB connections this will begin with 0x) will be set. For error message IDs, the message can be double-clicked on to view possible solutions. For OLE DB error codes, please consult MSDN documentation or other sources of reference.

 

Primary key(property name)
(DBIO_PrimaryKeyString)

<Multi>
<Standard>

String

Set the primary key by the property name. Valid only for datasources of type DS*

Import

Import
(IsLoadTable)

<Basic><Standard>
IsLoadTable
<TIsLoadTable> Data Type

Enum

Specify here whether or not to import.


ValueNameDescription
NNoDoes not import data.
YYes (differential)Imports data.
RYes (refresh)Refreshes data. Items, master input instructions, master output instructions, and master use instructions that are referred to by operations will not be deleted.
FRYes (forced refresh)Refreshes data. Operations will be forcibly unassigned when items, master input instructions, master output instructions, and master use instructions to which the operations refer have been deleted.
RIYes (refresh by item)Can be specified for the Integrated Master Editor table only. Refreshes data by items.
FRIYes (forced refresh by item)Can be specified for the Integrated Master Editor table only. Forcibly refreshes data by items.
RCYes (refresh by customer)Can be specified for the Purchase Master Editor table only. Refreshes data by customers.
FRCYes (forced refresh by customer)Can be specified for the Purchase Master Editor table only. Forcibly refreshes data by customers.

 

Import SQL filter command
(DBIO_ImportSQLFilterStr)

<Standard>
ImportSQLFilterStr
<BSTR> Data Type

String

Used for filtering the records to import from the external database. When Asprova sends the SQL command to the database, the value set here will be appended as part of the WHERE clause, so this property needs to be set with correct SQL syntax.

 

Import external filter expression
(DBIO_ImportFilterExpr)

<Standard>
ImportFilterExpr
<ASVExpression> Data Type

Expression

Used for filtering objects imported from an external source. Example: When you want to import only the orders of the type Manufacturing from the order table, the expression will be ME.Order_Type=='M'.

 

Import internal filter expression
(DBIO_ImportInternalFilterExpr)

<Standard>
ImportInternalFilterExpr
<ASVExpression> Data Type

Expression

Used for filtering objects already existing in Asprova, to use when merging with incoming data. Example: When you want to import only the orders of the type Manufacturing from the order table, the expression will be ME.Order_Type=='M'.

 

Import property conversion expression
(DBIO_ImportPropertyConvertExpr)

<Multi>
<Standard>
ImportPropertyConvertExpr
<ASVExpression> Data Type

Expression

Sets properties of each object in the way you specify when importing the object. (Modify) Example: To set the property order type in the order table, the expression will be ME.Order_Type='M'.

 

# rows to skip
(NumberOfSkipRows)

<Standard>
NumberOfSkipRows
<LONG> Data Type

Integer

Specify here the number of rows to be skipped from the top of the file when the external data source is a text file. When using the 'First row is field info' method, the first row the input file will be used as field info regardless of the setting here.

 

Record merge rule
(RecMergeRule)

<Standard>
RecMergeRule
<LONG> Data Type

Integer

Specify here the rule for merging between objects for which the primary keys match when import/synchronization is executed.
0 means that all the flags are set to Internal and 65535 means that all the flags are set to External.

Export

Export
(IsSaveTable)

<Basic><Standard>
IsSaveTable
<TIsSaveTable> Data Type

Enum

Specify whether or not to export.


ValueNameDescription
NNoDoes not export data.
YYes (differential)Executes differential data export.
Text files: Does not export if the internal status flag of all the target objects shows None.
OLE DB: Exports data for which the internal status flag shows values other than None.
AYes (all)Exports all data.
Text files: Always exports all objects ignoring the status flag.
OLE DB: Always exports all objects even if differential export is set and values are registered for Update time and Internal status flag in the field mapping.
IYes (differential by item)Can be specified for the Integrated Master Editor table only. Executes differential data export by items.
CYes (differential by customer)Can be specified for the Purchase Master Editor table only. Executes differential data export by customers.

 

Export filter expression
(DBIO_ExportFilterExpr)

<Standard>
ExportFilterExpr
<ASVExpression> Data Type

Expression

Used for filtering data to be output during export. Example: When you want to export only the orders of the type Manufacturing from the order table, the expression will be ME.Order_Type=='M'.

 

Export SQL filter command
(DBIO_ExportSQLFilterStr)

<Standard>
ExportSQLFilterStr
<BSTR> Data Type

String

Used for filtering the records to clear in the external database when exporting. When Asprova sends the SQL command to the database, the value set here will be appended as part of the WHERE clause, so this property needs to be set with correct SQL syntax.

 

Export property conversion expression
(DBIO_ExportPropertyConvertExpr)

<Multi>
<Standard>
ExportPropertyConvertExpr
<ASVExpression> Data Type

Expression

Sets properties of each object in the way you specify when exporting the object. Example: To set the property order type in the order table, the expression will be ME.Order_Type='M'.

 

Export sort expression
(DBIO_ExportSortExpr)

<Standard>

Sort expression

Used for sorting data to be output during export.

 

Export deleted objects
(DBIO_ExportDeletedObjects)

<Standard>

Enum

Specify whether or not to export deleted objects. Valid only when more than one primary key is set. Since generation is performed according to the difference with the primary keys of the objects output the last time, generation may fail if you have changed the primary keys or export filter expression. If you change either of the properties, change after exporting the deleted object.


ValueNameDescription
NNoDoes not export deleted objects as records.
FYes (primary key)Exports deleted objects with the status flag set to Deleted. Blank except for primary key, object ID, and update time (in the case of text file). Searches the record by primary key and set the status flag to Deleted (in the case of OLE DB).
DYes (primary key/delete records)Searches and deletes external records from the table according to a match of primary key. Valid only for OLE DB.
OYes (object ID)Exports the object ID of the deleted object and the status flag Deleted. Valid for text files and OLE DB.

 

Export duplication check
(DBIO_ExportDuplicationCheck)

<Standard>
ExportDuplicationCheck

Enum

Performs duplication check for the data to be output during export using a primary key.


ValueNameDescription
NNoDoes not perform duplication check.
MOutput messagePerforms duplication check and outputs a message if duplication is found.
RRoll backPerforms duplication check and rolls back if duplication is found.

 

Clear table before export
(ClearTableBeforeSave)

<Standard>
ClearTableBeforeExport
<VARIANT_BOOL> Data Type

Enum

Specify whether or not to clear the external table when it is saved using OLEDB. Yes means to clear and No means not to clear. No is set by default.


ValueNameDescription
0No (Show confirmation)Does not clear the external table before exporting the table. If [Export] is Yes (all), a confirmation dialogue will be shown.
1Yes (Show confirmation)Clears the external table before exporting the table. If [Export] is Yes (differential), a confirmation dialogue will be shown.
2NoDoes not clear the external table before exporting the table.
3YesClears the external table before exporting the table.

Common

Code
(Code)

<Basic><Standard>

String

Name of the object used internally. The code does not need to be unique including objects such as order. In that case, however, other property should be added to the DBIO primary key for a merge process during import and synchronization. Also, in cases where orders are specified by code such as for next orders, behavior is undefined.

 

Display name
(DisplayString)

<Standard>

String

Display name held internally in Asprova. If a value is set here, the display name will be displayed in place of the code. Starting with Ver4, single quotations (') are not allowed.

 

Alias
(DisplayAlias)

<Standard>

String

Specify here an alias of the object. If a value is set here, the alias will be displayed in place of its code or display name.
To display an alias, you need to select User defined aliases from [Workspace] - [General] - [String display method] (The default is set to this value). Starting with Ver4, single quotations (') are not allowed.

 

Comments (common)
(Comment)

<Multi>
<Standard>

String

Enter comments here. This property is common to each class and you can use it for Properties to be copied to operation from order of the Project class and so on.

 

Object ID
(ObjectID)

<RO>
<Standard>

Unsigned integer

ID number defined by each object.

 

Parent
(Parent)

<RO>
<Standard>

Object

The object at one level higher than this object.

 

Children
(Child)

<RO> <Multi>
<Standard>

Object

Objects at one level lower than this object.

 

Class definition
(Object_ClassDef)

<RO>
<Standard>

Object

Object that defines the class information of this object.

 

Internal status flag
(Object_StatusFlag)

<RO>
<Standard>

Enum

Represents the status such as whether the object was added or changed within Asprova.


ValueNameDescription
 NoneThis record has not been changed.
ANewly addedThis record has been newly added.
MModifiedThis record has been modified.
DDeletedThis record has been deleted.

 

Status flag
(Object_StatusFlagExt)

<RO>
<Standard>

Enum

Represents the status such as whether the object was added or changed outside Asprova.


ValueNameDescription
 NoneThis record has not been changed externally.
ANewly addedThis record has been newly added externally.
MModifiedThis record has been modified externally.
DDeletedThis record has been deleted externally.

 

Invalid flag
(Object_InvalidFlag)

<RO>
<Standard>

Bool

Indicates whether the object is invalid or not.

 

Reason to be invalidated
(ReasonToBeInvalidated)

<RO> <Multi>
<Standard>

Enum

Reason why the invalid flag is on.


ValueNameDescription
NNo valid master for order explosionNo valid master exists when orders are exploded.
LBMaster loop (master object)Master object in which a loop was detected.
LNMaster loop (master input instruction)Master input instruction in which a loop was detected.
LIMaster loop (item)Item in which a loop was detected.
FOrder explosion failureOrder explosion failed at last execution.
LIntegrated master loopItem that is detected to have a loop in the integrated master, and it's auto replenishment flag is not No.
GFailed to build groupsGroup hierachy exceeded the maximum limit of 20 levels deep.
GLFound a loop inside groupA loop has been detected inside a group.
D  
RUnneeded result operationRegarded as unneeded during the last order explosion but was not deleted because results data was specified for the operation.

 

Update time
(FlagDate)

<RO>
<Standard>

Time

Updated when import/export/synchronization is executed. Note that this is not the time at which data is changed through the GUI, rescheduling, and so on.

Internal

Command
(Command_Import_DBIO_Rev)

<RO> <Multi>

Object

Internally used.

 

Command
(Command_Export_DBIO_Rev)

<RO> <Multi>

Object

Internally used.

 

Internal fields
(Fields)

<RO> <Multi>
<Standard>

Object

List of properties related to this object class. The properties to be output to the external data source should be selected from this list.

 

External fields
(FieldsExternal)

<RO> <Multi>
<Standard>

Object

Information about field mapping for external data source, which is displayed in the table on the right of the field mapping window.

 

Class definition
(TargetClassDef)

<RO>
TargetClassDef
<ASOClassDef> Data Type

Object

Merely indicates class definition and has no relation with the class of this object.

 

Exported object list
(DBIO_ExportedObjectManager)

<RO>
<Standard>

Object

Used internally.

 

Last exported primary key list
(DBIO_LastExpotedPrimaryKeyList)

<RO> <Multi>
<Standard>

Integer

Internally used property.

 

Enum value export strings
(DBIO_EnumString)

<Standard>

Enum

Selects the strings of enum values to be exported. Asprova up to Ver.4.0.0.1 used to have long strings for enum values. (Example: Yes (Calculate Result Qty) for Match original qty in the item class). This option was provided to enable making an interface using short codes while guaranteeing compatibility with existing operating environments. When creating a new project on Asprova from Ver.4.0.0.2 and beyond, the default value will be standard code, whereas the default value in projects created on earlier version will be strings.


ValueNameDescription
SStandard codeExports enum values in short strings.
LTextExports enum values in easily comprehensible strings. (Not all properties are supported.)

All Properties

Command
(Command_Synchronize_DBIO_Rev)

<RO> <Multi>

Object

Internally used.

 

Code/Display name/Alias
(Object_CodeDisplayNameOrAlias)

String

Corresponds to the code, display name or alias depending on the setting in the property String display method of the workspace.

 

Currently editing user code
(Object_UserDuringChangeCode)

<RO> <Multi>

WBSRef

Temporarily used when importing/exporting Currently editing user. Mapped in DBIO's [Field mapping].

 

User with right to edit code
(Object_UserDuringCheckOutCode)

<RO> <Multi>

WBSRef

Temporarily used when importing/exporting Reserved right to edit user. Mapped in DBIO's [Field mapping].

 

Owner code
(Object_OwnerUserCode)

<RO> <Multi>

WBSRef

Temporarily used when importing/exporting Owner. Mapped in DBIO's [Field mapping].

 
 
ConnectStringCount
<LONG> Data Type
<RO>

 

Number of elements in ConnectString property's array.

 
ImportPropertyConvertExprCount
<LONG> Data Type
<RO>

 

Number of elements in ImportPropertyConvertExpr property's array.

 
ExportPropertyConvertExprCount
<LONG> Data Type
<RO>

 

Number of elements in ExportPropertyConvertExpr property's array.

 
PrimaryKeyCount
<LONG> Data Type
<RO>

 

Number of elements in PrimaryKey property's array.

 
ChildAsDBIO
<ASIDBIO> Data Type
<RO>

 

Obtains the child object specified as Index.
[in:LONG]Index: Position of the child object.

 
AddChildAsDBIO
<ASIDBIO> Data Type
<Method>

 

Adds a child object with a newCode name.
[in:BSTR]newCode: Name of the new child object.

 
GetAsObject
<ASOObject> Data Type
<Method>

 

Obtains property value as object.
[in:TPropertyID]PropertyID: Specifies the ID of the properties to obtain.
[in:LONG]Index: Specifies the Index of the property.

 
SetAsObject
<VOID> Data Type
<Method>

 

Sets properties as object.
[in:TPropertyID]PropertyID: Specifies the ID of the properties to set.
[in:LONG]Index: Specifies the Index of the property.

 
GetAsInteger
<ASOObject> Data Type
<Method>

 

Obtains properties as integer.
[in:TPropertyID]PropertyID: Specifies the ID of the properties to set.
[in:LONG]Index: Specifies the Index of the property.

 
GetAsExpression
<ASOObject> Data Type
<Method>

 

Obtains properties as expression.
[in:TPropertyID]PropertyID: Specifies the ID of the properties to set.
[in:LONG]Index: Specifies the Index of the property.

 
GetAsTime
<ASOObject> Data Type
<Method>

 

Obtains properties as time.
[in:TPropertyID]PropertyID: Specifies the ID of the properties to set.
[in:LONG]Index: Specifies the Index of the property.

 
GetAsTimeSpan
<ASOObject> Data Type
<Method>

 

Obtains properties as time span.
[in:TPropertyID]PropertyID: Specifies the ID of the properties to set.
[in:LONG]Index: Specifies the Index of the property.

 
GetAsDouble
<ASOObject> Data Type
<Method>

 

Obtains properties as float.
[in:TPropertyID]PropertyID: Specifies the ID of the properties to set.
[in:LONG]Index: Specifies the Index of the property.

 
GetAsBool
<ASOObject> Data Type
<Method>

 

Obtains properties as boolean.
[in:TPropertyID]PropertyID: Specifies the ID of the properties to set.
[in:LONG]Index: Specifies the Index of the property.

 
GetAsEnum
<ASOObject> Data Type
<Method>

 

Obtains properties as enum.
[in:TPropertyID]PropertyID: Specifies the ID of the properties to set.
[in:LONG]Index: Specifies the Index of the property.

 
SetAsInteger
<VOID> Data Type
<Method>

 

Sets properties as integer.
[in:TPropertyID]PropertyID: Specifies the ID of the properties to set.
[in:LONG]Index: Specifies the Index of the property.

 
SetAsExpression
<VOID> Data Type
<Method>

 

Sets properties as expression.
[in:TPropertyID]PropertyID: Specifies the ID of the properties to set.
[in:LONG]Index: Specifies the Index of the property.

 
SetAsTime
<VOID> Data Type
<Method>

 

Sets properties as time.
[in:TPropertyID]PropertyID: Specifies the ID of the properties to set.
[in:LONG]Index: Specifies the Index of the property.

 
SetAsTimeSpan
<VOID> Data Type
<Method>

 

Sets properties as time span.
[in:TPropertyID]PropertyID: Specifies the ID of the properties to set.
[in:LONG]Index: Specifies the Index of the property.

 
SetAsDouble
<VOID> Data Type
<Method>

 

Sets properties as float.
[in:TPropertyID]PropertyID: Specifies the ID of the properties to set.
[in:LONG]Index: Specifies the Index of the property.

 
SetAsBool
<VOID> Data Type
<Method>

 

Sets properties as boolean.
[in:TPropertyID]PropertyID: Specifies the ID of the properties to set.
[in:LONG]Index: Specifies the Index of the property.

 
SetAsEnum
<VOID> Data Type
<Method>

 

Sets properties as enum.
[in:TPropertyID]PropertyID: Specifies the ID of the properties to set.
[in:LONG]Index: Specifies the Index of the property.

 
MappedPropertyCount
<LONG> Data Type
<RO>

 

Number of elements in MappedProperty property's array.


<RO> : Read-Only
<Multi> : Array Type (Starting From 1)

<Basic> : Displays in basic mode
<Standard> : Displays in standard mode

See Also

DBIO


HelpNo.:C7

© Since 2019 Asprova Corporation, All rights reserved.