ODBC101 Introduction to ODBC for Business Rules ODBC
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 BR BR Sample Sample � Creating – – – Common Employee File Record Selection Field Definition Dates 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 disk 1 EDIT BR. INIT EDIT WBCONFIG>SYS Installing ODBC (Each user needs to do this!) (If desired) ◦ Copy the “DISK 1” 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: WINDOWSBR. INI �[BR] – Points to BRSERIAL. DAT folder �[ODBC] �DRIVE �Dictionary Path �Database � BR. INI – Defines the “Drive Statement” - Location of Context - Base Dir for Data 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 FilesADSBusiness Rules! � BRSERIAL. DAT ◦ (If you forgot to change the install folder) � BRNATIVE 417 K. 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 F 1 – Add/Create F 3 – Change Existing F 4 – Delete F 5 – Inquire/Details about F 6 – List F 10 - Execute
BR Sample - Common � From Context Manager ◦ Select Payroll �F 5 - Shows Program & Data Details �PRD - Data Folder �C: Program FilesADSBR ODBC DriverPRD ◦ Remember BR. INI �Data. Path= C: Program FilesADSBR ODBC Driver ◦ Enter (Or F 10) on Common �DEDUCT �EMPLOYEE - Sample table, lists various deductions - Sample table, lists employees
BR Sample – Employee � Employee ◦ Application File Code ◦ Contains Details �Name �Path �MASTER �Key 1 - Employee Master File PRD EMPLOYEE. KEY �Up to 10 index files may be listed �Select indexes based on “Most Common Searches” ◦ Press “F 10” 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. ◦ F 5 – Inquire �Application Name �File Name �Record Name �Description �Field Name Prefix �Field Name Suffix - Payroll Employee Record 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 ◦ NODATE ◦ CCYYMMDD - Use the Days Format (Default) - Not a date (But name has date) - 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. KY 2/TOOLD
- Slides: 14