Introduction to ODBC for Business Rules What is ODBC? ODBC – Installing the Drivers ODBC – Data Sources (BR.INI) BR Sample Application BR Context Manager ◦ ◦ ◦ ◦ ◦ ◦ BR BR BR BR BR BR Sample Sample Sample Sample Sample Sample – – – – – – Common Employee File Record Selection Field Definition Field Definition Dates ODBC ◦ ◦ ◦ ◦ (O)pen (D)ata(B)ase (C)onnectivity Simply put, your data available in Windows Apps Drivers – provided by ADS & Microsoft Context Manager – provided by ADS Applications use ODBC to present DATA ◦ MS-Access ◦ MS-Excel ◦ Crystal Report ◦ ** Many more!! http://www.ads.net/brules/filebase/br-updates/odbc_4_01.zip ADS Drivers easily available on the web. ◦ ◦ ◦ ◦ ◦ Download Drivers Extract to an Install Directory. Copy BRSERIAL.DAT to disk1 EDIT BR.INI EDIT WBCONFIG.SYS (Each user needs to do this!) (If desired) (If desired) Installing ODBC ◦ Copy the “DISK1” and “Cabs” to install Folder ◦ Run SETUP.EXE from the new “Install” Folder ◦ Select Driver & Sample (Or Just Driver for End Users) Configuration File ◦ C:\WINDOWS\BR.INI [BR] – Points to BRSERIAL.DAT folder [ODBC] DRIVE Dictionary Path Database – Defines the “Drive Statement” - Location of Context - Base Dir for Data BR.INI is used to define ODBC settings Control Panel – Administrative Tools ◦ Data Sources (ODBC) ◦ System DSN Common Data Area Payroll - BR Sample Data Application - BR Sample Data Application C:\Program Files\ADS\Business Rules! BRSERIAL.DAT ◦ (If you forgot to change the install folder) BR32.EXE ◦ ODBC does not come with or need BR MENU.WBO ◦ Menu to run Sample Application. For our purposes, the sample data is all we care about. RUN CONTEXT/TOOLS Application Section. ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ Defines BR Applications Multiple Applications may be Defined Each application may have many tables F1 – Add/Create F3 – Change Existing F4 – Delete F5 – Inquire/Details about F6 – List F10 - Execute From Context Manager ◦ Select Payroll F5 - Shows Program & Data Details PRD - Data Folder C:\Program Files\ADS\BR ODBC Driver\PRD ◦ Remember BR.INI DataPath= C:\Program Files\ADS\BR ODBC Driver ◦ Enter (Or F10) on Common DEDUCT EMPLOYEE - Sample table, lists various deductions - Sample table, lists employees Employee ◦ Application File Code ◦ Contains Details Name Path MASTER Key1 - Employee Master File PRD EMPLOYEE EMPLOYEE.KEY Up to 10 index files may be listed Select indexes based on “Most Common Searches” ◦ Press “F10” or Enter to select Once you select Employee ◦ A list of record types appear Only 1 Record Type required. Many record types may be defined. ◦ F5 – Inquire Application Name File Name Record Name Description Field Name Prefix Field Name Suffix - Payroll Employee Employee Employee Record For BR Use Only For BR Use Only (Required) Once you have selected the Employee Record ◦ A List of Fields appear. ◦ List the fields you wish to make available. Required Fields ◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦ FIELD NAME - Field Name for Windows DESCRIPTION - Description (Not Visible) FORM - C, PD, BH (Any Valid BR Type) LENGTH - Length of Field (In File) DEC - # of Decimal Digits. START - Starting Position STOP - Ending Position (Automatic) DATE FORMAT - Defines Dates When Naming Date Fields: ◦ Include the Word “DATE” in the Name BIRTH_DATE DATE_HIRED DATE FORMAT ◦ DAYS ◦ NODATE ◦ CCYYMMDD - Use the Days Format (Default) - Not a date (But name has date) - Use In any order to define dates