OMrun Help Online Manual for OMrun Version 4

Customize own data adapter


OMrun Data Object Icon

You can add your own adapter or copy an existing adapter and fit it to your needs by changing the connect string.

  1. From OMrun Ribbon choose Config.
  2. Select tab data adapter.

Column Description
DB Type

Describes what kind of data can be read with this adapter.

Trusted
  • Select checkbox to connect to the data with the credentials of the current user logged-in.
  • Deselect checkbox to connect to the data with user id and password field provided by Connect String.
Provider Group

Displays all the included Data Provider. These information are predefined and can't be changed. If you need an additional data adapter, please contact us.

Connect String

The connect string contains the information that the provider need to know to establish a connection to the database or the data file.

Assembly:
• A connect string consists of a series of keyword - value pairs separated by semicolons (;)

  • The equal sign (=) connects each keyword and its value
    Example: Key1=Value1;Key2=Value2;Key3=Value3;
  • The information in the connection string is passed on to the provider

The connect string may contains placeholders like myServer, myDataBase and myUserName, myPassword and myPort.
These placeholders will be resolved in Environment.

Click here for more information about connect strings (external link).

Remark

Enter your comments or parameter description here.


Special Settings

The adapters "Avaloq (Oracle)" and "Avaloq (TNS Oracle)" contain the variable @SessionUnlock which has to be filled in field "Data Source" on screen Environment as example shown below with the specific command to open the session security for Avaloq systems.


Text Files

Options for text files with OLEDB Adapter: Extended Properties="text;HDR=yes;IMEX=1;FMT=Delimited";

Notice that only the directory for the text file is specified in the connection string. The filename of the text file is specified in the T-SQL commands that access data in the text file, similar to a table name in a database.

Keyword Remark
HDR=No

First row does not contain field description.

HDR=Yes

First row contains field description.

FMT=Delimited

Delimited fields with default delimiter.
See Windows start button → settings → control panel → regional settings, Number tab → list separator

You can access files that use nonstandard text delimiters and fixed-width text files by creating a schema.ini file in the same directory as the text file. A text file, vehicle_semi.txt.

A possible schema.ini file for the vehicle_semi.txt file is:

The connect string contains the information that the provider need to know to establish a connection to the database or the data file.

Assembly:
• A connect string consists of a series of keyword - value pairs separated by semicolons (;)

  • The equal sign (=) connects each keyword and its value
    Example: Key1=Value1;Key2=Value2;Key3=Value3;
  • The information in the connection string is passed on to the provider

The connect string may contains placeholders like myServer, myDataBase and myUserName, myPassword and myPort.
These placeholders will be resolved in Environment.

Click https://www.connectionstrings.com/ for more information about connect strings (external link).

Enter your comments or parameter description here.

Format=CSVDelimited

Fields are delimited with commas. This is the default value.

Format=Delimited(customCharacter)

Fields are delimited with a custom character. You can use any single character except the double quotation mark (") as a delimiter.

Format=FixedLength

Fields are fixed length. If the ColumnNameHeader option is True, the first line containing the column names must be comma-delimited.

Format=TabDelimited

Fields are delimited with tabs.

You can specify the fields in the text file in two ways:

  • Include the field names in the first row of the text file and set the ColNameHeader option to True.
  • Identify each column using the format ColN (where N is the one-based column number) and specify the name, width, and data type for each column.

The MaxScanRows option indicates how many rows should be scanned to automatically determine column type. A value of 0 indicates that all rows should be scanned.

 

The ColN entries specify the name, width, and data type for each column. This entry is required for fixed-length formats and optional for character-delimited formats. The syntax of the ColN entry is:

ColN=columnName dataType [Width n]

 

The parameters in the entry are:

columnName

  • The name of the column. If the column name contains spaces, it must be enclosed in double quotation marks.

dataType

  • The data type of the column. This value can be Bit, Byte, Currency, DateTime, Double, Long, Memo, Short, Single, or Text.
  • DateTime values must be in one of the following formats: dd-mmm-yy, mm-dd-yy, mmm-dd-yy, yyyy-mm-dd, or yyyy-mmm-dd, where mm is the month number and mmm are the characters specifying the month.

Width n

  • The literal value Width followed by the integer value specifying the column width.

 

The Character option specifies the character set; you can set it to either ANSI or OEM.


Excel Files

If column contains a mixed alphabetic and numeric values, use the IMEX setting.:

Extended Properties="Excel 12.0;HDR=Yes;IMEX=1";