IBX for Lazarus User Guide
Total Page:16
File Type:pdf, Size:1020Kb
MWA Software IBX for Lazarus User Guide Issue 1.6, 14 April 2018 McCallum Whyman Associates Ltd EMail: info@ mccallumwhyman.com, http://www.mccallumwhyman.com Registered in England Registration No. 2624328 COPYRIGHT The copyright in this work is vested in McCallum Whyman Associates Ltd. The contents of the document may be freely distributed and copied provided the source is correctly identified as this document. © Copyright McCallum Whyman Associates Ltd (2016) trading as MWA Software. Disclaimer Although our best efforts have been made to ensure that the information contained within is up-to-date and accurate, no warranty whatsover is offered as to its correctness and readers are responsible for ensuring through testing or any other appropriate procedures that the information provided is correct and appropriate for the purpose for which it is used. ii CONTENTS Page 1 INTRODUCTION................................................................................................................................................1 1.1 REFERENCES............................................................................................................................................................2 1.2 CHANGE HISTORY....................................................................................................................................................2 1.2.1 Version 1.1....................................................................................................................................................2 1.2.2 Version 1.2....................................................................................................................................................2 1.2.3 Version 1.3....................................................................................................................................................2 1.2.4 Version 1.4....................................................................................................................................................3 1.2.5 Version 1.5....................................................................................................................................................3 1.2.6 Version 1.6....................................................................................................................................................4 2 INSTALLATION AND PREPARATION FOR USE.........................................................................................5 2.1 MINIMUM REQUIREMENTS.........................................................................................................................................5 2.2 INSTALLATION UNDER LAZARUS..................................................................................................................................5 2.3 CONSOLE MODE IBX..............................................................................................................................................6 2.4 MULTI-THREADING SUPPORT......................................................................................................................................6 2.5 INSTALLING FIREBIRD...............................................................................................................................................7 2.6 UPGRADING FROM IBX 1.X......................................................................................................................................7 2.7 NEW FEATURES WITH IBX2.....................................................................................................................................9 2.8 UNINSTALLING IBX.................................................................................................................................................9 3 AN INTRODUCTION TO DATABASES, SQL AND FIREBIRD...................................................................11 3.1 WHAT IS A DATABASE?.............................................................................................................................................11 3.1.1 In the Beginning...........................................................................................................................................11 3.1.2 The Arrival of Random Access Storage........................................................................................................12 3.1.3 Indexes.........................................................................................................................................................12 3.1.4 Multiple Indexes and Datasets.....................................................................................................................12 3.1.5 The Need for Middleware.............................................................................................................................13 3.1.6 Enter the RDBMS.........................................................................................................................................13 3.1.7 Multi-user Access.........................................................................................................................................13 3.2 THE STRUCTURED QUERY LANGUAGE (SQL).............................................................................................................14 3.3 THE FIREBIRD RDBMS..........................................................................................................................................15 3.4 AND THEN THERE WAS IBX.......................................................................................................................................16 4 IBX OVERVIEW.................................................................................................................................................19 4.1 CONVERSION FROM DELPHI IBX...............................................................................................................................19 4.2 IBX IN CONTEXT....................................................................................................................................................20 4.3 IBX LAZARUS PACKAGES.........................................................................................................................................20 4.4 COMPONENT OVERVIEW............................................................................................................................................21 4.5 DATABASES AND TRANSACTIONS................................................................................................................................24 4.6 DATASETS...............................................................................................................................................................25 4.6.1 Datasets and Transactions...........................................................................................................................25 4.6.2 Single Table Datasets...................................................................................................................................26 4.6.3 SQL Defined Datasets..................................................................................................................................26 4.7 EXAMPLES..............................................................................................................................................................27 5 THE DATABASE ACCESS COMPONENTS...................................................................................................29 5.1 TIBDATABASE........................................................................................................................................................29 5.1.1 Highlighted Properties.................................................................................................................................29 5.1.2 DatabaseName Macros................................................................................................................................31 5.1.3 Parameter Keywords....................................................................................................................................31 5.1.4 Highlighted Events.......................................................................................................................................31 5.1.5 Connecting to a Database............................................................................................................................32 5.1.6 Database Disconnect...................................................................................................................................33 5.1.7 Reconnecting................................................................................................................................................33 5.1.8 Creating a new Database.............................................................................................................................33 5.1.9 Dropping a Database...................................................................................................................................33 5.1.10 Using the Attachment Interface..................................................................................................................33 5.1.11 Using the AllowStreamConnected Property...............................................................................................34 5.2 TIBTRANSACTION...................................................................................................................................................34