140 likes | 330 Views
ODBC-101. Introduction to ODBC for Business Rules. ODBC. What is ODBC? ODBC – Installing the Drivers ODBC – Data Sources (BR.INI) BR Sample Application BR Context Manager BR Sample – Common BR Sample – Employee BR Sample – File Record Selection BR Sample – Field Definition
E N D
ODBC-101 Introduction to ODBC for Business Rules
ODBC • What is ODBC? • ODBC – Installing the Drivers • ODBC – Data Sources (BR.INI) • BR Sample Application • BR Context Manager • BR Sample – Common • BR Sample – Employee • BR Sample – File Record Selection • BR Sample – Field Definition • BR Sample – Field Definition • BR Sample – Dates • Creating Your Own APP
What is ODBC? • 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!!
ODBC – Installing the Drivers • 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 (Each user needs to do this!) • EDIT BR.INIT (If desired) • EDIT WBCONFIG>SYS (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)
ODBC – Data Sources (BR.INI) • Configuration File • C:\WINDOWS\BR.INI • [BR] – Points to BRSERIAL.DAT folder • [ODBC] • DRIVE – Defines the “Drive Statement” • Dictionary Path - Location of Context • Database - Base Dir for Data • BR.INI is used to define ODBC settings
ODBC – Data Sources • Control Panel – Administrative Tools • Data Sources (ODBC) • System DSN • Common Data Area - BR Sample Data Application • Payroll - BR Sample Data Application
BR Sample Application • C:\Program Files\ADS\Business Rules! • BRSERIAL.DAT • (If you forgot to change the install folder) • BRNATIVE417K.EXE • ODBC does not come or need BR • MENU.WBO • Menu to run Sample Application. • For our purposes, the sample data is all we care about.
BR Context Manager • 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
BR Sample - Common • 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 - Sample table, lists various deductions • EMPLOYEE - Sample table, lists employees
BR Sample – Employee • Employee • Application File Code • Contains Details • Name - Employee Master File • Path - PRD • MASTER - EMPLOYEE • Key1 - EMPLOYEE.KEY • Up to 10 index files may be listed • Select indexes based on “Most Common Searches” • Press “F10” or Enter to select
BR Sample – File Record Selection • 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 - Payroll • File Name - Employee • Record Name - Employee • Description - Employee Record • Field Name Prefix - For BR Use Only • Field Name Suffix - For BR Use Only (Required)
BR Sample – Field Definition • 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 • DATE FORMAT - Defines Dates
BR Sample - Dates • When Naming Date Fields: • Include the Word “DATE” in the Name • BIRTH_DATE • DATE_HIRED • DATE FORMAT • DAYS - Use the Days Format (Default) • NODATE - Not a date (But name has date) • CCYYMMDD - Use In any order to define dates
Creating Your Own APP • Using Context Manager • Define an Application • Create Tables • Create Records • Define Fields • Import your own field layouts to Context • NAME=CONTEXT/TOOLD,KFNAME=CONTEXT.KEY/TOOLD • NAME=CONTEXT/TOOLD,KFNAME=CONTEXT.KY2/TOOLD