text
stringlengths 11
3.5k
| source
stringclasses 1
value |
---|---|
User Guide | 292806769-Paradox-9-Eng.pdf |
Copyright © 1999 COREL CORPORATION and COREL CORPORATION LIMITED. All rights reserved. For more complete copyright information please refer to the About section in the Help menu of the software. | 292806769-Paradox-9-Eng.pdf |
TABLE OF CONTENTS Chapter 1 Welcome to Paradox 9..........1 Installing Paradox 9................2 Using Paradox documentation..............6 Exploring the work area............... 1 3 Technical Support and Services..............1 8 Chapter 2 Getting started........... 2 5 Introduction to database systems............. 2 5 Understanding relational databases............. 2 6 Understanding Paradox objects..............3 3 Setting desktop and system preferences............3 8 Setting Object PAL preferences..............4 0 Organizing your database projects............. 4 2 Project Viewer................. 4 2 Directories..................4 5 Aliases..................4 6 Printing, saving, closing and exiting............. 4 9 Chapter 3 Tables............. 5 1 Creating tables................. 5 2 Indexes..................5 8 Maintaining data integrity............... 6 2 Validity checks................. 6 3 Table lookups................. 6 9 Passwords..................7 3 Referential integrity................7 7 Visual Database Designer............... 8 1 Navigating and Viewing tables..............8 5 Filtering tables................. 9 1 Sorting tables................. 1 0 0 Restructuring tables................1 0 3 Restructuring and referential integrity............. 1 0 7 Changing field types................1 0 9 Repairing tables................1 1 1 Table of contents i | 292806769-Paradox-9-Eng.pdf |
Changing the appearance of tables............. 1 1 3 Rearranging fields, columns, and rows............. 1 1 3 Changing table properties............... 1 1 5 Data formats................. 1 2 5 Adding, moving, and subtracting table records..........1 3 0 Copying, renaming, emptying, and deleting tables..........1 3 5 Locking tables................. 1 3 9 Chapter 4 Entering and editing table data....... 1 4 3 Data entry basics................1 4 3 Inserting, posting, and deleting records............1 4 8 Cutting, copying, and pasting data............. 1 5 1 Spell checking your data............... 1 5 5 Working with graphic data..............1 5 9 Finding and replacing data..............1 6 0 Wildcard characters................1 6 4 Entering data using table lookups............. 1 6 6 Locking records................. 1 6 6 Chapter 5 Forms and reports..........1 6 9 Creating data models................1 7 1 Creating and opening a data model............. 1 7 2 Linking tables in a data model..............1 7 4 Viewing data models................1 7 9 Using table aliases................1 8 1 Saving and printing a data model............. 1 8 2 Laying out forms and reports..............1 8 3 Specifying an initial layout............... 1 8 3 Multi-table layouts................1 8 9 Using the form and report design window........... 1 9 2 Design Window toolbars............... 1 9 3 Design Window rulers............... 1 9 5 Using the Design Window grid..............1 9 9 Setting Designer preferences..............2 0 0 Style sheets................. 2 0 3 Saving a design................2 0 6 ii Table of contents | 292806769-Paradox-9-Eng.pdf |
Using design objects in forms and reports............2 0 6 Selecting design objects............... 2 0 7 Placing, grouping, and stacking design objects........... 2 0 8 Viewing design objects............... 2 1 1 Moving and aligning design objects............. 2 1 2 Sizing and shaping design objects............. 2 1 5 Containing design objects............... 2 1 7 Naming design objects............... 2 2 0 Placing scroll bars on design objects............. 2 2 1 Changing design object properties............. 2 2 4 Attaching methods to design objects............. 2 2 6 Designing forms................. 2 2 7 Creating and opening a form..............2 2 7 Page size and layout (forms)..............2 2 9 Working with multi-page forms..............2 3 1 Specifying the form window style............. 2 3 4 Moving around a form............... 2 3 6 Delivering a form................2 4 0 Form and page properties............... 2 4 0 Using forms................. 2 4 1 Running forms................. 2 4 1 Viewing the Form window............... 2 4 3 Printing a form................2 4 5 Designing reports................2 4 6 Creating and opening a report..............2 4 6 Page size and layout (reports)..............2 4 9 Bands..................2 5 1 Page breaks................. 2 6 7 Expanded and pushed objects..............2 6 8 Delivering a report................2 7 6 Report and band properties..............2 7 6 Using reports................. 2 7 7 Previewing reports................2 7 7 Using a report with a different table............. 2 7 8 Printing reports................2 8 0 Publishing reports................2 8 2 Table of contents iii | 292806769-Paradox-9-Eng.pdf |
Chapter 6 Charts and crosstabs......... 2 8 5 Working with charts................2 8 5 Chart basics................. 2 8 6 Defining a chart................2 8 9 Modifying a chart................2 9 1 Changing the appearance of a chart............. 2 9 6 Working with crosstabs............... 2 9 9 Crosstab basics................. 3 0 0 Defining a crosstab................3 0 4 Modifying a crosstab................3 0 7 Chapter 7 Querying your database......... 3 0 9 Creating a QBE query................3 1 1 QBE Query operators................3 1 3 Choosing tables for a QBE query............. 3 1 8 Selecting fields to display in a QBE query........... 3 2 2 Viewing query results............... 3 2 4 The Answer table................3 2 4 Live query views................3 2 8 Specifying query selection conditions............3 3 1 Understanding selection conditions............. 3 3 1 Using Arithmetic operators in QBE queries............3 3 2 Specifying matches in selection conditions............3 3 3 Using AND in selection conditions............. 3 4 0 Using OR in selection conditions..............3 4 2 Using example elements in QBE queries............3 4 4 Performing calculations with QBE queries............3 4 8 Setting QBE query properties..............3 5 2 Advanced QBE queries: groups, sets, and inclusive link s........3 5 5 Querying groups of records using summary operators..........3 5 6 Using the CALC operator with summary operators........... 3 6 1 Querying sets of records............... 3 6 3 Performing set comparisons..............3 6 5 Performing set summaries............... 3 6 8 Querying with inclusive links..............3 7 0 Inserting, deleting, and changing values with QBE queries........3 7 5 iv Table of contents | 292806769-Paradox-9-Eng.pdf |
Inserting records with QBE queries............. 3 7 6 Deleting records with QBE queries............. 3 7 9 Changing values with QBE queries............. 3 8 2 Chapter 8 Working with design objects........3 8 7 Boxes, ellipses, and lines............... 3 8 8 Button objects................. 3 9 2 Chart objects................. 3 9 5 Crosstab objects................. 3 9 7 Field objects................. 3 9 8 Placing a field on a form or report............. 3 9 8 Specifying the functionality of a field object............4 0 0 Special fields................. 4 0 3 Summary fields................4 0 4 Memo fields................. 4 1 0 Protecting and hiding data in a field............. 4 1 1 Calculated field objects............... 4 1 2 Creating calculated fields............... 4 1 3 Number methods in calculated fields............. 4 1 9 Date and time calculations............... 4 2 1 Calculated fields and printing..............4 2 3 Graphic objects................. 4 2 5 Using graphics................. 4 2 6 Understanding raster operations..............4 2 9 Multi-record objects................4 3 1 Notebook objects................4 3 4 Working with notebook objects..............4 3 5 Adding and removing notebook pages............. 4 3 8 Changing the appearance of a notebook............4 3 9 Active X and Native Windows Controls............4 4 1 Table frame objects................4 4 8 Working with Table frame objects............. 4 4 8 Modifying table frames............... 4 5 0 Text objects..................4 5 3 Chapter 9 Exchanging data........... 4 6 3 Sharing information between workstations........... 4 6 4 Table of contents v | 292806769-Paradox-9-Eng.pdf |
Importing data................. 4 6 4 Exporting data................. 4 7 2 Using Object Linking and Embedding (OLE)........... 4 7 6 Understanding OLE................4 7 7 Embedding objects in OLE fields and design objects..........4 7 8 Inserting linked OLE objects..............4 8 2 Manipulating OLE objects in tables, forms, and reports..........4 8 4 Updating linked OLE objects..............4 8 5 OLE 1. 0 versus OLE 2. 0............... 4 8 7 Using Dynamic Data Exchange (DDE)............4 8 8 Sending mail................. 4 9 2 Chapter 10 HTML publishing and Internet tools......4 9 3 HTML publishing in Paradox..............4 9 4 Working with the Corel Web Server............. 4 9 6 Hyperlink capabilities............... 4 9 9 Importing HTML data............... 5 0 0 vi Table of contents | 292806769-Paradox-9-Eng.pdf |
Welcome to Paradox 9 1WELCOME TO PARADOX 9 1 Welcome to Paradox Ò 9, a powerful and easy-to-use relational database program that helps you organize, track and retrieve information. You can also create sophisticated forms, charts and reports to display your information. You can run Paradox as a standalone system on a single computer, or as amulti-user system on a network. The power and flexibility of Paradox let you create a database that organizes and tracks important information. With a few clicks of the mouse, Paradoxprovides you with the tools to effectively control the expanding volumes ofdata you work with daily. By organizing data into easily accessible, linkedtables, you can streamline repetitive tasks, eliminate redundancy, andincrease your personal and business productivity. Paradox Experts guide you through the process of creating the many different components that make up your database. Paradox provides expertsfor creating such objects as tables, forms, reports, charts, mailing lists,design objects, and queries. Or, if you prefer, you can create these objects onyour own. As well, with its Query By Example capabilities, you can gather information from multiple tables without writing a single line of code. Once you locate thedesired information, you can create professional, up-to-the-minute charts andreports. If you prefer to create SQL queries, you can use the Visual Query Builder. Object PALfi, the object-based, event-driven language, will help you customize your database, and power users and developers can use the Application Framework to create customized applications in seconds. | 292806769-Paradox-9-Eng.pdf |
About Corel Corporation Corel Corporation is recognized internationally as an award-winning developer and marketer of productivity applications, graphics, and Internetsoftware. We pride ourselves in delivering high-quality products by activelyseeking your input. We use this feedback and respond quickly to you, theusers of Corel products worldwide. Corel ships its products through a network of more than 160 distributors in 70 countries worldwide. Corel is traded on the T oronto Stock Exchange(symbol: COS) and on the NASDAQ National Market System (symbol:COSFF). For more information about Corel and our products, browse to our World Wide Web site at www. corel. com. Installing Paradox 9 You must install Paradox before you run it for the first time. The Paradox Setup application makes it easy to install. You can also use the Setupapplication to: add components to your currently installed Paradox refresh files and configurations of your currently installed Paradox Before installing, you should do the following:Close any open applications. Close any virus-detection application. Make sure your computer meets the system requirements which are listed below. Paradox 9 system requirements The following are the minimum system requirements for Paradox. Windows 95, Windows 98, or Windows NT 4. 0 486 PC, 66 MHZ processor 16 MB Ram (32 MB Recommended) 100 MB hard disk space (95 MB for typical install) CD-ROM Drive VGA Monitor Mouse or Tablet 2 Paradox 9: Chapter 1 | 292806769-Paradox-9-Eng.pdf |
If you are using an edition of Paradox that includes a voice recognition application, your system requirements will differ from those listed above. Formore information about voice recognition applications, see the Paraodoxonline Help. Setting up Paradox The Paradox Setup application installs all the main applications andcomponents. T o change selections in the Paradox Setup application, click the Back button. Click the Help button for more information when you make selections in the Paradox Setup application. To Install Paradox applications 1Insert the Paradox CD into the CD-ROM drive. If the Paradox Setup screen does not display, click the Start button on the Windows taskbar, and click Run. Type D:\SETUP (where D is the lettercorresponding to the CD-ROM drive) in the Open box. 2Click Paradox 9 Setup. 3If you want to read the Paradox Release Notes, click the Release Notesbutton. The Release Notes may contain installation tips that were notavailable at press time. 4Click the Next button. 5Read the Paradox license agreement, and click the Accept button. If youdont accept the license agreement, the Setup application terminates. 6T ype your full name and company name (if it exists), and click the Nextbutton. 7T ype your Paradox serial number and click the Next button. The serialnumber is on the Paradox Product Authenticity Card. 8Enable one of the following options: T ypical Setupinstalls the most commonly used applications, utilities, and files, and is the recommended installation type for most users. Usethis option if youre not sure which Paradox components you want toinstall. You can add and remove components afterwards. Welcome to Paradox 9 3 | 292806769-Paradox-9-Eng.pdf |
Compact Setup conserves hard drive space by installing the minimum number of applications, utilities, and files needed to operate Paradox. Enable this option if you have little free disk space andrequire only the minimum components. This installation is often usedfor laptop computers. Custom Setup lets you choose which Paradox components to install. This option gives you the most control over the installation process. Choose this option if you need to install specialized components thatare not included in the T ypical or Compact installation setups. 9If you want Paradox to read required files from the CD-ROM drive whenyou use applications, enable the CD-ROM Based check box. This optionsaves hard disk space, but requires you to insert the Paradox CD into the CD-ROM drive each time you want to run a Paradox application. Enablingthis option also results in slower-than-normal performance. 10Click the Next button and follow the installation instructions in the Setup Wizard. When the installation is completed, you will be prompted to register Paradoxelectronically. For more information about registering, see Registering Paradox below. Registering Paradox Registering Paradox provides you with timely access to the latest productupdates and to high-quality technical support. The serial number on the Product Authenticity Card is proof that you own a legal copy of Paradox. You will need the serial number when you call Corel T echnical Support, upgrade to a new version of Paradox, or orderreplacement discs. You can register using any of the following methods:Fill out the electronic registration form which displays when the Paradox installation is completed. The information in the registration form will besent to Corel electronically if you have Internet access or a modem onyour system. If you prefer, you can print the electronic registration form,and mail or fax it back to Corel. Visit Corel on the World Wide Web, and complete the registration form at: www. corel. com/support/onlineregistration. htm Adding, deleting, and updating Paradox components After installing Paradox, you can add components to the installation. After using the T ypical installation option, you may discover that you need or wantadditional Paradox components. 4 Paradox 9: Chapter 1 | 292806769-Paradox-9-Eng.pdf |
You can also delete Paradox components to free up disk space or update components to refresh their configuration settings. Updating componentsalso repairs Paradox if you have accidentally deleted application files. To add components to a Paradox installation 1Close any open Paradox applications. 2On the Windows taskbar, click Start, Programs, Paradox 9, Setup and Notes, Corel Setup Program. 3Enable the Add New Components button. 4Click the Next button, and follow the installation instructions in the Setup Wizard. To delete installed Paradox components 1Close any open Paradox applications. 2On the Windows taskbar, click Start, Programs, Paradox 9, Setup and Notes, Corel Remove Program. 3Click the Next button, and follow the installation instructions in the Corel Uninstaller. To update a Paradox installation 1Close any open Paradox applications. 2On the Windows taskbar, click Start, Programs, Paradox 9, Setup and Notes, Corel Setup Program. 3Enable the Update Current Installation button. 4Click the Next button. 5Click the Install button. Upgrading from previous versions of Paradox Paradox can co-exist with earlier versions of Paradox on the same system, ifyou have enough disk space. The Paradox Setup application does not replaceearlier versions of these applications, but make sure that you install differentversions of Paradox in separate folders. If you dont plan to use earlier versions of the applications, you can remove them from your hard drive to free up drive space. Welcome to Paradox 9 5 | 292806769-Paradox-9-Eng.pdf |
To delete Corelfi Paradoxfi 8 1Close any open applications. 2On the Windows taskbar, click Start, Corel Paradox 8, Setup and Notes, Corel Remove Program. 3Click the Next button. 4Click the Select All button. 5Enable the Remove Modified Files check box. 6Click the Next button, and follow the installation instructions in the Corel Remove wizard. Using Paradox documentation Paradox includes online and paper documentation to help you learn theprogram and use it efficiently. The Paradox documentation set Online Help The online Help system enables you to retrieve all the information youneed quickly, and then return to your work. Help appears in a separatewindow on your screen. For quick access, you can keep the Help windowdisplayed on top of the application window. Object PAL Online Help In addition to the Paradox Online help, the Object PAL online help systemprovides information on the object-based, event-driven, visualprogramming language used to extend the power of Paradox. It providesin-depth explanations on the language elements and also providesreference tables and example code that you can paste directly into youreditor window. Online Tutorial The online tutorial teaches you how to use Paradox. The tutorial is veryuseful for both beginners who want to learn Paradox and for users ofprevious versions who want to learn the new features in Paradox 9 Object PAL Online Tutorial The Object PAL online tutorial takes you through the basics of Object PAL. It is an essential tool for those who have never used Object PAL beforeand provides an excellent introduction to object-based programming. Context-sensitive Help The context-sensitive Help displays information that is relevant to thetask you are currently performing. You access it by pointing to the itemyou want information on and pressing F1. Context-sensitive Help provideshelp for various dialog boxes and dialog box controls. Tool Tips Tool Tips provide information about menu items and toolbar buttons. Tool Tips display in a balloon when you position the cursor over a menuitem or toolbar button. 6 Paradox 9: Chapter 1 | 292806769-Paradox-9-Eng.pdf |
Perfect Expert The Perfect Expert guides you through performing basic tasks and provides links to related help topics from the on-line user guide. User Guide The Paradox 9 User Guide contains most of the information from the online help. If you use Paradox 9 as part of Word Perfectfi Office 2000,you can refer to the Paradox section of the Word Perfect Office 2000 User Guide for help. We want your feedback If you have any comments or suggestions about Paradox documentation, you can email them to paradoxprodmgr@corel. ca or mail them to the address listed below. Unfortunately, we wont be able to respond to your messages individually. Paradox Product Manager Corel Corporation1600 Carling Avenue Ottawa, Ontario, Canada KIZ 8R7 Fax: (613) 728-9790 Documentation conventions Before you start using Paradox, its important to understand the conventions used in the documentation. Mouse conventions The following are conventions related to using the mouse: When you see this... Do this... Click File, New Click the File menu with the mouse, and click theword New in the menu. Click Format, Properties, Grid Click the Format menu, click Properties, and click Grid from the submenu that appears. Enable a check box Click the check box to place a check mark or an Xinside the box. Disable a check box Click the check box to remove the check mark or X. Select Click to highlight. Welcome to Paradox 9 7 | 292806769-Paradox-9-Eng.pdf |
Choose a filename from the Files Type list box Click the name of the file you want. Right-click, and click Restructure Click the right mouse button, and click the Restructure command from the submenu that appears. Keyboard conventions The following are conventions related to keyboard actions: When you see this... Do this... Press ENTER Press the Enter key on your keyboard. Press CTRL + SHIFT Press the Control key and the Shift key at the same time. Using online Help The Help T opics dialog box provides five ways to find information. You canuse the Contents page to select a topic, use the Index page to search for atopic, or use the Find page to search for specific words and phrases in Helptopics. Use can use the Ask The Perfect Expert page to type a question inyour own words and Ask The Perfect Expert searches through the Paradox Help files and lists the topics that best answer your questions. And finally,you can usethe Corelfi Knowledge Base page to search for information on the Corel home page. Paradox also comes with a help file specifically for users who use Object PAL, the object-based, event-driven, visual programming language used to support Paradox. To access Paradox Online Help topics 1Click Help, Help T opics. 2Click one of the following tabs: Contentsto browse through topics by category. Indexto see a list of index entries, then type the first few letters of the subject about which you want information. Findto search for a particular word or phrase in the online Help. Ask The Perfect Expertto search for help in your own words. Corel Knowledge Baseto search for information on the Corel homepage. 8 Paradox 9: Chapter 1 | 292806769-Paradox-9-Eng.pdf |
To access Object PAL Online Help topics 1Click Help, Object PAL Reference. 2Click one of the following tabs: Contentsto browse through topics by category. Indexto see a list of index entries, then type the first few letters of the subject about which you want information. Findto search for a particular word or phrase in the online Help. Accessing information from the Corel Web site You can access the Corel Web site directly from Paradox. Using the Corel Web site, you can get information about projects and templates, 3rd Party T ools. You can also get technical support information, helpful tips and tricks,information about learning and certification, and information about servicebureaus. To access the Corel Business Application Community Click the Corel Community button on the Paradox Standard toolbar. To get information from the Corel Web site Click... To get information about... File, New From Project Projects and templates Tools, 3rd Party Tools Online 3rd Party tools Help, Corel Web Site Corel's Business Applications Community Help, Corel On The Web, Technical Support Technical support Help, Corel On The Web, Tips And Tricks Tips and tricks Help, Corel On The Web, Learning And Certification Learning and certification Help, Corel On The Web, Approved Service Bureaus Service bureaus Accessing the online tutorials The Paradox online tutorial provides lessons that teach you how to use manyof the features of Paradox. It will provide you with the basic skills youllrequire to start creating your own publications. If you are familiar withprevious versions of Paradox, the tutorial will teach you how to use some ofthe new features in the program. Welcome to Paradox 9 9 | 292806769-Paradox-9-Eng.pdf |
The Object PAL online tutorial provides lessons on the basic elements of Object PAL programming. By typing the code and reproducing the forms inthe lessons, you will learn the syntax of the language. To access the Paradox online tutorial Click Help, Paradox Tutorial. To access the Object PAL online tutorial Click Help, Object PAL Tutorial. Accessing context-sensitive Help You can access context-sensitive Help from the menus, dialog boxes, andtoolbars in Paradox. The most common ways to access context-sensitive Help are as follows: To get help on... Do this... Menus and toolbar buttons Position your cursor over the menu item or toolbar button for Tooltip information. Dialog boxes Click the Help button in the dialog box. Press F1. Dialog box controls Click the Whats This Help button in a dialog box, then click the dialog control for which you want help. Right-click the control, and click Whats This?. Right-click the control Printing Help You can print specific Help topics or print entire sections of online Help. To... Do this... Print an entire section On the Contents page, select the section you want to print, then click the Print button that appears at the bottom of the Help dialog box. Print a selected topic Click the Print button at the top of the Help window, or right-click the window and click Print Topic. Using the Corel Reference Center The Corel Reference Center contains online manuals in Adobe Acrobat Portable Digital File (. PDF) format. You can search the manuals to quicklyfind the information you need. 10 Paradox 9: Chapter 1 | 292806769-Paradox-9-Eng.pdf |
If you installed Word Perfectfi Office 2000, the Reference Center contains online manuals for the whole suite and j Pdoxfi Web Utilities. If you installed Paradox 9, the Reference Center contains online manuals for Paradox andj Pdox Web Utilities. To access the Corel Reference Center from Paradox 1Click Help, Help T opics. 2Click the Contents tab. 3Double-click Reference information. 4Double-click View Manuals. 5Double-click Go to the Reference Center. To access the Corel Reference Center from Windows 1Click the Start button on the Windows taskbar. 2Click one of the following (depending on your installation): Programs, Word Perfect Office 2000, Setup & Notes, Corel Reference Center. Programs, Paradox 9, Setup & Notes, Corel Reference Center. You can find the Corel Reference Center (refcntr. exe) in the folder\Corel\SHARED\REFCNTR on the Word Perfect Office 2000 CD-ROMand on the Paradox 9 CD-ROM. If you did not install the Corel Reference Center when you installed Word Perfect Office 2000 or Paradox 9, you can do so by performing acustom install. The j Pdox Web Utilities manual contains information on Paradoxfi Web Form Designer, Paradoxfi JDBC Server, the Paradox Reportfi Server (and Dynamic Publishing), JDBC Proxy Server, JRun, and Install Anywhere. Viewing program and system information Paradox provides easy access to information about the program, licenseinformation, and your system. Program information consists of the application name, version number, serial number, and user name. This information doesnt change. Youll find itparticularly useful if you ever need help from Corel T echnical Support Services. Welcome to Paradox 9 11 | 292806769-Paradox-9-Eng.pdf |
System information consists of details about any of the following categories: system, display, printing, Corel. EXE and. DLL files, and system. DLL files. For example, you can see how much memory you have on the drive to whichyou want to save a file. You can save any system information in a text filecalled SYSINFO. TXT. To view product and license information 1Click Help, About Paradox. 2Click one of the following buttons: Copyright License To edit the serial number and PIN 1Click Help, About Paradox. 2Click the Edit Serial/PIN button. 3T ype the serial number in the Serial Number box. 4T ype the Personal Identification Number in the PIN box. To view program and system information 1Click Help, About Paradox. The About Paradox dialog box displays the version number and registration information for your software. 2Click the System Info button to view system information. 3Choose a category from the Choose A Category list box. Use the Save button in the System Info dialog box to store systeminformation for printing. System information is saved as SYSINFO. TXT. Amessage box tells you where the file is saved. Using the Perfect Expert Paradox comes with its own built-in expert which is ready to help you withmany tasks. The Perfect Expert includes the best features of Quick Tasks,templates and Coaches, combined with information from online Help and thepower of a natural language interface to assist you with everyday tasks. The Perfect Expert allows you to quickly create complex documents usingprofessionally-designed templates. 12 Paradox 9: Chapter 1 | 292806769-Paradox-9-Eng.pdf |
To use the Perfect Expert 1Click Help, Perfect Expert. 2Click on any of the tasks available in the Perfect Expert. These tasks will change depending on the function Paradox is performing. 3Click the More Help On button for additional information. Exploring the work area The desktop is the first thing you see when you launch Paradox. It is the primary Paradox workspace. From the desktop, you can manage files define defaults and preferences control all Paradox objects set object properties Many of the preferences you define remain in effect for a full Paradox session from the time you open Paradox until you exit. Paradox lets you save otherpreferences permanently. Paradox objects such as forms, reports, and queries open in their own window. For example, forms always appear in a Form window, and queriesalways appear in a Query window. Each type of window contains specializedcommands that apply only to that type of object or document. Paradox Experts Paradox Experts provide easy-to-follow steps that help you quickly performcommon Paradox tasks. To access Paradox Experts Click T ools, Experts This command allows you to launch the following Experts: The Chart Expert helps you create a chart of your data. The Crosstab Expert helps you create a crosstab from your data Welcome to Paradox 9 13 | 292806769-Paradox-9-Eng.pdf |
The Database Expert selects a ready-made database and helps you customize it. The Documentation Expert produces a report on the structure and coding of your documents and objects The Find Duplicate Expert helps you maintain your database by finding records with duplicatefields values in a single table. This is only works with a Paradox table (*. db). The Form Expert helps you create a form that displays data from one or two tables in a varietyof predefined layouts and styles. The HTML Import Expert helps you import data from HTML documents. The Launcher Expert creates a small tabbed form you can use to open or launch selectedforms, reports, queries, scripts, and executable files with the click of a button. The Mailing Label Expert helps you create mailing labels in a variety of mailing label formats. The Merge Expert helps you merge data from a table into a form letter using a variety of wordprocessors. The Query Expert helps you find, correlate, and view information in your database. This is onlyworks with a Paradox table (*. db). The Report Expert helps you display and print data from one or two tables in a variety ofpredefined layouts and styles. The Search and Replace Expert helps you change the underlying source code of several Paradoxfiles simultaneously. The Table Expert helps you create a new table from a list of table templates. 14 Paradox 9: Chapter 1 | 292806769-Paradox-9-Eng.pdf |
The Text Import Expert helps you import fixed length or delimited text into Paradox tables The Utilities Expert helps you edit and update a group of documents simultaneously Toolbars Paradox toolbar buttons change depending on the toolbar type and the kinds of windows open. For example, if a table is open, the Standard toolbar buttonshelp you perform tasks with the table. T oolbar buttons provide quickequivalents to menu commands or keystrokes. T o get quick help on what a tool or button does, hold the cursor over the button. Paradox displays a tooltip that contains a description of the button. T oolbars can be moved away from their standard position at the top of the screen. You can drag them around the screen and dock them at either side orat the bottom of the screen, or you can let them float. You can also display orhide any toolbar. Paradox provides you with the following toolbars: Standard toolbar This is the default toolbar which usually appears immediately below the menus. This toolbar displays buttons and tools which are shortcuts to menucommands for the current active window such as cut, paste, copy, and print. Property toolbar The Property toolbar contains buttons which are useful for navigating aroundyour database. This toolbar contains buttons to let you quickly filter a table,open database objects such as forms and reports, locate table records, switchto Design mode in a form or report, and switch between editing and viewinga table. Welcome to Paradox 9 15 | 292806769-Paradox-9-Eng.pdf |
Text Formatting toolbar The T ext Formatting toolbar displays buttons and tools which are shortcuts to commonly used menu commands which deal with text. Therefore, itsbuttons do not change when the active window changes. This means thatsome buttons on this toolbar will not have any effect if the currently selectedobject does not support that action. For example, if you are designing a queryand select some text, clicking the Bold tool will have no effect. The T ext Formatting toolbar does not appear by default. Align toolbar The Align toolbar, which only appears when the Form Design or Report Design windows are open, provides shortcuts for aligning multiple objectsthat you have selected. The Align toolbar does not appear by default. Design Object toolbar The Design Object toolbar displays buttons for various tools used whendesigning a form or report, and only appears when the Form Design or Report Design windows are open. Using the Design Object toolbar you cancreate and add such objects as buttons, fields, frames, charts, or graphics toforms and reports. Active X Control toolbar The Active X Control toolbar contains OLE Controls you have added to thetoolbar. (OLE controls are purchased separately from third-party vendors. )The native Windows controls included with Paradox also appear on this 16 Paradox 9: Chapter 1 | 292806769-Paradox-9-Eng.pdf |
toolbar. These include the List Box, Combo Box, Spin Box, Progress Bar and Track Bar controls. The Active X Control toolbar does not appear by default. Status Bar Displays information about the current file, the selected object, or the actionyou are performing. Its default location is the bottom of the Application Window, but you can position it at the top of the Application Window. You canalso hide the Status Bar, or change the information it displays. Moving, docking and displaying toolbars You can move a toolbar from the top of the desktop and dock it on either sideor the bottom of the window, or you can let the toolbar float in its ownwindow which you can drag to any place on the desktop. You can also hide ordisplay any toolbar. To move a toolbar Click a toolbar (click within the toolbar but not on a button) and drag it toa new location. To dock a toolbar Click a toolbar (within the toolbar but not on a button) and drag it to theedge of the desktop until a dashed outline appears and the toolbar changesshape. Release the mouse button when the outline touches the edge ofthe window. To let a toolbar float Click the appropriate toolbar (click within the toolbar, but not on a button)and drag the toolbar to the middle of the desktop. When the you releasethe mouse button, the toolbar appears in its own window which you candrag to any area of the desktop. To display a toolbar 1Click View, T oolbars. 2In the T oolbar Preferences dialog box, enable the check box beside eachtoolbar that you want to display. Welcome to Paradox 917 | 292806769-Paradox-9-Eng.pdf |
To manipulate the Status Bar Right-click the Status Bar and choose Hide Status Bar, Position, or Size to manipulate its location and size. Technical Support and Services Paradox 9 is supported by the Corel Client Services team which is committedto provide quality customer service and support that is easy to access andconvenient to use, while fostering one-to-one customer relationships. If you have a question about the features and functions of Paradox 9 applications, look in the Paradox 9 User Guide (which you are reading), consult the Paradox online Help, or review the manuals in the Reference Center. You can also find updates and technical information in the Release Notes that were not available at press time. To view the Release Notes On the Windows taskbar, click Start, and then click one of the following(depending on your installation): Programs, Word Perfect Office 2000, Paradox 9, Setup and Notes, Release Notes. Programs, Paradox 9, Setup and Notes, Release Notes. Technical support on the World Wide Web The World Wide Web address for Corel on the Internet is www. corel. com. Users in Germany can use www. corel. de and users in Ireland can use www. corel. ie. From Corels home page, you can use a variety of supportoptions. Support Newsgroups The Corel Support Newsgroups, accessible from the Corel Web site, areintended to let users exchange information, tips, and techniques with otherusers of Paradox applications. The newsgroup is located at www. corel. com/support/newsgroup. htm. Corel Knowledge Base From Corels searchable Knowledge Base, you can read, print, or download documents that contain answers to many of your Paradox technical questions or problems. The Knowledge Base is located at kb. corel. com. 18 Paradox 9: Chapter 1 | 292806769-Paradox-9-Eng.pdf |
File Transfer Protocol (FTP) You can download printer drivers, patches, plugs, updates, or other files located on the anonymous FTP site at ftp. corel. com. For information about this site, see www. corel. com/support/ftpsite/ftpindex. htm. Other Paradox 9 support options Corel offers the following technical support options, most of which are available 24 hours a day, 365 days a year. These services are useful if youprefer not to pay for support or if you encounter problems during off-hours. IVAN (Interactive Voice Answering Network) The Interactive Voice Answering Network provides answers to commonlyasked questions about Corel products and is available 24 hours a day, 365days a year. It is regularly updated with the latest information, tips, andtricks. You can also request that IVAN solutions be faxed to you. There is nocharge for this service beyond the cost of the telephone call. T o use thisservice, call: North America (613) 728-1937 Rest of world +353-1-708-2525, select option 1 (Ireland-based phone number) Automated FAX On Demand T echnical Support maintains an Automated FAX On Demand system ofnumbered documents that contain up-to-date information about commonissues, tips, and tricks. This service is available 24 hours a day, 365 days ayear. T o use this service, call: North America (613) 724-3456 Rest of world +353-1-708-2525, select option 2 (Ireland-based phone number) Compu Serve If you have a Compu Serve membership, you can interact with other usersand Corel volunteers to obtain product information and support. You can alsoquickly search Corels technical information database for answers to many ofyour technical questions or problems, and download printer drivers and otherfiles. Compu Serve is available 24 hours a day, 365 days a year, includingholidays. Corel volunteers respond from 8:30 a. m. to 5:00 p. m. Eastern Time,from Monday to Friday, excluding holidays. Welcome to Paradox 9 19 | 292806769-Paradox-9-Eng.pdf |
T o access Corel on Compu Serve, enter GO COREL at the Compu Serve prompt. Bulletin Board System (BBS) If you have a modem and a communications software package, you can access Corels BBS. You can use the BBS to download files, including printerdrivers, troubleshooting information, and utilities. You can also transferproblem files to Customer Support through the BBS. This option is availableonly outside North America. T o access the BBS, call: +353-1-708-2700 (Ireland-based phone number) +31-10-4763232 (Netherlands-based phone number) Telephone technical support options Paradox users can use complimentary and fee-based telephone technical support options. Complete information about these options, including phonenumbers, is available in the Support and Services online Help file. Thisonline Help file explains the three levels of support that are available to youand your organization. Classic Service Classic Service is designed to address the technical support needs of Paradoxusers. This service helps users with basic installation and configurationissues. Priority Service Priority Service is a fee-based service for users that require the help ofsecond-level technicians. Priority Service may be purchased by the minute,by the incident, or on a term basis. Options range from core business houraccess for individual users, to around-the-clock access for multiuserenvironments. Premium Service Premium Service is Corels highest level of support. This fee-based serviceis designed for organizations that want to establish a direct relationship with Corel and for organizations that employ dedicated support professionals orhave centralized technical management. 20 Paradox 9: Chapter 1 | 292806769-Paradox-9-Eng.pdf |
To view the Paradox Support and Services online help Do one of the following (depending on your installation): On the Windows taskbar, click Start, Programs, Word Perfect Office 2000, Paradox 9, Setup and Notes, Paradox T echnical Support Help. On the Windows taskbar, click Start, Programs, Paradox 9, Setup and Notes, Paradox T echnical Support Help. If you have not installed Word Perfect Office 2000 or Paradox 9, you canaccess Support and Services information for Paradox in the TECHSUPP. HLP help file on the Word Perfect Office 2000 or Paradox 9installation CD. This help file is located at D:\Corel\Paradox folder(where D is the letter that corresponds to the CD-ROM drive). Before calling Corel Technical Support Before you call Corel T echnical Support, please have the followinginformation available to assist the T echnical Support representative inhelping you. A brief description of the problem, including the exact text of any error messages received, and the steps required to recreate the problem. The type of computer, monitor, pointing device (for example, mouse ortablet), printer, and video card (display adapter) you are using. The version number of Microsoft Windows you are using. T o find theversion number, in Windows Explorer, click Help, and choose About Windows 95, About Windows 98, or About Windows NT. The version number of the Paradox application you are using. T o find theversion number, click Help, About Paradox. List of any applications loaded into RAM. Check the Startup folder in the Programs menu to determine if you are running any other applications. You must provide your Personal Identification Number (PIN) or serialnumber (found on the Product Authenticity Card) each time you call Corel T echnical Support. This information is available in the About dialog box in Paradox. To view and edit your serial number and PIN 1Click Help, About Paradox. 2Click Edit Serial Number/PIN. 3T ype your serial number. 4T ype your Personal Identification Number (PIN). Welcome to Paradox 9 21 | 292806769-Paradox-9-Eng.pdf |
Professional Services Corel Professional Services is a team of experienced professionals ready to assist you in implementing a complete technology solution and to realizeyour IT objectives by helping you: select and deploy new technologies without generating unexpected training, support and administration costs extend the life of your legacy hardware and software to maximize thereturn on your IT investment optimize the performance of your existing Corel technologies Corel Professional Services offers a range of services including: planning and design development deployment support You may choose to engage Corel Professional Services for some or all of these services, depending on the scope of the project and the availability ofyour companys resources. For more information about Corel Professional Services, visit www. corel. com/support/professional on the World Wide Web. If you would like a representative of the North American Corel Professional Services team to contact you, please e-mail proservices@corel. ca. Outside of North America, you can contact Corel Professional Services through e-mail at dub-ps@corel. ie or by phoning 353-1-7082580 (Dublin). Customer Service Corel Customer Service can promptly and accurately provide you with information about Corel product features, specifications, pricing, availability,and services. You can access Customer Service support through thefollowing avenues. World Wide Web You can access general customer service and product information through the World Wide Web at www. corel. com/support. 22 Paradox 9: Chapter 1 | 292806769-Paradox-9-Eng.pdf |
Mail, fax, email You can send specific customer service questions to Corel Customer Service representatives by mail, fax, and email. Corel Corporation Corel Customer Service1600 Carling Ave. Ottawa, Ontario Canada K1Z 8R7 Fax: 613-761-9176 E-mail: custserv2@corel. ca Telephone You can also telephone Corel Customer Service centers with your questions. In North America, you can reach Corel Customer Service by calling our 1-800-772-6735 toll-free line. The hours of operation are 9:00 a. m. to 9:00p. m., Eastern Time, Monday through Friday, and from 10:00 a. m. to 7:00 p. m. on Saturday. Corel customers residing outside North America can contact Corel Customer Service representatives in Dublin, Ireland on a toll line at 353-1-706-3916 orby calling a local authorized Corel Customer Service Partner. To view a listing of Corel International Customer Service telephonenumbers Do one of the following (depending on your installaion): On the Windows taskbar, click Start, Programs, Word Perfect Office 2000, Setup and Notes, T echnical Support Help. On the Windows taskbar, click Start, Programs, Paradox 9, Setup and Notes, T echnical Support Help. If you have not installed Word Perfect Office 2000 or Paradox 9, you canaccess customer support telephone numbers in the TECHSUPP. HLP helpfile on the Word Perfect Office 2000 or Paradox 9 installation CD. This helpfile is located in the D:\Corel\Paradox folder (where D is the letter thatcorresponds to the CD-ROM drive). On the World Wide Web, visit www. corel. com/support. Welcome to Paradox 9 23 | 292806769-Paradox-9-Eng.pdf |
Getting started 25GETTING STARTED 2 A database is a management system for information. Databases are widely used everyday, from telephone books to online library catalogs. Whether youdevelop databases for a large company or run a small business from yourhome, you can use Paradox to organize your information. Users new todatabases can use the Experts to quickly create tables, forms, reports,charts, and queries. More advanced users can code their own databases usingthe Object PAL scripting language. Querying several tables at a time can beaccomplished easily by using the Query By Example feature in Paradox orusers familiar with query programming can use SQL (Structured Query Language). If you are new to databases, become familiar with the concepts of fields, records, keys, and indexes. Once you understand these, you can create yourown database. Learning how to maintain data integrity through the use ofproperties like referential integrity and validity checks will fine-tune yourdatabase and allow you to relate all the tables, forms or reports you havecreated. Introduction to database systems Paradox is a full-featured relational database management system that youcan use either as a standalone system on a single computer or as a multi-usersystem on a network. Paradox lets you control the expanding volumes of datayou work with daily and can manage your data at whatever level you need. First-time database users want to be able to create a table quickly and easily, enter data in the table, retrieve data, and generate a report. These essential | 292806769-Paradox-9-Eng.pdf |
tasks never lose their importance, but as your needs expand, the power of your database system must expand with them. Here are a few things to keepin mind as you create your database: It is important to be able to break data into small, easily managed tables. This is called data normalization. It is then important to be able to linktables so you can query data across several tables and create multi-tableforms and reports. Paradox gives you the power to do this simply andquickly. The more you work with a system, the more you will want to customizeit. At first, you may just want to enhance a reports visual appeal, or createcustomized forms for ease of data entry. Later, you may want to performsome tasks automatically or tie several tasks together. The rich set of Paradox design features can give you the exact look youwant for your forms and reports. You can draw from the data in manytables, and add summary and calculated fields to make conclusions aboutthe data. You can include charts and crosstabs of your data to inform withvisual impact. Then you can add Object PAL code to objects on forms tocreate any function you need. You can even create buttons that you clickto execute commands you define. The ultimate power Paradox gives you is the ability to create your owndatabase applications. You can use Object PAL to create a whole databaseapplication, define its menus, organize and structure the tables it uses, definethe functions you want, and deliver the whole application. Once anapplication has been delivered, any Object PAL code is hidden from the user,so the customization of Paradox is complete. Understanding relational databases What is a relational database? A database is an organized collection of information based on specific data. For example, you could create a simple database of your Compact Disk(CD)collection by organizing your data into specific categories such as artist,album titles, length, and price. In a relational database like Paradox, data is organized into tables. Tables contain categories of data, repeated for each item in the table. Using theabove example, if you structure the CD collection as a table, you might putartists in one column, album titles in another, length in another, and price inanother. For each entry in your collection (each item in the table), you enterthe same categories of data (artists, album titles, length, and price). Suppose you also want to organize information about specific CDs, such as the songs on each CD, the length of each song, and the guest artists for 26 Paradox 9: Chapter 2 | 292806769-Paradox-9-Eng.pdf |
specific songs. You could store this information in a table, too. Just as you have two collections of data, youd have two tables. Flat-file databases Some database systems look at only one table at a time. These are calledflat-file systems. When you use this kind of system, the terms table anddatabase mean the same thing. Using the example of the CD collection, youcould see either the album titles and artists in one table, or album titles andsongs on each CD in another. You would not be able to combine selectedinformation from both tables. Relational databases In a relational database like Paradox, you can extract specific informationfrom each table and assemble it in a meaningful way. For example, supposeyou want to see a list that includes just each CD album title, artist, and songson each CD. Using Paradox, you can link the CD collection table and thespecific album information table by identifying a common field ( Album Title). Then you are free to combine the kinds of information you want tosee from both tables. For example, you could query the database and createan Answer table listing the album title, artist, and song titles. You can thensave the query so that you can generate an up-to-date list any time. Paradoxkeeps the tables separate but understands there is a relationship betweenthem. In a relational database like Paradox, the term database refers to all ofyour tables and all of their relationships. Using common fields to relate tables prevents data duplication and makes data easier to maintain because an update in a single field can updateinformation in many tables. Relational systems may involve four types of table-to-table relationships:one-to-one one-to-many many-to-one many-to-many If you are new to databases, you will find it useful to read Case Study: the MAST company in the Paradox online Help which illustrates how onecompany created its database. Understanding data normalization Data normalization is the arrangement of data into separate tables in whicheach table contains the fewest number of fields necessary to establish uniquecategories. Rather than using one large, complex table that contains Getting started 27 | 292806769-Paradox-9-Eng.pdf |
numerous fields, normalized tables distribute information over many tables using fewer fields. In a completely normalized database (the ultimate goal for any database), the only fields that are duplicated across your database are those that link tables. Normalized tables provide more flexibility in terms of analysis and are thekey to creating an efficient database. If you are new to databases, you will find it useful to read Case Study: the MAST company in the Paradox online Help which illustrates how onecompany created its database. Understanding referential integrity Referential integrity ensures that the links between like data in separatetables cannot be broken. This means that Paradox checks the validity of avalue before accepting it. For example, if you establish referential integritybetween your Customer and Orders tables on their Customer No. fields, andthen enter a value in the Customer No. field of the Orders table, Paradoxsearches the Customer table and accepts or rejects the value depending onwhether it is an existing customer number. When you create your tables, youwill want to establish referential integrity among your tables. In the following diagram, Paradox prohibits you from entering a value in the ORDERS. DB Customer No field that doesnt match an existing value in the CUSTOMER. DB Customer No field. 28 Paradox 9: Chapter 2 An illustration of datanormalization. | 292806769-Paradox-9-Eng.pdf |
If you are new to databases, you will find it useful to read Case Study: the MAST company in the Paradox online Help which illustrates how onecompany created its database. For more detailed information on referential integrity, see Referentialintegrity on page 77. Understanding keys and indexes When you create a database table, one thing you must determine and thendefine is the tables primary or composite key. A primary key determines thesort order for the table and helps prevent the duplication of records withinyour database because it does not allow you to enter duplicate data. Forexample, in a table containing customer information, you could define the Customer Name field as the primary key to sort the records alphabetically byname. The primary key must be the first field in the table. A composite key is the same as a primary key except that it is composed of a group of initial table fields rather than a single field. Paradox sorts the tableby the key, starting with the first field in the key and then sorting accordingto subsequent fields. Composite keys allow duplicate values within anindividual key field as long as values are not duplicated across all fields. Forexample, if you defined the customer name and customer phone numberfields as the composite key, you could enter two customers who have thesame name, as it is possible in a large list of customers for two different Getting started 29 An example ofreferential integrity. | 292806769-Paradox-9-Eng.pdf |
customers to have the same name. By also keying the phone number field, you will prevent users from entering the same customer twice. When you establish a key, Paradox creates one or more files that contain an index of the fields values and their locations. This is why the primary key isalso referred to as the primary index. While you, the user, never see thisindex, Paradox refers to the index file when locating and displaying therecords in a table. Paradox allows you to establish both primary and secondary indexes in any table. The relationship between key fields and links You link tables by defining a relationship between the fields of two tables. Inother words, both tables must have an identical field. In one (or both) ofthese tables, that field must be the key field. With this relationship intact, thetwo tables can be linked by Paradox and you can manipulate data from both ofthem. This is called querying tables. Both Paradox and d BASE let you create indexes to specify the order in which records are accessed. However, the way indexes work is different for Paradoxand d BASE tables. If you are new to databases, you will find it useful to read through Case Study: the MAST company in the Paradox online Help, which illustrateshow one company created its database. For more detailed information, see Defining key fields on page 56 andIndexes on page 58. Understanding links In order to create an efficient, easy-to-maintain database, you need to createtables that can be linked together. The most common way of linking tables isthrough common fields. For example, in order to be able to link a customerinformation table with a customer orders table, you may decide to include a Customer No. field in both tables. In order for Paradox to identify fields in two tables as identical, the following conditions must apply: The fields must have the same name, including capitalization. The fields must have the same field size. 30 Paradox 9: Chapter 2 | 292806769-Paradox-9-Eng.pdf |
The fields must have the same field type. One of the fields must be a primary key in one of the tables. When you meet these conditions, Paradox recognizes these fields as containing the same data. Then, whenever you update the information in onetable, Paradox will update the information in all other tables containing thatfield, ensuring that data integrity is maintained across your database. Linking your tables using common fields allows you to harness the power and flexibility of Paradox so that you can update, view, query, and createreports with ease. If you are new to databases, you will find it useful to read Case Study: the MAST company in the Paradox online Help, which illustrates how onecompany created its database. Understanding validity checks Validity checks are rules you impose on different fields in your tables thatrequire the data entered to meet certain criteria before Paradox will accept itas a valid entry. Validity checks help minimize data entry errors. Paradoxallows you to impose many types of validity checks on a tables fields. Forexample, you can specify maximum or minimum values for number fields,specify a default value for a field, or require that users enter a value in agiven field before moving on to the next record. Implementing a few keyvalidity checks in your database can increase productivity by decreasing thetime it takes users to enter information (with appropriate default values) andgreatly reduce the confusion caused by data entry errors. If you are new to databases, you will find it useful to read Case Study: the MAST company in the Paradox online Help, which illustrates how onecompany created its database. For more detailed information, see Validity checks on page 63. Understanding data models A data model is the graphical representation of the relationships betweentables. Data models provide a simple way of telling Paradox which tablesdata to display and work with and how these tables are linked. Data models exist in two ways:As part of a form or report. When you create a form or report, you need to tell Paradox which tables to use and how the tables are linked (on which Getting started 31 | 292806769-Paradox-9-Eng.pdf |
fields). When you create a data model for a form or report, you use the Data Model dialog box. As a separate file. You can create a data model separately without creatinga form or report. This type of data model is known as a reference datamodel; you can create data models separately for use at a later time. These data model reference files have a file extension of. DM, and arecreated using the Data Model Designer. The Data Model dialog box and the Data Model Designer allow you to doexactly the same things. The only difference is that when you are creating adata model in conjunction with a form or report, Paradox opens the Data Model dialog box; when you are creating a data model separately, Paradoxopens the Data Model Designer. A data model can be based on a single table, or on multiple tables. T o use information on a form, report, or query from more than one table, you mustcreate a multi-table data model. You then define relationships between thetables to link them together. You can create a data model independently of any form, report, or query, and use the data model dialog box to design a document or run a query. Before you can link tables to create a data model, you have to structurethe tables correctly using keys and indexes. For information about keysand indexes, see Indexes on page 58. For more detailed information on data models, see Creating data modelson page 171. Paradox sample directory Your Paradox disks include sample files that you can choose to install with Paradox. The sample tables contain information used by the fictitious Marine Adventures and Sunken Treasure (MAST) company. This company sellsdiving equipment and supplies to dive shops around the world. For moreinformation on the MAST company, the development of the MAST database,and the structures of the sample tables, see Case Study: the MASTcompany in the Paradox online Help. The sample files are used in examples in this Help system. These files are located in the Sample directory (unless you specified otherwise when youinstalled them). If you installed Paradox in the default location, the full path ofthe samples files is C:\PROGRAM FILES\COREL\SHARED\SAMPLES. T o use these sample files, you must change your working directory to the Sample directory. 32 Paradox 9: Chapter 2 | 292806769-Paradox-9-Eng.pdf |
To set the working directory 1Click File, Working Directory. 2In the Set Working Directory dialog box, select the samples directory, or type C:\PROGRAM FILES\COREL\SHARED\SAMPLES in the file namebox. The Object PAL scripting language Object PAL (Object Paradox Application Language) is an object-based,event-driven, visual programming language. You can use Object PAL tocompletely customized applications with entirely new buttons, menus, dialogboxes, prompts, warnings, and online Help. Object PAL can be used to extendthe regular Paradox functions, or to create non-database applications. Object PAL and Paradox are tightly integrated; the more you know about Paradox, the more you can take advantage of it in your Object PALprogramming. If you think of Object PAL as a tool that extends the power of Paradox, you can discover ways of using the language to perform tasks thatwould be awkward, difficult, time-consuming, or impossible to performwithout it. Object PAL supports variables, control structures, such as IF, FOR, WHILE, LOOP, and many of the same data types as other programming languages. You can use methods and procedures supplied by Object PAL, or you cancreate your own custom methods and custom procedures. For more information on Object PAL see the Object PAL online help (click Help, Object PAL Reference) or for a step by step instruction on how touse Object PAL, see the Object PAL Tutorial (click Help, Object PALTutorial). Understanding Paradox objects In Paradox, the database components that store, display, retrieve, and presentdata are called objects. The main objects you work with in Paradox are tables,forms, queries, and reports. You might also work with Object PAL scripts andlibraries, data models, or SQL files. In addition, Paradox offers a wide varietyof design objects that you can use to customize your forms and reports. Paradox objects and design objects have attributes or characteristics calledproperties. Getting started 33 | 292806769-Paradox-9-Eng.pdf |
Paradox uses the following objects to store, display, and present information: files tables forms reports queries data models Object PAL scripts libraries SQL files Design objects are objects you create with toolbar tools and place in forms and reports in a Design Window. Design objects include the following: text objects boxes, lines, and ellipses crosstabs charts buttons graphics OLE objects document pages Each object has a different extension. For a list, see File extensions for Paradox objects in the Reference section of the online Help. Understanding tables Paradox stores data in tables. A table should represent a specific subject suchas orders, courses, or employees. Tables consist of rows and columns. Eachrow contains related information about a particular person or item. Forexample, in a customer table a row of data might include the customers IDnumber, name, address, and telephone number. This is called a record. Eachcolumn contains one category of the data that makes up a record. This iscalled a field. 34 Paradox 9: Chapter 2 | 292806769-Paradox-9-Eng.pdf |
The sample table below is named Phone. db. It has two fields (Name and Phone Number) and three records (Janet, Sue, and Doug). Temporary tables Certain Paradox operations create temporary tables that last only until youchange your private directory or end the Paradox session. Paradox stores all temporary tables in your private directory. You can edit and query a temporary table as you would any other table. If you want to saveone of these tables, you must rename it. The following table lists the temporary tables Paradox creates when performing certain operations. Paradox places these tables in the privatedirectory. Name Created during ANSWER. DB Query contains results from a query CHANGED. DB CHANGETO query or Add operation (update) contains unchangedcopy of changed records CROSSTAB. DB Running a crosstab object in a form contains results of a crosstab DELETED. DB DELETE query contains deleted records ERRORCHG. DB CHANGETO query contains records that could not be changed ERRORDEL. DB DELETE query containts records that could not be deleted ERRORINS. DB INSERT query contains records that could not be inserted INSERTED. DB INSERT query contains inserted records KEYVIOL. DB Restructure or Add operations (append) contains records withduplicate key values and records that violate referential integrity rules LOCKS. DB Tools, Display Locks contains all active locks on a table Getting started 35 | 292806769-Paradox-9-Eng.pdf |
PAL$SRC. DB View, Document Source contains a list of source code, objects, and methods in your form PROBLEMS. DB Restructure or Import operations contains unconverted records You should not use any reserved temporary table name as the name of anobject you create, because Paradox deletes temporary tables (or tableswith those reserved names) whenever you change your private directoryor exit Paradox. If you perform more than one operation that results in this temporarytable within one session, Paradox creates additional temporary tables withthe same name and numbers them. For example, KEYVIOL1, KEYVIOL2,and so on. For more detailed information, see Creating a Paradox table on page 53. Understanding forms Sometimes its more convenient to work with the data from your tables onerecord at a time, rather than with an entire table full of data. Forms let yousee as much (or as little) of your data as you want in the format you prefer. The following figure shows a form created by Paradox that displays only onerecord at a time. When you view data in a form, you see the same data as in the table, but Paradox arranges it differently. If you edit data in the form, Paradox updatesthe data in the table. You can use Paradox design tools to create custom form layouts. You can design forms that display several records from a table or even records fromseveral tables at the same time. For more detailed information, see Creating and opening a form on page227. Understanding reports Many people want to see their data in printed reports. Paradox reports areflexible and powerful. You can sort and group records, calculate fields andtotals, and arrange your data in various formats. Reports, like forms, take advantage of Paradox design features and tools. Using these tools, you can customize your reports to look just the way youwant. And, because its so easy to link tables together, you can combine data 36 Paradox 9: Chapter 2 | 292806769-Paradox-9-Eng.pdf |
from several tables into one report that includes exactly the information you want. For more detailed information, see Creating and opening a report onpage 246. Understanding queries A Paradox query is a question you ask about the data in your tables. You canuse queries to find or select data from a table combine data from more than one table perform calculations on the data in a table Paradox gives you a simple yet powerful way to ask questions about a tables data called Query By Example (QBE). In the Paradox Query window, youchoose which tables you want to ask questions about and then enter anexample of the data you want. Paradox runs the query and generates an Answer table based on your example. Paradox also allows you to run live queries that generate a live, editable view of the data you described in the query. When you edit the live query view,you actually change the data in the table you queried. Live query views giveyou a simple way to limit your view of data to just what you need to workwith. For more detailed information on queries, see Querying your databaseon page 309. Understanding Object PAL scripts, libraries, and SQL files Scripts Scripts are pieces of Object PAL code that you can create to performoperations automatically. (Object PAL is the Paradox application language. )Object PAL code is usually attached to objects in forms, but you can alsocreate standalone scripts that perform operations you specify independentlyof a form. For example, you can write a script to open a particular table andperform a calculation on one or more of its fields. Paradox runs this type ofscript directly from the desktop, not from triggering an event on an object in Getting started 37 | 292806769-Paradox-9-Eng.pdf |
a form. For more information on writing scripts, see the Object PAL online Help. Libraries A library is an object you can use to store commonly used Object PAL codewhich lets you easily share code among forms, scripts, and other libraries. For more information, see the Object PAL online Help. SQL Files An SQL file is an object that contains code you write in SQL (Structured Query Language). For more information about using SQL with Paradox andabout using Paradox to work with remote data, see Connecting to the SQLserver. You can use the SQL Editor to write SQL code to perform operations on remote data using Paradox SQL Link. You can also write query scripts using SQL that you can run on local Paradox or d BASE data. Setting desktop and system preferences Preferences are global settings that affect the overall performance of Paradox, and the default settings or values that appear for many of itsoperations. To set desktop and system preferences Click T ools, Settings, Preferences. The Preferences dialog box contains the following tabs and options: General: T ype a new title for the Paradox title bar. Add a bitmap to the Paradox Window background. Change the desktop state settings and default font. Choose to have the Project Viewer open on startup. Tables: Choose whether you will always start with a blank table or use an Expert. Have the program ask you for confirmation when you specify a recorddeletion. 38 Paradox 9: Chapter 2 | 292806769-Paradox-9-Eng.pdf |
Forms/Reports: Specify whether you want to use a data model or Expert every time you make a new form or report. Determine the screen size of your form or report. Specify whether you want to open your form or report in Design mode. Select screen and printer style sheets. Designer: Specify how to select design objects contained by other objects. Specify whether to display onscreen design objects with or withoutframes. Suppress screen flashes when you move or resize design objects. Specify what you see when you move or resize an object, the object itselfor its outline. Specify how to measure and space grid lines. Specify which ruler to display in the Design Window. Query: Determine what kind of access you and other users have to queries. Specify whether your query requires remote data on SQL servers. Choose whether you want Paradox to generate auxiliary tables whenrunning queries that change data. Specify whether the Check or Check Plus operator is the default checkmark for choosing fields in a query. Control the update of SQL tables from live query views. Toolbars: Enable the check box for each toolbar you want displayed. Experts: Specify whether you want the Experts to open automatically and whetheryou want the Startup Expert to run. Advanced: Specify warning prompts, ANSI character entry, expandable directorybranches, and scroll bars in form windows. Getting started39 | 292806769-Paradox-9-Eng.pdf |
Database: Specify a directory to use as your private directory. Choose whether you want Paradox to interpret blanks in calculated fields as the number zero. Determine how Paradox works on a network in terms of other users, howoften you want your display refreshed, and the length of time you want Paradox to retry accessing tables from which you are locked out. BDE: View the network control file directory, language and database drivers,buffer size, or local share. SQL Editor preferences are set on the Editor page of the Developer Preferences dialog box. Setting Object PAL preferences Preferences are global settings that affect the overall performance of Paradoxand the default settings or values that appear for many of its operations. Object PAL Preferences are set using the Developer Preferences command. You can set the Object PAL level that youre comfortable with on the General page. Choose Beginner to limit the range of Object PAL possibilities you view. This helps you understand more quickly how Object PAL works. When yourecomfortable working in Object PAL, choose Advanced to see the full set of Object PAL features. Setting general Object PAL preferences Paradox lets you specify Object PAL desktop and system preferences. To set general Object PAL preferences Click T ools, Settings, Developer Preferences. The Developer Preferences dialog box contains the following pages: General: Choose whether you want Object PAL Explorer and Object PAL Quick Lookup to show all the elements in the Object PAL language(Advanced) or simply a subset (Beginner). 40 Paradox 9: Chapter 2 | 292806769-Paradox-9-Eng.pdf |
Choose to suspend execution by using CTRL + BREAK. Choose to define and use your own breakpoints. Choose to keep the debugger environment open in a Design Window. Open the debugger whenever you run a form. Extend your choice of menu options in the Form Design Window. Object Explorer: Choose how you want Object Explorer to list methods/events. Editor: Enable the check boxes that perform the operations you require. Choose the Use Default button to set your chosen options to thedefault of the current keystroke mapping. Specify the number of columns between tab stops. Specify the number of columns to indent. Specify the number of undo actions to store before undo actioninformation is discarded. Display Choose from three sets of keystrokes. Specify display options such as Hints and Save prompts. Choose font names and sizes. Colors Specify foreground and background colors for anything listed in the Elements list box or choose default settings. Specify text attributes. If you enable the Show Developer Menus check box on the General pageof the Developer Preferences dialog box, youll see extra commands onsome menus in the Form Design Window. These are commands thatotherwise appear only in the Integrated Development Environment (IDE). Having them available in the Form Design Window can be convenient for Object PAL developers. Getting started 41 | 292806769-Paradox-9-Eng.pdf |
Organizing your database projects Because databases can be very large and contain many different objects such as tables, forms, reports, and queries, Paradox offers several features to helpyou organize your database projects. The Project Viewer is a graphicalinterface that lets you view all the objects of one or more type contained in agiven directory by clicking on the type name(s). Contained within the Project Viewer are the directories, both working and private, that store your work. Finally, aliases allow you to take a full directory path name and rename it witha word or two. Aliases allow for easier access to your databases no moretyping long path names! Project Viewer The Project Viewer is a central feature of the Paradox desktop. It provides aquick way for you to organize your database projects. In the top left corner of the project viewer is a drop-down box that lists directories. You can use your own directory that will contain the tables, form,reports, charts, etc., you create (the default directory for this is called the Working directory). Use the drop-down box to find the directory you want. Simply click on any of the objects listed on the left side of the Project Viewer. For example, if you specify Samples as your working directory and click Tables, you will see a list of all the tables that have been constructed in the Samples project. From the Project Viewer, you can right-click file names to view associated menus, or double-click to perform the default action, which is usually Open. Using the Project Viewer for quick access to projects Use the drop down box in the top left corner to select an alias, and clickthe Set Current Directory as Working Directory button to change yourworking directory. Click an icon on the left panel to choose the type of object you want tosee. Right-click an icon in the left panel to access the New and Opencommands. (You can use SHIFT + click and CTRL + click to selectmultiple icons. ) Right-click an object in the right panel to display a submenu of commands. Double-click an object to execute the first command on the right-clickmenu (usually Open. ) You can also perform the first command on themenu by dragging the selected object(s) onto the Paradox desktop. Specify an object type that doesnt have an icon by clicking the Customicon and entering a file specification, such as *. TXT, in the text box. 42 Paradox 9: Chapter 2 | 292806769-Paradox-9-Eng.pdf |
Drag objects from the right panel of the Project Viewer into the Windows Explorer and applications that support OLE 2. 0 to copy or embed themthere. Specify additional objects or files you want to see listed (files that are notin your working or private directories) by creating shortcuts to them. These are called references. Using the Project Viewer The Project Viewer lists objects in your working and private directories. Itgives you easy access to these objects. To open the Project Viewer Click T ools, Project Viewer. To have the Project Viewer open each time you run Paradox 1Click T ools, Settings, Preferences. 2Click the General tab if it is not already at the front. 3Enable the Open Project Viewer On Startup check box. To display a menu of commands for Project Viewer items Right-click an object name on the right panel of the Project Viewer. If you are viewing all files, you will see that some files do not have menus. This is because some files are automatically created with a Paradox object,and are modified only when you modify the object. (For example,. PX files,. TV files, and. MB files are associated with Paradox tables. ) You can change your working directory from the Project Viewer. Forinformation about working and private directories, see Directories onpage 45. Adding and removing Project Viewer items You can specify additional objects or files that you want to see listed in the Project Viewer (files that are not in your working or private directories) bycreating shortcuts to them. These are called references. When you open the Project Viewer for the first time, it displays the contents of the working directory. You can add items to the Project Viewer by creatingshortcuts. Creating a shortcut (reference) to an item does not move it into Getting started 43 | 292806769-Paradox-9-Eng.pdf |
the working directory. Instead, Paradox creates a reference to the item. After the reference is added, youll see the item (including its path or alias) in the Project Viewer. You can right-click references just as you can items from theworking directory. References show up in dialog boxes, too. For example, if you click File, Open, Table, any references you added appear in the list of files in the Open Tabledialog box. References you add to the Project Viewer apply only to the working directory, so you can have different references for each directory you use. To add a reference to the Project Viewer 1In the Project Viewer, right-click the object you want to reference andclick Create Shortcut. 2Right-click the shortcut and click Cut. 3In the Project Viewer, display the folder where you want to add thereference. 4Right-click the right panel of the Project Viewer and click Paste. To remove a reference from the Project Viewer In the right panel of the Project Viewer, right-click the object you want toremove and click the Delete button. Removing a reference from the Project Viewer does not delete an object, only the reference to that object. You can follow these steps to add non-Paradox items to the Project Viewer. If the items file extension is associated with a program, you candouble-click the non-Paradox object to open it. Refer to your Windowsdocumentation for information on associating file extensions withprograms. The Application Framework does not support references. 44 Paradox 9: Chapter 2 | 292806769-Paradox-9-Eng.pdf |
Directories In order to better organize your database projects, Paradox offers two types of directories: Working directory The working directory is like a filing cabinet in which you store everythingrelated to your current project tables, forms, reports, queries, and so on. AParadox working directory is the directory Paradox uses by default to openand save files. The working directory controls which files are displayed indialog boxes during open and save operations. When you install Paradox on alocal drive (not a network drive) the default directory is called WORKINGand given the alias :WORK:( an alias is simply a short form of the fulldirectory path name). For more information, see Aliases on page 46. ). Thisis your default working directory. Youll probably find it convenient to use working directories to organize your files. Then, when you want to use the files in a specific directory, you canmake it your working directory. For example, if you are working with tables,forms, reports, and queries in a directory named C:\DATAFILES\BUDGET,you could change your working directory to C:\DATAFILES\BUDGET. Private directory The private directory is a place where you can store temporary files that youdont want other users to overwrite. Especially in a multi-user environment,you need a place to put your temporary objects. You also need a place tostore temporary tables in a nonshared directory, such as an Answer or Keyviol table. Otherwise, other users could overwrite them. All Paradoxusers need their own private directory when they run Paradox. Your default private directory is PRIVATE, created below the main Paradox directory on your hard drive or on your network home directory if you haveno hard drive. Changing your working directory Your Paradox working directory is the default data directory Paradox uses toopen and save files. To change your working directory 1Click File, Working Directory. 2T ype the full path of the directory you want in the Directory file box. Youcan also choose an alias from the Alias drop down box. Getting started45 | 292806769-Paradox-9-Eng.pdf |
Paradox assigns your working directory the temporary alias WORK (even if it already has another alias name). If you create a project alias, Paradox creates a file called PDOXWORK. CFG and stores it in your working directory. This filecontains all project aliases (public aliases are stored in IDAPI32. CFG). Formore information, see Aliases on page 46. You can also change your working directory from the Project Viewer. Usethe drop-down list located in the upper left corner of the Project Viewer toselect a directory, then click the Set Current Directory as Working Directory button. Specifying a private directory If you do not specify a private directory, Paradox uses the PRIVATE directorywhich is installed below your system directory when you install Paradox on alocal (non-network) drive. If you have no local hard disk, the network homedirectory on the file server should be used as the private directory. To specify your private directory 1Click T ools, Settings, Preferences. 2Click the Database tab. 3T ype the full path and name of a directory in the Private Directory box. Paradox assigns the :PRIV: alias to your private directory. When you change private directories, Paradox releases any locks you haveplaced on any tables and deletes all your temporary tables. Make sure youdo not need any of your temporary tables before you change privatedirectories. Aliases An alias is a name you can assign as a shortcut to a directory. By default, yourworking directory has the alias :WORK: and your private directory has thealias :PRIV:. 46 Paradox 9: Chapter 2 | 292806769-Paradox-9-Eng.pdf |
There are two kinds of aliases: Public aliases You can create aliases that are available from all directories. These are called public aliases. Public aliases are stored in the BDE configuration file. Theyare available from any working directory and visible to any application thatuses BDE (the Borland Database Engine). Project aliases Project aliases are stored in the PDOXWORK. CFG file in the workingdirectory. They are available only when you are using Paradox and are in theworking directory you created them in. Whenever you change working directories, Paradox unloads all project aliases associated with the old working directory and loads those projectaliases that are specific to the new working directory. Advantages of aliases You avoid typing long path names. File references within forms, reports, and similar Paradox objects can usealias names rather than full paths. This makes your applications portable. You can move the entire application without recoding all references (justchange the alias definition). Used this way, an alias is a variable for adirectory path. Using the alias, you can connect to or disconnect from your remotedatabase server. You can change the definition of an alias at any time. All forms, reports, orother Paradox objects that refer to the alias automatically refer to the newdefinition of the alias. For example, you can design a complex multi-tableform using files on your computers hard disk, referencing tables with analias to a directory on your disk. When you are ready to share the form ona network, you move the tables on which the form is based to a networkdirectory and redefine the alias to point to that directory. The form thenknows where to find the tables on the network. When you change any of these directory or alias settings, Paradoxautomatically saves the changes. If a project alias has the same name as a public alias, Paradox does not loadthe project alias. Getting started47 | 292806769-Paradox-9-Eng.pdf |
Creating, modifying, and removing aliases Use the Alias Manager dialog box to create new aliases. You cannot create an alias using extended characters such as characters that contain accents. Paradox also converts lowercase letters to uppercase. To create a new alias 1Click T ools, Alias Manager. 2Click New. 3T ype the name for the new alias in the Database alias box. 4Choose the driver you want from the Driver T ype list box. The Driver Type list box displays all the drivers to which you are connected. Choose Standard to create a database of Paradox (and d BASE)tables. 5T ype the full path of the directory location including the drive letter in the Path box. 6Enable the Public Alias check box if you want the alias to be available nomatter which directory you are working in. 7Click the Keep New button if you want to keep the alias but do not want toclose the dialog box. The Keep New button becomes the New button. You can then create another alias. If you want the alias you just created to be temporary (existonly until you exit Paradox), click OK. 8Click OK and choose a name for the new alias. Paradox prompts you to overwrite the existing configuration settings. When you overwrite, Paradox appends the new alias without changing anyexisting configuration settings. By default, Paradox stores saved publicaliases in IDAPI. CFG and project aliases in PDOXWORK. CFG. To modify an alias 1Click T ools, Alias Manager. 2In the Alias Manager dialog box, choose the alias whose path you want tochange from the Database Alias list. 3T ype the new path in the Path box. 4Click Save As. Paradox opens the Save File As dialog box and prompts you to overwrite the existing configuration settings. When you overwrite, Paradox appends 48 Paradox 9: Chapter 2 | 292806769-Paradox-9-Eng.pdf |
the new alias without changing any existing configuration settings. By default, Paradox stores saved public aliases in IDAPI. CFG and projectaliases in PDOXWORK. CFG. To remove an existing alias 1Click T ools, Alias Manager. 2In the Alias Manager dialog box, choose the alias you want to remove fromthe Database Alias list box. 3Click Remove. 4When you click OK, Paradox prompts you to save the change in theappropriate. CFG file. You can create aliases for local or network directories or for remotedatabases using the Alias Manager dialog box. T o access the Alias Manager dialog box, Click T ools, Alias Manager. You can remove the alias from the. CFG file at any time (using the Alias Manager dialog box). T o create an alias similar to one you already have, select the appropriatealias from the Database Alias list box. Click New, type changes in the box,and click Keep New to save the alias. Printing, saving, closing and exiting You can print any tables, forms, reports, or scripts you create in Paradox files. While working with Paradox, you can save the tables, forms, reports, queries, and other objects. Paradox saves files differently depending on the file type. For example, you must manually save form and report designs, but Paradoxautomatically saves data as you enter it. Paradox will prompt you to save amodified file upon closing it or exiting the application. To print a table, form, report, or script Click File, Print. To save your work Click File, Save. Getting started 49 | 292806769-Paradox-9-Eng.pdf |
To save a form or report design 1With a form or report open in the Design window, click File, Save. 2T ype a name for the form or report in the File Name box. For information on saving specific objects and properties, refer to those items. To close a window Click File, Close. To close all windows Click Window, Close All. To exit Paradox Do one of the following: Click File, Exit. Press ALT + F4. 50 Paradox 9: Chapter 2 | 292806769-Paradox-9-Eng.pdf |
Tables 51TABLES 3 Tables are the most fundamental Paradox object. They contain all the information that you want to manage in your database. After you createtables, you can add forms, reports, and queries to manage and manipulateyour data. Creating tables involves storing a variety of information including names, addresses, telephone numbers, and much more. The only condition is thatthe information has to be organized in a basic table structure. This structureconsists of a series of columns, which represent the table fields, and rows,which represent the individual records. Think of a field as a column heading,such as Name, Address, State/Province, or Employee ID. Once you havecreated a table with all the appropriate fields and defined the field types, youcan start creating records by adding data to rows. Some elements such as field names, types, and sizes are common in creating all types of tables. However, to ensure data integrity and establish thesharing and verification of data between tables, some fields need specialproperties assigned to them. Maintaining data integrity is essential to a gooddatabase. You can use the following Paradox features to help ensure theproper functioning of your database: validity checks, table lookups,passwords, and referential integrity. Paradox also provides a unique tool for creating, restructuring, and linking tables, called the Visual Database Designer. The Visual Database Designer isan ideal tool to create a visual representation of your database. | 292806769-Paradox-9-Eng.pdf |
Once you have created the table structure, or borrowed the structure from an existing table, you can use a variety of Paradox features to work with thetables. You can navigate through the tables and manipulate the view of the data. use Filters to display only those records that meet certain conditions you specify or records based on any secondary index, or sort tables based onsorting conditions. restructure tables to change the structure of an existing table. You canchange the field names, field types, field order, key, indexes, validitychecks, referential integrity, password protection, table language, andtable lookups. change the default view of the table. change the data format from the predefined formats. You can definecustom formats for number, money, date, time, timestamp, and logicalfields. manipulate tables by adding, moving, subtracting, and emptying tablerecords and copying, renaming, emptying, and deleting tables. set locks which prevent two users from editing the same record at thesame time or custom set user lock levels for users. Creating tables Planning is the first step in creating a table. You need to decide what type ofdata you want the table to contain and how you want to lay it out. When youplan a table, keep the following guidelines in mind: Put as little information as possible in each field. This allows for more flexible data maintenance and straightforward querying. For example, ifyou break an address into separate fields for street, city, and state, you caneasily query on these specific field values. This is where designing adatabase table differs from designing a spreadsheet. If you ever want tosee the data in a spreadsheet-like format, you can create a crosstab of thetables data. Be complete. Include fields for all the information you think youll need,but dont clutter the table with information you dont need. Use small tables. If you have a great deal of information to organize, itsgenerally better to put it in several small, related tables rather than in oneall-encompassing table. For more information, see Understanding datanormalization on page 27. 52 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
Keep the tables familiar. Its often best to create tables that correspond to the kinds of objects, like forms and files, you already use. Avoid redundancy. Beyond the common fields (primary and foreign keys)necessary for linking tables, dont duplicate information in different tables. Creating a Paradox table The first step in creating a Paradox table is planning its structure. You haveto determine which fields you need in the table, what type of field eachshould be, and what you are going to name them. You can either create onefrom scratch or use the Table Expert. Whichever method you choose, youwill need to understand the following basic concepts: field names, field typesand sizes, and keys. Field names A field is a column of information in a table. A collection of related fieldsmakes up one record. When you are ready to create the table, you must firstdefine the fields. Field definition involves not only choosing a name for thefield, but also specifying a field type and size. You must also decide whetherthe field will be a key field for the table. For more information about the rules for naming fields, see Paradox field names and types in the Reference section of the Online Help. Field types and sizes Once you have decided what to name the field, you should have a good ideaof what kind of information will be entered into it. For example, a phonenumber field may consist of numbers, brackets, and dashes, and therefore analpha field would be the best field type. You only need to specify a field size ifthe field type you choose requires a size limitation. For example, a memofield could be quite long and its length may be unpredictable. Limiting thesize of such alpha fields is a good way to maintain data integrity. When creating a field, you must specify not only the name of the field, but the field type and size. You must also decide which field(s) will form theprimary or composite key for the table. For a detailed description of each field type, see Paradox field types in the Reference section of the Online Help. Tables 53 | 292806769-Paradox-9-Eng.pdf |
Keys Paradox uses key fields to link tables and to sort records. Keys can be either primary or composite. Primary Keys: When you designate a primary key field, it must be the first field in the table and it must be unique. This means that it mustconsist of data that could not possibly be duplicated. For example, it is nota good idea to use Last Name as a key field in an employee table becauseyou might have more than one employee with the same last name. Employee No. (a number particular to each individual employee) is abetter key field. Using a unique field for the key ensures that tables can belinked without error. If you specify Employee No. as the primary key in one table, you can only relate that table to another that also has Employee No. as a field. In the first table, Employee No. is the primary key; in thesecond table, Employee No. is the foreign key. If you create a key on the Last Name field of the sample CONTACTS. DB table, you are telling Paradox to organize the table by the values in the Last Name field, asshown in the following figure. Composite Keys: When you create a composite key, Paradox creates aprimary composite index which organizes the records by the first field ofthe key (according to the tables structure) and then the next field, and soon. The following figure shows the CONTACTS. DB table with acomposite key made up of the Last Name and First Name fields. Records31 and 32 illustrate the composite key by sorting the recordsalphabetically by first name. Creating and saving a table Once you have decided on the type of data you want to enter into a table, youmust create a table structure. Think of table structures as the blueprints foryour tables. You can also borrow the structure from an existing table andmodify it according to how you want to define the table. 54 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
In addition to borrowing the structure of a table, you can also borrow its primary (key) or secondary indexes, validity check definitions, referentialintegrity, and table lookup definitions. Use the Options settings in the Select Borrow Table dialog box to specify the definitions you want to borrow withthe table. Once youve completed the structure for the table, you should save it. To create a Paradox table from scratch 1Click File, New, Table. 2Click Blank. 3Select a table type from the Table T ype list box and click OK. 4T ype the name of the field in the Field Name column. 5Click the T ype column and select the appropriate field type from the list box. 6In the Size column, accept the default size or type an appropriate fieldsize. 7T o set the field as a key field, click in the Key column to the left of thefield name. A key icon appears indicating that the field is now a key field. 8Click in the next row to create another field. Repeat steps 5 to 8 until you have specified as many fields as necessary. To borrow a table structure 1Follow steps 1-3 from the previous procedure. 2On the Field Roster page, click Borrow. 3From the Look In box, find the location of the table whose structure youwant to borrow, or type the table name in the File Name box. 4In the Options section, enable the check box beside any table propertiesyou want to borrow. 5Click Open. Paradox copies the structure of the table to the Table Structure dialog box. To save the table 1Click Create. 2T ype the name of the table in the File Name box. Tables 55 | 292806769-Paradox-9-Eng.pdf |
3Select Paradox (*. DB) in the Save As T ype box. 4Click Save. If you want to change a table once youve created it, you can restructure it. Click Restructure to access the Restructure Dialog box. If a field in a table is hyperlinked, you can deactivate and activate it byclicking T ools, Settings Preferences. On the General page of the Preferences dialog box, enable or disable the check box as appropriate. This is useful when you are in edit mode and you dont want to launch the Internet application. For more information about the other columns, such as Min, Max, Default,Picture and Reqd, see Validity checks on page 63. Defining key fields When you define a key field, Paradox makes it the primary index and sortsrecords on it. If you choose to define a composite key, you must includeenough fields to ensure the uniqueness of each table record. If you cannotreasonably expect a composite key to handle all cases of duplicate data, it is agood idea to define an identification field that identifies one and only onerecord of the table. Observe the following rules when defining key fields:A table can have only one key. This key can be made up of one or more fields. If a key consists of more than one field, it is a composite key. You cannot assign a key to memo, formatted memo, graphic, OLE, binary,logical, or bytes fields. If a key is defined as a single field, that field must be the first field in thetable. If you identify more than one field as a key field, you create a compositekey. These fields, taken as a group, must be unique for each record of thetable. The composite key must begin on the first field in the table andmust include sequential fields. Each value in the field must be unique. This ensures you do not haveduplicate records in the table. 56 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
You can leave only one record in the key field blank because Paradox considers subsequent blank fields to be duplicates and does not acceptrecords containing them. The key establishes the default sort order for the table. Paradox sorts thetables records based on the values in the field(s) you define as the tableskey. To create a primary key field 1Open the table for which you want to define the key field. 2Click Format, Restructure Table. 3On the Field Roster page of the Restructure dialog box, click the keycolumn to the left of the first field to define the key. To create a composite key 1Open the table for which you want to define the composite key. 2Click Format, Restructure Table. 3On the Field Roster page of the Restructure dialog box, click the keycolumn to the left of the fields for which you want to define the compositekeys. Handling Key Violations If you add a primary key to a table that was previously unkeyed or haddifferent keys, you might cause key violations. You might also rearrangefields so that the key fields are no longer the first consecutive fields in thetable. This means data already entered into the table violates the rulesestablished by the key. Paradox deletes key-violating records from the tableto a temporary table called KEYVIOL. DB located in the PRIVATE directory. Also, removing one or more fields from a composite key may cause duplicate values in the remaining key field(s). If this happens, Paradox places duplicaterecords in a temporary table called KEYVIOL. DB. If there is already a KEYVIOL. DB table, Paradox adds a number to the new temporary table, so itmight appear as KEYVIOL1. DB or KEYVIOL2. DB. Paradox can create up to100 temporary tables of the same name (the first is not numbered and thelast is number 99). Tables 57 | 292806769-Paradox-9-Eng.pdf |
To locate the KEYVIOL. DB table 1Click File, Open, Table. 2Use the Up One Level button to locate the PRIVATE directory. 3Double-click the KEYVIOL. DB table to open it. You can change the records in KEYVIOL. DB so they comply with the key requirements, and then add them back to the original table using the Addcommand from the T ools, Utilities menu. If you remove a key located above the other keys, Paradox displays anerror message when you try to save. T o correct the error, ensure that allkey fields are the first fields in the table. Indexes An index is a file that determines the order in which Paradox accesses therecords in a table. Although the file is never visible, Paradox uses it to linktables and access records. Primary indexes are defined while creating thestructure of a table. Although they are optional, they are great time-savers. Secondary Indexes help to speed queries and display data with a differentsort order. Primary Index When you add a key to a table, you are creating a primary index. Paradoxorganizes the records of a keyed table according to the values in the keyfield(s). By default, all indexes organize and access data in ascending order (Ato Z, or 0 to 9). T o prevent data duplication, the key also ensures that no twofields have the same information. A primary key must be the first field in atable. Secondary Index A secondary index is a field or group of fields that you define as one or more sort orders for the table a field you can link the table on a way to speed up certain search and locate operations A table can have more than one secondary index. In fact, you can identify each field of the table as a secondary index, so you can sort the table on anyof its fields. You can also create composite secondary indexes by combiningtwo or more fields. When you use a secondary index, you change only the 58 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
view order of the records. The physical location of the records in the table does not change (the primary index or key determines the physical sortorder for the table). When you create a secondary index, you can also specify three index options: Unique, Maintained, and Case sensitive. You cannot create a secondary index on a memo, formatted memo, binary, OLE, graphic, logical, or bytes field. Composite Secondary Index A composite secondary index is composed of a group of fields rather than asingle field. Paradox creates a composite index and sorts the records in thetable based on the first field in the key and then on subsequent fields in theorder in which they appear in the table. Alternate sort orders You must use a secondary index to re-sort a keyed table. Only an explicitlydefined secondary index can override the primary sort order established by atables key definition. For example, if you want to view a CUSTOMER. DBtable by First Name values, but need to keep the tables key intact, you candefine a secondary index on First Name and use it to temporarily change theview order of the records. Linking tables Secondary indexes are also used in linking Paradox tables. For example, youcan link the sample CUSTOMER. DB and ORDERS. DB tables and thencreate a form that displays the orders that each customer has placed. The ORDERS table has a secondary index identified on its Customer No. field. This means Paradox can quickly find all the records with a given Customer No. value. When you link the tables, Paradox identifies each Customer No. value in CUSTOMER. DB, then finds and displays all matching Customer No. values in ORDERS. DB. SQL Tables SQL (Structured Query Language) tables use unique and non-uniqueindexes, but they do not use the primary keys that Paradox tables use. Youcan create multiple indexes for an SQL table. For each index, you specifywhether it is unique or non-unique. SQL indexes are always maintained,unlike Paradox and d BASE indexes. You can use Paradox to create andmodify indexes on SQL tables, but you cannot specify which index to use in Paradox. When you use an SQL table in Paradox, the table should have aunique index. If it does not have a unique index and you edit the tables data,you may not be able to view the edits as you are making them. Tables 59 | 292806769-Paradox-9-Eng.pdf |
d BASE uses an index to organize the records in a table according to the values in one or more fields. For more information about keys, see Creating a Paradox table on page53. For more information about changing the sort order of a table, seeSorting tables on page 100. Creating secondary indexes You can define a secondary index on any field or group of fields in a tableexcept BLOB fields. Composite secondary indexes can have up to 16 fields. To define a field or group of fields as a secondary index 1Open a table. 2Click Format, Restructure Table. 3Click the Secondary Index tab. Paradox displays any existing secondary indexes and the fields you can use as a secondary index. BLOB fields are dimmed. 4Click Add and type a name to define a new Secondary Index. 5In the Fields box, select the field on which you want to define thesecondary index. 6Click the right arrow to move the field into the Selected Index Fields box. 7Specify either ascending or descending sort order by clicking the defaultsort order. 8Enable any of the following check boxes: Case-sensitive use capitalization, or case, as a criterion for sorting (uppercase letters sort before lowercase letters). Maintained Paradox automatically updates the index whenever youupdate the table. A table must have a key before you can create amaintained secondary index. 60 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
Unique (you must first enable Maintained before you can enable Unique) determines whether records can have duplicate values in thesecondary index field or fields. If two or more records have the samevalue in the secondary index field, the attempt to define the secondaryindex fails. You have to eliminate duplicate values before defining thesecondary index. 9T o define a composite secondary index, repeat step 4 to add additionalfields to the secondary index. A Paradox Native Index is non-composite, non-unique, case-sensitive, andascending. When you create a secondary index based on a single field, Paradox usesthe field name to identify the secondary index. Therefore, you cannotname a composite secondary index the same name as any of the fields inthe table. If you change the options of the secondary index (so it is not a Paradox Native Index), you can define a custom name. A non-maintained index is not automatically updated when you update thetable, but you can open a non-maintained index for use on a table if theindex is synchronized with the table. (Click Format, Filter once you openthe appropriate table to specify the index you want to use while workingwith the table. ) When you view a table with a non-maintained index, thetable is temporarily locked and cannot be updated. The table is also lockedif you use the Object PAL methods set Index() or switch Index(). Modifying and removing secondary indexes If you are currently sorting on a secondary index and wish to change the sortorder to a different field, you must change the secondary index. You mayneed to change the secondary index to establish new table links and speed upthe search and replace operations. You can also remove a secondary index ifyou no longer need it. To modify a secondary index 1Open the table with the secondary index you want to modify. 2Click Format, Restructure Table. 3Click the Secondary Index tab. 4Select the index you want to modify from the Index Names list box. Tables 61 | 292806769-Paradox-9-Eng.pdf |
5Modify the Secondary Index by doing any of the following: Change the Sort order by clicking the sort column and choosing the preferred option from the list box. Add and delete fields (creating or removing a composite secondary index) by using the right and left arrows. Change the Index Options by enabling and disabling the check boxes. 6Click Save. To remove a secondary index 1Follow steps 1 to 4 from the previous procedure. 2Click the Remove button. 3Click Save. Maintaining data integrity Maintaining data integrity is essential to a good database. Paradox offers the following features to help ensure the proper functioning of your database: Validity checks Validity checks are rules imposed on a field to ensure that the data entered inthe field meets certain requirements. A Picture validity check is a pattern ofcharacters that defines what you can type into a field during editing or dataentry. Table Lookups A table lookup assures that a value entered in one table matches an existingvalue in another table. You can also specify whether the person entering datain the field is allowed to view the lookup table and copy values from it, or willbe required to match the lookup tables values without being able to seethem. Passwords You can ensure that the table you create is protected from access byunauthorized users. You can specify master passwords, which control allaccess to an entire table, or auxiliary passwords, which use table rights andfield rights to provide different levels of access privileges. 62 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
Referential integrity Referential integrity is a means of data verification. It prevents the data shared by separate tables from being broken. If you establish referentialintegrity between a CUSTOMER. DB table and an ORDERS. DB table on thecommon Customer No. field, then only orders with a verifiable customernumber (verified automatically by Paradox in the CUSTOMER. DB table) canbe entered in the ORDERS. DB table. Validity checks The way you define a validity check determines what can be entered in afield. For example, if the majority of your customers live in California, youcould define a validity check on the State/Prov. field in your Customerinformation table so that every time you entered a new customer, Paradoxwould automatically enter CA in the field, which ensures that you have thevalid State/Prov. entered. If a customer does not live in California, you canedit the field. If you create a picture validity check for a table that contains data, Paradox does not reformat existing data to match the picture, nor does Paradoxvalidate existing data to check that it matches. However, if you choose to addor change a validity check, you have the option of enforcing the new validitycheck on existing data using the Restructure Warning dialog box. If youchoose to enforce the new validity check on existing data and any data thatdoes not comply with it, Paradox places the non-compliant data in the KEYVIOL. DB table. Paradox does not do this if the validity check is apicture. You can change the records in KEYVIOL. DB and then add them backto the table using T ools, Utilities, Add. Paradox provides five kinds of validity checks: Validity check Meaning Minimum The values entered in this field must be equal to or greater than the minimum you specify here. Maximum The values entered in this field must be less than or equal to themaximum you specify here. Default The value you specify here will be entered in this field automatically if noother value is entered. Picture The character string that you specify here acts as a template for thevalues that can be entered in this field. Required field Every record in the table must have a value in this field. When you save a table, Paradox saves validity checks in a file with the tablesname and the. VAL file extension. Tables63 | 292806769-Paradox-9-Eng.pdf |
Picture Validity Checks A picture validity check acts as a template that formats the value you enter in a field. For example, if you specify the picture (###)###-#### (acommon template for U. S. phone numbers) and enter the value 4085551234,Paradox formats the value into (408)555-1234. You can use these charactersin a picture validity check string: Character Stands for # Numeric digit ? Any letter (uppercase or lowercase) & Any letter (convert to uppercase) ~ Any letter (convert to lowercase) ! Any character (convert to uppercase) ; (semicolon) Interpret the next character as a literal, not as a specialpicture-string character. * Any number of repeats of the following character [abc] An optional part of the string that can be left out; type nothing or typeabc {a,b,c} Optional characters a, b, or c *n where n is a number means Repeat the next symbol exactly n times so *3#-*4# tells Paradox you want to enter three numbers, a dash, and thenfour numbers, which is the picture of a standard North American telephonenumber. You can also use a semi-colon to over-ride this syntax ex *;3 meansany number of threes. You can also specify pictures on field objects in design documents. However, if you create a picture validity check for the field in the table (asdescribed in this topic), you cannot specify one for a field object bound tothat field. If you add a new field that has a default validity check on it, and choose toenforce the validity check on existing data, Paradox creates the new fieldand places the default value in each record of the table. If you define adefault validity check on an existing field that contains data, Paradox doesnot overwrite the existing data with the new default value. 64 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
Following are some examples of picture validity checks: Picture Description &#&#&# Canadian postal code; for example, K1S 2A2 *! Any entry; all letters will be in uppercase {Yes,No} Either Yes or No Creating a required field validity check When you define a required field validity check on a field, the field must contain data before Paradox accepts the record. If you try to enter a record ina table that doesnt have a value in a required field, Paradox informs you thatthe validity check has failed, and does not let you move from the record untilyou enter a value in the required field. You can place a required field validity check on any field type and you can define required fields for Paradox and SQL tables. To create a required field validity check 1Open a table. 2Click Format, Restructure Table. 3On the Field Roster page, select the field to which you want to apply thevalidity check. 4Enable the Reqd check box. T o remove a required field validity check, click the field and disable the Reqd check box. Creating minimum and maximum value validity checks Minimum and maximum value validity checks allow you to define theminimum and maximum acceptable values for a field. For example, if all ofyour customer identification numbers are at least five digits long, you mightwant to define a minimum value of 10 000 on that field, thereby helping toprevent data entry errors. You can use minimum value and maximum value validity checks for alpha, number, short, long integer, money, timestamp, time, and date field types. You cannot use a maximum validity check on an autoincrement field. Tables 65 | 292806769-Paradox-9-Eng.pdf |
To define a minimum or maximum value validity check 1Open a table. 2Click Format, Restructure Table. 3On the Field Roster page, click the field for which you want to define the minimum or maximum validity check. 4Do one or both of the following: Click the Minimum column and type a minimum value. The values the user enters in the field must be greater than or equal to the minimum you specify. Click the Maximum column and type a maximum value. The values the user enters in the field must be less than or equal to the maximum you specify. When you define a numeric minimum or maximum, you must use thenumber format currently selected in the Windows Control Panel. Duringdata entry, however, you can use any format. You cannot use minimum-value and maximum-value validity checks on BCdates; instead, you can define a picture validity check on BC dates. If the field is gray, you cannot define a validity check. You can specify an initial value for an autoincrement field using aminimum validity check by entering the initial field value in the Minimumbox when you first create a table. Creating and removing a default value validity check Default value validity checks automatically enter a value in each record of thetable as soon as you create the record. For example, if most of yourcustomers are located in the United States, you could define USA as thedefault value for the Country field in your customer information table. Whenever you insert a new record, it would appear with the value USAalready in the Country field. You can use default value validity checks for alpha, number, short, long integer, money, logical, and date field types (including date, time, andtimestamp. ) When you enter numeric values as a default, you must use thenumber format currently selected in the Windows Control Panel. 66 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
To create a default value validity check 1Open a table. 2Click Format, Restructure Table. 3On the Field Roster page, click the field for which you want to define a default value. 4T ype a default value in the Default Value box. You can override the default value by moving to the fied and typing a different value. You can also delete the default value and leave the field blank, unless it also has a required field validity check. If the column is gray, you cannot define a validity check. You can use the TODAY operator to define todays date as the defaultvalue in a date field. NOW can be used as a default for time and timestampfields. Creating picture string validity checks Paradox provides a selection of standard picture strings for data such asphone numbers, zip and postal codes, and words that must be capitalized. If you use any printable (visible) character in a picture string different from those listed in the table, Paradox treats it as a constant. When you enter avalue in a field that has a picture validity check and you come to a point atwhich a constant is specified, Paradox automatically enters the constant. Forexample, if you create the picture (408)###-#### and then type 5551234in the field, Paradox inserts (408)555-1234 in the table. If you dont want to use any of the sample picture validity checks, you can create a custom picture validity check either by editing one of the samples orcoding one of your own. Paradox allows you to save custom picture validitychecks for future use. To specify a standard picture string validity check 1Open a table. 2Click Format, Restructure Table. 3On the Field Roster page, click the field name for which you want todefine a picture validity check. 4Click the Picture field and select a sample from the list box. Tables67 | 292806769-Paradox-9-Eng.pdf |
To create a custom picture string validity check 1Follow steps 1-3 from the previous procedure. 2Click the Picture field and select Picture Assistant from the list box. 3From the T ype list box, select the default field type or select Anytype, which allows you to create a picture that can be used with any field type. 4Click the Add button. 5T ype a new name for the picture in the Pictures box. 6T ype the syntax for the new picture in the Picture Code box. The indicator button to the right of the Picture Code box will inform you if your code is correct or incorrect. 7T ype a sample value for the code in the Sample Value box. 8Click the T est button to verify your sample. The indicator button to the right of the Sample Value box will inform you if your code is correct or incorrect. 9T ype a description for the new picture in the Description box. To edit a custom picture string validity check 1Select the Picture you want to edit in the Pictures box. If you want to edit the Picture name, double-click the name in the Pictures box. 2Edit the picture code, sample value or description. 3If you want to cancel your changes, click the Revert button to revert backto the initial code. To delete a picture string validity check 1Select the Picture you want to delete in the Pictures box. 2Click the Delete button. The indicator button for the Picture Code is an on-the-fly operation. Youwill not be able to enter a sample value or test the sample value until the Picture Code indicator button indicates your code is correct. If you want to restore the default picture string validity checks, click the Restore Default Pictures button. Note that this action will restore thedefault pictures, but will delete any of the custom pictures that you added. 68 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
For a list of picture codes, click the Code Syntax button. Removing validity checks If you decide that a field for which you required a validity should no longer be restricted by this check, you can delete the validity check. To remove a validity check 1Open a table. 2Click Format, Restructure Table. 3On the Field Roster page, click any of the following: the minimum field defined as a validity check and press delete. the maximum field defined as a validity check and press delete. the default field defined as a validity check and press delete. the picture field defined as a validity check and select none from the list box. the Reqd field and uncheck the box to disable the validity check. Table lookups Table lookups let you speed up and verify data entry. When you specify alookup table for a field, you are saying that the field can contain only valuesthat exist in the first field of the other table (the lookup table). You can alsospecify whether the person entering data in the field can view the lookuptable and copy values from it, or whether they are required to match thelookup tables values without seeing them. Tables 69 | 292806769-Paradox-9-Eng.pdf |
The following diagram exemplifies a table lookup: The difference between table lookup and referential integrity A table lookup helps you enter data that already exists in another table. T o establish a more powerful tie between two tables, define a referentialintegrity relationship. While a table lookup ensures that data is copied oradded accurately from one table to another, referential integrity ensures thatthe ties between like data in separate tables cannot be broken. Rules for table lookups Follow these rules when setting up a lookup table: The field of valid entries must be the first field in the lookup table. The field that you are defining as a table lookup must have the same field type and size as the first field of the lookup table. For best performance, the first field should be the primary key for thelookup table. You can use a table lookup across different directories. When you define atable lookup on a table from a different directory, Paradox stores the full pathto the table. If you move the lookup table to a different directory, you mustrecreate the same path or redefine the table lookup. 70 Paradox 9: Chapter 3 The Lookup Fieldlooks to the Lookup Table forinformation. | 292806769-Paradox-9-Eng.pdf |
Lookup types Paradox has two Lookup type options for lookup tables: Current Fieldsonly the current field gets its value from the lookup table even if the current table and the lookup table have other fields in common. Applicable Fieldsall fields of the current table that correspond to fieldsin the lookup table take their values from the lookup table. Correspondingfields must have identical field names and compatible field types in bothtables. Only the first field of the lookup table is used as part of the validitycheck. Lookup rights Paradox has two viewing access types for lookup tables: Fill Only: Does not allow the user to view the lookup table when editing a table and informs the user when the value is invalid. This option is usefulwhen you want to keep values in the lookup table secure. Fill And View: Allows the user to display and select values from thelookup table while editing a table. When a Paradox table is version 5 level or lower, it can not create a lookupif the table name or directory path has more than 8 characters. If you wantthe table lookup to work, you must upgrade the table to level 7 by usingthe table repair utility or by defining a level 7 feature for the table whenrestructuring (such as a descending index). When you create a database, all the tables should be saved in the samedirectory, including lookup tables. Although the Data Modeler allows youto move from alias to alias, you should not link tables from two differentdatabases or create a lookup between tables from different databases. Theconcept of a relational database is one where only tables within the samedirectory are linked. Creating and using table lookups The table lookup feature lets you compare the data entered in one field of atable with the data entered in another table to verify acceptable values forthat field. Paradox has two lookup types you can choose when creating tablelookups: Current fields and Applicable fields. Paradox also has two lookuprights you can choose when creating table lookups: Fill Only and Fill and View. Tables 71 | 292806769-Paradox-9-Eng.pdf |
To create a table lookup to an existing table 1Open the table to which you want to apply the lookup table. 2Click Format, Restructure Table. 3Click the Table Lookup tab. 4In the Fields list, click the field of the table for which you want a lookup. 5Click the right arrow. 6From the Lookup Tables list box, select the table that will be used as the lookup table for the specified field. You can locate the file using the button next to the Drive list box. 7In the Lookup type box, enable one of the following buttons:Current fields only the current field gets its value from the lookup table. Applicable fields all fields that correspond to fields in the lookuptable get their value from the lookup table. 8In the Lookup rights box, enable one of the following: Fill Only lets you enter data without viewing the lookup table. Fill and View lets you view and select from the lookup table. Using a Table Lookup 1Click View, Edit Data. 2Click Record, Insert. 3Select the field for which you assigned the lookup. 4Press CTRL + SPACEBAR to open the Lookup Table. 5Select an appropriate value in the Lookup Table and click OK. You can also use a table that you create from scratch that holds all acceptable values for the field (this is the lookup table). Remember thatthe first column in the table must contain the actual acceptable values forthe other tables lookup field. After you have created the table with theappropriate values, you can follow the steps above to use it as the tablelookup. 72 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
Passwords Security is especially important in a multi-user environment. Not only can you establish a password for the table as a whole, you can assign specificrights to the table or to individual fields. Once you specify password security,only those users who know the password can access the table. Wheneverusers try to access a password-protected table, Paradox prompts them tosupply the password (if they havent already done so). Master passwords Master passwords control all access to an entire table. You must specify amaster password before creating additional access restrictions. T o maintainsecurity you should change your master password regularly. As well, you candelete master passwords if they are no longer required. Auxiliary passwords Auxiliary passwords use table rights and field rights to provide differentlevels of access privileges for different users in a group. Table rightsdetermine the overall level of access to a table. Field rights determine thelevel of access to an individual field within the table. Auxiliary passwords canbe used to allow users to view data but not delete it. The type of table rights you specify for a user determines the type of field rights you can specify for that user, as shown in the following table: Table rights Possible field rights All (highest access) All Insert & Delete All Data Entry All, Read Only, or None Update All, Read Only, or None Read Only (least access) All, Read Only, or None Auxiliary passwords provide different levels of access privileges fordifferent users in a group. T ypically, one person such as a database administrator has access tomaster passwords. A group of users who need to perform different taskswith the table have different auxiliary passwords that provide differentlevels of access. Tables 73 | 292806769-Paradox-9-Eng.pdf |
Creating a master password A master password protects access to an entire table. Users must input the correct password before Paradox opens the table. If you want more specificsecurity, you can create auxiliary passwords that affect individual fields. Youmust first define a master password before you can assign any auxiliarypasswords. To create a master password 1Open the table for which you want to create a master password. 2Click Format, Restructure Table. 3Click the Passwords tab. 4Click the Define button. 5T ype a password in the Master Password box. 6T ype the password again in the Verify Password box. A password can be up to 15 characters long including spaces. Passwordsare case sensitive. Entering and releasing passwords Whenever you open a password-protected table, the Enter Password(s)dialog box appears. Paradox prompts you to enter the password before youopen the table. If you open a table once, supply the correct password, andthen close the table, Paradox allows you to re-open the table withoutre-entering the password. But, once you exit the program, Paradox releasesall passwords. Releasing a password means that the password is reactivatedand the user must enter the password before accessing the table. You canalso release a password without exiting Paradox. If you assigned the same password to several tables, Paradox allows you to enter the password to all applicable tables at the same time. For moreinformation, see Creating a Master Password on page 74. To enter the common password for several tables 1Click T ools, Security, Passwords. 2T ype the password in the Password box. 74 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
3Click the Add button. Paradox applies the password to all tables assigned that password, so that you dont have to type in the password the first time you open up thetable(s) for that session. To release a password without exiting Paradox 1Click T ools, Security, Passwords. 2T ype the password you want to release from memory. 3Click the Remove button. Next time you try to open the table with the above password, you will be prompted to enter the password. Click the Remove All button to release all passwords. Tables that arecurrently open are not affected. Changing and deleting a master password T o make sure the tables retain the level of security you require, you shouldchange your master password regularly. As well, if a password-protectedtable contains information that no longer needs to be restricted, Paradox letsyou delete the master password. To change a master password 1Open the table for which you want to change the master password. 2T ype the master password to open the table. 3Click Format, Restructure Table. 4Click the Passwords tab. 5Click the Modify button. 6In the Password box, type the new password. Youll see asterisks (*) representing the characters you type. A password can be up to 15 characters long including spaces. Passwords are casesensitive. 7In the Verify Password box, retype the new password. Tables75 | 292806769-Paradox-9-Eng.pdf |
If the two passwords arent identical (including capitalization), youll see an error message prompting you to enter either one of them again. If thetwo passwords are identical, Paradox saves the password and closes the Passwords dialog box. 8Click OK. 9Click Save to save your settings and close the Restructure dialog box. To delete a master password 1Open the table for which you want to delete the master password. 2T ype the master password to open the table. 3Click Format, Restructure Table. 4Click the Passwords tab. 5Click the Master Password in the Passwords list. 6Click the Delete button. 7Click Y es. 8Click Save to save your settings and close the Restructure dialog box. Creating and modifying auxiliary passwords T o create auxiliary passwords, you must first create a master password forthe table. Auxiliary passwords apply read and write access to the table as awhole. Once you define the rights for the whole table, you can further limituser access to the table by assigning rights to individual fields. For example,you could give a user Read access to the whole table, but then hide fields inthe table that contain sensitive information that you dont want general usersto be able to see or edit. Once youve assigned an auxiliary password, youmay need to modify or delete the password depending upon your usersneeds and changes to the tables. To create an auxiliary password 1Open the table for which you want to create an auxiliary password. You will have to enter the master password to open the table. 2Click Format, Restructure Table. 3Click the Passwords tab. 4Click the Add button. 5T ype the name for an auxiliary password. 6In the Table Rights section, enable any of the following check boxes: 76 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
Allgives a user rights to any function in the table, including the ability to restructure or delete it and to change or delete passwords. Insert And Deletegives a user the right to insert, delete, or emptyrecords, but not to delete or restructure the table. Data Entrygives a user the right to edit data and insert new records,but not to delete or empty records or restructure the table. Updategives a user the right to view the table and change non-keyfields, but not to insert or delete records or change key fields. Read Onlygives a user the right to view the table, but not to changeit in any way. 7Assign rights to specific fields in the table by clicking the Access cell tothe right of the field name and selecting Full, Read Only or None from thelist box. To modify the auxiliary password 1Open the table for which you want to change the auxiliary password. 2Click Format, Restructure Table. 3Click the Passwords tab. 4Select the auxiliary password you want to modify. 5Follow steps 6-7 from the above procedure. 6Click one of the following: Saveaccepts the modifications. Cancelcancels any changes and restores the original access rights settings. To delete an auxiliary password 1On the Passwords page of the Restructure dialog box, select the Auxiliary Password you want to delete. 2Click the Remove button. Referential integrity Referential integrity is extremely important when creating multiplerelationships between tables. Data integrity ensures that the values in a tableare valid. Referential integrity requires a field or group of fields in one table(the child table) to refer to the key of another table (the parent table) todetermine valid values. When you establish referential integrity, Paradoxchecks the validity of a value before accepting it in the referential integrity Tables 77 | 292806769-Paradox-9-Eng.pdf |
table. For example, if you establish referential integrity between CUSTOMER. DB and ORDERS. DB on their Customer No. fields, then entera value in the Customer No. field of the ORDERS. DB table, Paradoxsearches the Customer No. field of CUSTOMER. DB and either accepts thevalue in ORDERS. DB if it exists in CUSTOMER. DB or rejects the value in ORDERS. DB if it doesnt exist in CUSTOMER. DB. Referential integrity and indexes When you create or modify a referential integrity relationship, Paradoxcreates a secondary index on the referential integrity fields if it does notalready exist. Paradox names the index with the name of the field (if its asingle-field definition) or the name you gave the referential integrity (if its amultiple-field definition). The index appears in the list of secondary indexes. If you delete the referential integrity, Paradox does not automatically deletethis index. You must delete it manually. Referential integrity guidelines Follow these guidelines when you establish referential integrity: You can establish referential integrity only between like fields that contain matching values. For example, you can establish referential integrity between the sample CUSTOMER. DB and ORDERS. DB tables on their Customer No. Thefield names do not matter as long as the field types and sizes are identical. You can establish referential integrity only between tables in the samedirectory. You can establish referential integrity between an autoincrement field anda Large Integer field. The referential integrity parent table must be keyed. If you define referential integrity on a table that already contains data,some existing values may not match a value in the parents key field. When this happens, Paradox places the existing records that do not matchinto the temporary KEYVIOL. DB table in your private directory. Self-referential integrity A referential integrity relationship between a field in a table and the sametables key field is called a self-referential integrity relationship. For example,suppose you are using a table of employees keyed on the Employee ID field. If this table has a Supervisor field, you may want to create a self-referentialintegrity relationship between Supervisor and Employee ID, because thesupervisors are also employees. 78 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
When you create a self-referential integrity relationship, you must click Prohibit in the Update rule box of the Referential Integrity dialog box. (This security features prohibits changes to records in a parenttable that also exist in a child table. ) cannot create a circular reference. That is, you cannot create arelationship in which a field refers to itself. You cannot establish referential integrity between d BASE (. DBF) files,Paradox 3. 5 tables, or tables that do not have a key. You can use. DB filesand also some SQL server tables if you need referential integrity. Seeyour server documentation to determine if your table type supportsreferential integrity. If you copy the parent table, Paradox doesnt copy the referential integrity. If you copy the child table, Paradox copies the referential integrity, and thecopied table must meet the requirements of the referential integrity. Bothtables in the referential integrity relationship must be in the samedirectory. When you copy the child table to a different directory, you breakthe referential integrity link. Defining and removing referential integrity Paradox allows you to define or remove referential integrity relationshipsbetween a parent table and one or more child tables in the same directory. Only values that exist in the parent tables key (and therefore the first field orfields in the table) are valid values for the specified field(s) of the childtable(s). Always set your working directory to the folder containing thetables for which you want to establish referential integrity; Paradox does notlet you define the relationship otherwise. To define a referential integrity relationship 1Open the child table. 2Click Format, Restructure Table. 3Click the Referential Integrity tab. 4Click the Add button and type a name in the Link Names list. 5Select the parent table from the Parent Table list. 6Click the child tables field in the Fields list for which you want toestablish the referential integrity relationship, and click the right arrow. Tables79 | 292806769-Paradox-9-Eng.pdf |
If the parent table has a composite key, add fields to match all of the parents key fields. 7Click Save to save the Referential Integrity relationship. To remove a referential integrity relationship 1Open the child table. 2Click Format, Restructure Table. 3Click the Referential Integrity tab. 4In the Link Names list, click the name of the referential integrityrelationship you want to remove. 5Click the Remove button. You can also specify what attributes of referential integrity you want toapply using the options in the update rule section and the Strict Referential Integrity check box. For more information, see Defining Update Rule and Strict Referential Integrity on page 80. Defining Update Rule and Strict Referential Integrity If you want to control how Paradox updates records in a referential integrityrelationship, you can specify Cascade or Prohibit. You can also ensure accesson a table by enabling Strict Referential Integrity. To modify a referential integrity relationship 1Open the child table. 2Click Format, Restructure Table. 3Click the Referential Integrity tab. 4Select the name of the referential integrity relationship you want tomodify in the Link Names list box. 5In the Update Rules section, enable either of the following buttons: Cascade specifies that any change you make to the value in the key of the parent table is automatically made in the child table. It is thedefault rule for Paradox. T o cascade an update across tables, Paradoxmust place a lock on the target table. If the lock is denied (becauseanother user has already placed a lock), Paradox cannot perform thecascade update. 80 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
Prohibit specifies that you cannot change a value in the parents key field if there are records that match the value in the child table. If thevalue doesnt exist in any records of the child table, you can change theparent table. 6Enable the Strict R. I. check box if you want to ensure that earlier versionsof Paradox (for example, Paradox for DOS) cannot access a table on whichyouve established referential integrity. Paradox must obtain locks on alltables involved in a referential integrity relationship when you modify it. 7Click Save. Visual Database Designer The Visual Database Designer is an application designed for working withthe design of your databases. Using the Visual Database Designer, you cancreate Paradox tables, establish referential integrity between tables, view thefields of tables, and create, print, and save a layout of your database design. The Visual Database Designer looks similar to the Data Model Designer, but their purposes are very different. The Data Model Designer lets you linktables for the purposes of creating data models used with forms and reports. The relationships that you create between tables using the Visual Database Designer are actually saved in the table structure. With the Visual Database Designer you cancreate and edit layouts of your database design create and modify tables establish referential integrity relationships between tables save the database diagram layout print the database diagram layout The layout of your database design is saved in a file called DBL$file. $$$. Launching the Visual Database Designer The Visual Database Designer has its own unique environment in which you create, edit, and link tables. You can do most of the basic planning for yourdatabase within the Visual Database Designer. To launch the Visual Database Designer Click T ools, Visual Database Designer. Tables 81 | 292806769-Paradox-9-Eng.pdf |
Creating and modifying tables You can create Paradox tables using the Visual Database Designer. To create a table 1Click T ools, Visual Database Designer. 2Click Insert, New Table. 3Click in the Workspace to place a position for the new table. 4In the Table name dialog box, type in a name for the table. 5In the Create Table dialog box, define the fields and properties for the table. 6Click Create. To modify a table 1In the Visual Database Designer modeling area, select a table and click Edit, Restructure. 2Using the Restructure dialog box, modify the fields and properties of thetable. 3Click Save. For more information about defining tables fields and properties, seeCreating a Paradox Table on page 53. For more information about restructuring tables fields and properties, seeRestructuring tables on page 103. Changing the database diagram layout The Visual Database Designer is an ideal tool for viewing your database which tables are in the database and how the tables within the database relateto one another. You can add tables to the Workspace, manipulate tables withinthe Workspace, change the tables viewing properties, and refresh the Workspace. To add a table 1Click Edit, Add Table. 2Select the table you want to add from the table list and click the Addbutton. 82 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
3If you want to add more tables, repeat step 2. 4Click Close. To manipulate tables Click and drag the title bar of a table. To collapse and expand tables 1Select a table in the Workspace. 2In the Title bar of the table, click the up arrow once to collapse the table to the field and table name level. 3Click the up arrow a second time to collapse the table to table name only. 4In the Title bar of the table, click the down arrow to expand theinformation to include the field names. 5Click the down arrow again, to fully expand the table information toinclude the name of any indexes assigned to this table. To size Tables Click View, Auto Table Resize. To refresh the Workspace Click View, Refresh Diagram. Linking tables You can use the Visual Database Designer to establish referential integrityrelationships between tables. Any relationships that you establish in the Visual Database Designer are automatically saved in each tables tablestructure. Once youve created a referential integrity relationship, you can select the link and open the Link Property dialog box to edit or delete the relationship. To establish referential integrity 1In the Visual Database Designer, select the field of the Child table youwant to link. 2Click and drag the field you selected to the field of the Parent table youwant to link. Ensure that the fields you are linking match in type and size. The Parent tables field must also be the key field. Tables 83 | 292806769-Paradox-9-Eng.pdf |
3In the Link dialog box, type a name for the referential integrity link. The parents key field and child field will be displayed in the columns. 4Click OK. 5Right-click the modeling area and select Show Referential Integrity link name. The labeled link is shown in the modeling area represented by an arrow. To select a link Click a link between two tables. You will know that the link is selected if the link line has changed in shape and color and the two linked fields become highlighted. To view link properties 1Select the link you want to edit. 2Right-click the link and choose Link Property. To delete a link 1Select the link you want to edit. 2Right-click the link and choose Remove Referential Link. T o remove a link you can also select it and press DELETE. Viewing table information The Visual Database Designer not only shows you the relationships betweentables, but also visually informs you about specific tables properties andfields, such as table lookups, keyed fields, and secondary indexes. To view table information Click T ools, Visual Database Designer. The visual layout of your database is displayed in the Workspace. Each tablecontains icons which represent the following information: blue key indicates the field is set as a key field. If more than one field has a blue key, that table has a composite index one bar identifies a field 84 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
one bar with purple top indicates a table lookup two bars with an arrow indicate that an index has been established on the field You can also view table information by clicking T ools, Utilities, Info Structure. Saving a diagram layout Once you are finished creating the database diagram layout, you can save thelayout so that it will appear in the same way the next time you open the Visual Database Designer. To save the diagram layout Click File, Save. You do not need to name the database diagram layout. Printing a diagram layout You can print a model of a database diagram layout. Before you print a database diagram layout you can preview how it will look. To preview the database diagram layout Click File, Print Preview. To print the database diagram layout Click File, Print. You can also right-click the Workspace and choose Print Preview topreview the database diagram layout. You can also right-click the Workspace and choose Print Diagram to printthe database diagram layout. Navigating and Viewing tables Paradox offers several options to make table navigation fast and easy. Once atable is open, you can move among the records by using the horizontal scrolllock or the mouse and keyboard. Tables 85 | 292806769-Paradox-9-Eng.pdf |
In addition to navigating through tables, you can change the table view. A list of all the tables is found in the Project Viewer. When you open a table, itdisplays in View mode. In this mode you are able to move through the tablerecords and change the way you view data, but you cannot edit it. Paradox lets you view data in many different ways. You canuse the horizontal scroll lock to freeze columns on the left side of the window. For example, in a CUSTOMER. DB Information table, you mightwant the Customer No. and Customer Name fields to remain in view sothat you can easily tell which customer the record belongs to. Thehorizontal scroll lock allows you to set which fields you want to remain inview as you scroll to the right. use Memo View and Field View to see the full contents of certain fieldtypes such as BLOBs. Depending on the speed of your system and thesize of your BLOB fields, you may find that displaying these fields cansometimes be slow. This is because memo and graphic data is storedoutside the table in a separate file. use T ool, Quick Design to view the table quickly as a form, report, chartor crosstab. You can view the following information about d BASE and SQL tablesusing the Structure Information dialog box. Navigating through table records Paradox provides navigational buttons on the toolbar to allow you quickaccess to your data. You can also move through table records by using thescroll arrows and scroll bars. To navigate through table records Click any of the following arrows: to move to the first record of the table to move up one record set (the number of records displayed in the Table Window) to move to the previous record of the table 86 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
to move to the next record of the table to move down one record set (the number of records displayed in the Table Window) to move to the last record of the table To scroll through your records Use any of the following scroll arrows: Up and down scroll arrows on the vertical scroll bar to scroll through a table one record at a time. Left and right scroll arrows on the horizontal scroll bar to scrollthrough the columns of the table. Vertical or horizontal scroll bars to scroll through the records of thetable. The records themselves do not move; instead, the Status Bardisplays either the range of record numbers or the field name thatwould appear if you released the scroll box. In d BASE tables, the vertical scroll box is always centered vertically when Table, Show Deleted is not checked. If the table is keyed, Paradox displays the range of values in the key field(or the first field of a composite key) on the Status Bar as you move thevertical scroll box. Using the keyboard to navigate through table records Use the following keyboard commands to navigate through table fields andrecords. Key Effect/Action Selects the field to the left of the selected field. (If the selected field is thefirst field in the record, selects the last field of the previous record. ) Selects the field to the right of the selected field. (If the selected field isthe last field in the record, selects the first field of the next record. ) Selects the same field in the record below the current one. Selects the same field in the record above the current one. Tables 87 | 292806769-Paradox-9-Eng.pdf |
HOME Selects the first field in the current record. END Selects the last field in the current record. CTRL + HOME Selects the first field of the first record in the table. CTRL + END Selects the last field of the last record in the table. Pg Dn Displays the next set of records. Pg Up Displays the previous set of records. CTRL + Pg Dn Scrolls the window to the next set of fields. CTRL + Pg Up Scrolls the window to the previous set of fields. Viewing table structure information You can use the Info Structure command to display the structure of a table, including any key, validity check, index, table lookup, or dependent tables. You cannot make changes to the table structure from the Structure Information dialog box; you can only view the structure. To view table structure information 1Click T ools, Utilities, Info Structure. 2Double-click the name of the table whose structure you want to view. 3Click any of the tabs in the Structure information dialog box. The Structure information dialog box also displays information aboutd BASE and SQL tables. Using the horizontal scroll lock to view fields It is likely that many of the tables you create will have too many fields to beviewed all at once. However, as you scroll to the right to view additionalfields, you may want a field or two to remain in view. By default, thehorizontal scroll lock is set to the left of the first column in the table so thatall columns move as you scroll to the right. The horizontal scroll lock appearsin the bottom left corner of the Table Window. To set the horizontal scroll lock 1Hold your cursor over the scroll lock until your cursor changes to adouble-headed arrow. 88 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
2Click and drag the scroll lock to the right of the column(s) you want to lock. All columns to the left of the lock remain stationary as you scroll through the tables columns. Viewing memo and BLOB fields Field types that can contain BLOBs (Binary Large Objects) include binary,memo, formatted memo, graphic, and OLE fields. Paradox stores memo,formatted memo, and graphic fields in a separate file (with the. MB extensionfor Paradox tables or a. DBT extension for d BASE tables), not in the tableitself. A Paradox table contains a portion of the field (you specify how muchwhen you create the field), plus a pointer to the. MB file. Paradox retrievesvalues from the. MB file when displaying memos and formatted memos. You can display the contents of selected memo, formatted memo or BLOB fields. To display a memo field Select the field and click View, Memo View or press F2. Paradox displays the entire contents of the field in a separate window. To close a memo window Click View, Memo View or press F2. To display a BLOB field Select the field and click View, Field View. To close a BLOB window Press F2. If you click on an individual memo or BLOB field, Paradox displays the contents of the field. However, the amount of text or graphic that you willactually be able to see depends on the size of the cells in the table. To display the complete text of all memo or BLOB fields in a table 1Right-click any record in the memo or graphic field, and select Properties. Tables 89 | 292806769-Paradox-9-Eng.pdf |
2Enable the Complete Display check box on the General page. Paradox displays the entire contents of all of the records in that field. However, the amount of text or graphic that you will actually be able toread depends on the size of the cells in the table. If you are working with a d BASE memo field, Paradox does not store anymemo data in the. DBF file. Therefore, when you disable the Complete Display option on d BASE memo fields, you do not see any of the memo. Instead, you see a marker indicating that the memo field contains data. When you click the field, Paradox displays the memo value from the. DBTfile. Viewing graphic data When you place a graphic in a table, you might not be able to see all of it. Youcan adjust the width and height of the cells in a table to view as much of thegraphic as you want. You can use Field View to display the entire graphic. To display a graphic Double-click a field. Paradox opens a window that displays only the graphic. If the graphic field on the form is the wrong size to display the graphic values of each record, you can use the Form Design Window to resize thefield object. You can also right-click the field, click Properties, and enablethe Best Fit check box on the Magnification page of the Properties dialogbox. Viewing quick objects You can use the Quick commands to view a tables data in a form, chart,crosstab, or report. To view table data in a quick form Click T ools, Quick Design, Quick Form. The Form Window opens on top of the open Table Window. From the Form Window, you can use the Table View command to return to the viewof the table, or you can click the name of the table in the Application Bar. 90 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
To view table data in a quick report Click T ools, Quick Design, Quick Report. To view table data in a quick chart Click T ools, Quick Design, Quick Chart. If you have not yet defined a preferred chart, the Define Chart dialog box opens. To view table data in a quick crosstab Click T ools, Quick Design, Quick Crosstab. If you have not yet defined a preferred crosstab, the Define Crosstab dialog box opens. When you view the tables data in an alternate format (like a form orreport) the property settings you have chosen in the Table Window do notappear. You can customize the form or report individually to get the lookyou want. Filtering tables Sometimes you dont want to see all the data in a table, but only a subset;filters provide a way for doing this. For example, in the CUSTOMER. DBtable, you might want to see only those customers in North Carolina and California. Filters let you display only those records whose field values meet the conditions you specify. display records based on any secondary index you have defined for thetable. Filters are similar to live queries. Once you filter table data, you can changeto Edit Mode and update information in the selected records. Most of theoperators that you can use in queries can also be used in filters. However,there are differences. For more information, see Filters and queriescompared on page 93. Filtering tables and fields When you filter a table, Paradox searches the table and displays recordscontaining values that meet the filter criteria you specify. For example, if youwant to view a list of customers with the name Robertson, you could type Tables 91 | 292806769-Paradox-9-Eng.pdf |
Robertson in the box beside the Name field. Paradox displays only the records for customers with the name Robertson. If you only wanted to viewthose customers with the name Robertson who lived in Nova Scotia, youcould also type Nova Scotia in the box beside the State/Prov. field. When specifying filter criteria, you can use the same keywords and symbols to specify filters that you can use in queries to specify selection conditions. Ifthe table is keyed or has secondary indexes, you can choose which index Paradox uses to sort the filtered records. You can choose to set a filter on acomposite index, but you must set ranges for multiple fields within the index. If you do choose a composite index, you have to adhere to specific rules. You can also filter a table to show only those records whose fields contain a range of values. For example, you can have Paradox display records 50 to 100in a table. Setting operators and conditions in filters Operators are symbols that represent an operation to be performed on avalue or values. Use can also use either/or conditions to filter the table data. Paradox evaluates operators in filters in a certain order. In expressionscontaining more than one operator, the operators are evaluated in the orderof precedence shown in the following table. Precedence Operator 1 ()[] 2 */% 3+-4 =< ><< =>> = 5 NOT 6 AND 7O R 8, (comma) 92 Paradox 9: Chapter 3 | 292806769-Paradox-9-Eng.pdf |
Any expression contained in parentheses is evaluated first, and inner levels of parentheses are evaluated before outer levels. When two or moreoperators of equal precedence are in a single expression, they areevaluated from left to right. You can set filters on forms or reports that have complex data models, themaster table in a data model, and detail tables if the tables are linked in amulti-value relationship. Filters cannot be applied to detail tables if thetables are linked in a single-value relationship. Filters and queries compared Filters are similar to queries. Most of the operators that work in a query canalso be used in a filter. However, there are differences in the kinds ofexpressions you can use: The @ wildcard operator is not allowed in a filter. The .. wildcard operator is not allowed in numeric or date fields in filters. Furthermore, this operator is allowed after the filter condition, butnot before it. For example, you can type view.. to filter for all values thatcontain the letters view (either upper or lowercase) followed by anyother letters. This filter returns the values View, Viewing, viewed,viewable, and so on. Using the .. wildcard is the only way to define acase-insensitive filter. Example elements are not used in filters. However, you can refer to onefield from another. Calculated fields are not used in filters. Furthermore, math operations canbe performed only on SQL tables. You cannot use memo, formatted memo, OLE, graphic, binary and bytesor BLOB fields in filters. Summary expressions (like COUNT>5) are not allowed in filters. In filters, parentheses can be used to nest conditions. The comma functions as the AND operator for top-level conditions suchas >200, <300. However, in a filter, the AND operator must be usedinstead of a comma to express more complicated conditions such as (>100AND <200) OR (>300 AND <500). The general rule is that you mustuse AND when the condition is within parentheses. The LIKE, AS, and SET operators are not used in filters, but the TODAYand BLANK operators are allowed. Any operators that change data do not function in filters. Tables 93 | 292806769-Paradox-9-Eng.pdf |