IBX for Lazarus User Guide

Total Page:16

File Type:pdf, Size:1020Kb

IBX for Lazarus User Guide 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
Recommended publications
  • Advanced Programming for the Java(TM) 2 Platform
    Advanced Programming for the Java(TM) 2 Platform Training Index Advanced Programming for the JavaTM 2 Platform By Calvin Austin and Monica Pawlan November 1999 [CONTENTS] [NEXT>>] [DOWNLOAD] Requires login As an experienced developer on the JavaTM platform, you undoubtedly know how fast moving and comprehensive the Early Access platform is. Its many application programming interfaces (APIs) Downloads provide a wealth of functionality for all aspects of application and system-level programming. Real-world developers never use one Bug Database or two APIs to solve a problem, but bring together key Submit a Bug functionality spanning a number of APIs. Knowing which APIs you View Database need, which parts of which APIs you need, and how the APIs work together to create the best solution can be a daunting task. Newsletters Back Issues To help you navigate the Java APIs and fast-track your project Subscribe development time, this book includes the design, development, test, and deployment phases for an enterprise-worthy auction Learning Centers application. While the example application does not cover every Articles possible programming scenario, it explores many common Bookshelf situations and the discussions leave you with a solid methodology Code Samples for designing and building your own solutions. New to Java Question of the Week This book is for developers with more than a beginning level of Quizzes understanding of writing programs in the Java programming Tech Tips language. The example application is written with the Java® 2 Tutorials platform APIs and explained in terms of functional hows and whys, so if you need help installing the Java platform, setting up your Forums environment, or getting your first application to work, you should first read a more introductory book such as Essentials of the Java Programming Language: A Hands-On Guide or The Java Tutorial.
    [Show full text]
  • Firebird 3.0 Developer's Guide
    Firebird 3.0 Developer’s Guide Denis Simonov Version 1.1, 27 June 2020 Preface Author of the written material and creator of the sample project on five development platforms, originally as a series of magazine articles: Denis Simonov Translation of original Russian text to English: Dmitry Borodin (MegaTranslations Ltd) Editor of the translated text: Helen Borrie Copyright © 2017-2020 Firebird Project and all contributing authors, under the Public Documentation License Version 1.0. Please refer to the License Notice in the Appendix This volume consists of chapters that walk through the development of a simple application for several language platforms, notably Delphi, Microsoft Entity Framework and MVC.NET (“Model-View-Controller”) for web applications, PHP and Java with the Spring framework. It is hoped that the work will grow in time, with contributions from authors using other stacks with Firebird. 1 Table of Contents Table of Contents 1. About the Firebird Developer’s Guide: for Firebird 3.0 . 6 1.1. About the Author . 6 1.1.1. Translation… . 6 1.1.2. … and More Translation . 6 1.2. Acknowledgments . 6 2. The examples.fdb Database . 8 2.1. Database Creation Script. 8 2.1.1. Database Aliases . 9 2.2. Creating the Database Objects. 10 2.2.1. Domains . 10 2.2.2. Primary Tables. 11 2.2.3. Secondary Tables . 13 2.2.4. Stored Procedures. 17 2.2.5. Roles and Privileges for Users . 25 2.3. Saving and Running the Script . 26 2.4. Loading Test Data . 27 3. Developing Firebird Applications in Delphi . 28 3.1.
    [Show full text]
  • Language Reference
    InterBase 6 Language Reference Borland/INPRISE 100 Enterprise Way, Scotts Valley, CA 95066 http://www.interbase.com Inprise/Borland may have patents and/or pending patent applications covering subject matter in this document. The furnishing of this document does not convey any license to these patents. Copyright 1999 Inprise/Borland. All rights reserved. All InterBase products are trademarks or registered trademarks of Inprise/Borland. All Borland products are trademarks or registered trademarks of Inprise/Borland. Other brand and product names are trademarks or registered trademarks of their respective holders. 1INT0055WW21004 6E1R0699 Table of Contents List of Tables.....................................xi CHAPTER 1 Using the InterBase Language Reference Who should use this book .....................13 Topics covered in this book .....................14 CHAPTER 2 SQL Statement and Function Reference Database object naming conventions ...............16 Statement list .............................17 Function list .............................18 Datatypes ...............................19 Error handling ............................20 Using statement and function definitions .............21 ALTER DATABASE ..........................22 ALTER DOMAIN ...........................23 ALTER EXCEPTION .........................25 ALTER INDEX ............................26 ALTER PROCEDURE .........................27 ALTER TABLE .............................28 ALTER TRIGGER ...........................35 AVG( ) .................................36 BASED
    [Show full text]
  • Development of Cross-Platform Problem-Oriented Systems Using Specifications of Database Applications ?
    Development of cross-platform problem-oriented systems using specifications of database applications ? Alexei Hmelnov1;2[0000−0002−0125−1130] and Evgeny Fereferov1;2[0000−0002−7316−444X] 1 Matrosov Institute for System Dynamics and Control Theory of Siberian Branch of Russian Academy of Sciences, 134 Lermontov st. Irkutsk, Russia [email protected] http://idstu.irk.ru 2 Institute of Mathematics, Economics and Informatics, Irkutsk State University, Gagarin Blvd. 20, Irkutsk, Russia Abstract. We consider the approach to development of AIS (automated information system) using declarative specifications of database applica- tions (SDA). The specifications of database applications contain all the information about database structure, which is required to build a typical AIS. The information is represented in its pure form, so the specifications are rather concise. The AIS'es are implemented using general algorithms, which are directed by the specifications. We have developed algorithms for such tasks as: user interface generation, query building, report gener- ation, GIS interaction. Using the specifications of database applications and the algorithms the software system GeoARM was implemented. The technology considered was well-tried by use of the system GeoARM for development of several dozens of true-life AIS for different purposes. In this article we'll describe the approach, that we use for creation of several versions of the GeoARM engine, which use different data access libraries, from the common source code base. The resulting versions of the GeoARM engine allow us to create problem-oriented AIS'es for all the supported platforms from the single SDA. Keywords: Specifications of database applications · automated infor- mation systems · rapid application development · data access technology · source code structuring.
    [Show full text]
  • An Overview of the Usage of Default Passwords (Extended Version)
    An Overview of the Usage of Default Passwords (extended version) Brandon Knieriem, Xiaolu Zhang, Philip Levine, Frank Breitinger, and Ibrahim Baggili Cyber Forensics Research and Education Group (UNHcFREG) Tagliatela College of Engineering University of New Haven, West Haven CT, 06516, United States fbknie1, [email protected],fXZhang, FBreitinger, [email protected] Summary. The recent Mirai botnet attack demonstrated the danger of using default passwords and showed it is still a major problem in 2017. In this study we investigated several common applications and their pass- word policies. Specifically, we analyzed if these applications: (1) have default passwords or (2) allow the user to set a weak password (i.e., they do not properly enforce a password policy). In order to understand the developer decision to implement default passwords, we raised this question on many online platforms or contacted professionals. Default passwords are still a significant problem. 61% of applications inspected initially used a default or blank password. When changing the password, 58% allowed a blank password, 35% allowed a weak password of 1 char- acter. Key words: Default passwords, applications, usage, security 1 Introduction Security is often disregarded or perceived as optional to the average consumer which can be a drawback. For instance, in October 2016 a large section of the In- ternet came under attack. This attack was perpetuated by approximately 100,000 Internet of Things (IoT) appliances, refrigerators, and microwaves which were compromised and formed the Mirai botnet. Targets of this attack included Twit- ter, reddit and The New York Times all of which shut down for hours.
    [Show full text]
  • Practical-Electronic
    EVERYDAY DECEMBER 1997 ELECTRON http://www.epemag.wimborne.co.uk £2.65 pa; cinE, GIANT PULL•OUT , • • «Mr am, - DettgeR:)t tam 4"- ACTIVE , •• MICROPHONE • A simple circuit to increase sensitivity P. rs .• • • - - MINI - •• - • L. tr. ORGAN 1:7 \ An unusual, inexpensive •P 7 " • e design t Ort 9. SA 11 '7 • SOUND rtr1 1 Alarm deterrent for P1R securit hts TEACH-IN 98 ........ Part 2: Capacitors and Inductors Index for Volume 26 THE Noil MAGAZINE FO. ELL TECHNOLOGY- r ra spedal ALTERNATIVE _.•ii 9 770262 361089 Feat and FUTURE TECHNOLOGIES ELECTRIC MAN PLANS, SHOCK PEOPLE WITH THE TOUCH OF YOUR HAND! E5/set Ref F/EMA1 PARABOLIC DISH MICROPHONE PLANS Listen to distant sounds and voices open windows sound sources in 'hard to ger or hostile premises Uses Satellite technology to gather distant sounds and focus them to our ultra sensitive electronics Plans also Sn0,11 xn optional wireless link system £8/set ref F/PM5 2 FOR 1 MULTIFUNCTIONAL HIGH FREQUENCY AND HIGH DC VOLTAGE, SOLID STATE TESLA COIL A AND VARIABLE 100,000 VDC OUTPUT GENERATOR PLANS Operates on 9-12v0c, many possible experiments £10 Ref WIND GENERATORS 380 WATT 1 14 metre rta cades aaroon riatri cades .a year warranty vdc output 24v version available control electronics included brushless neodymium cubic curve alternator only two moving pans maintenance free simple roof top installation start up speed 7mph max output (30mph) 380w £499 ref AIR1 PLANS PORTABLE X RAY MACHINE PLANS Easy to construct e e- plans on a simple and cheap way to build a home X-ray rnachinei Effective device X-ray sealed assemblies can beused for experimental purposes Not a toy or for minors' £6,/set Ref F/XP I TELEKINETIC ENHÀNCER PLANS Mystrfy and amaze your COLOUR CCTV friends by creating motion with no known apparent means or cause Uses no electnca Ior mechanical connections no special gimmicks yet produces positive motion and effect Excellent for science projects.
    [Show full text]
  • Powerkap - a Tool for Improving Energy Transparency for Software Developers on GNU/Linux (X86) Platforms
    Project Report Department of Computing Imperial College of Science, Technology and Medicine PowerKap - A tool for Improving Energy Transparency for Software Developers on GNU/Linux (x86) platforms Author: Supervisor: Krish De Souza Dr. Anandha Gopalan Submitted in partial fulfilment of the requirements for the M.Eng Computing 4 of Imperial College London Contents 1 Introduction 6 1.1 Motivation . .6 1.2 Objectives . .7 1.3 Achievements . .7 2 Background 9 2.1 The relationship between power and energy. .9 2.2 Power controls on x86 platforms . .9 2.3 Improving software for power efficiency . 10 2.3.1 Algorithm . 10 2.3.2 Multithreading . 10 2.3.3 Vectorisation . 10 2.3.4 Improper sleep loops . 12 2.3.5 OS Timers . 13 2.3.6 Context aware programming . 13 2.4 Current methods of monitoring energy. 14 2.4.1 Out of Band Energy Monitor . 14 2.4.2 In-Band Energy Monitor . 14 2.4.2.1 Powertop . 15 2.4.2.2 Turbostat . 16 2.5 Related Work . 16 2.5.1 ENTRA 2012-2015 . 16 2.5.1.1 Common Assertion Language . 16 2.5.1.2 Compiler Optimisation and Power Trade-offs . 18 2.5.1.3 Superoptimization . 18 2.5.1.4 Thermal trade-off . 20 2.5.2 eProf . 20 2.5.2.1 Asynchronous vs Synchronous . 20 2.5.2.2 Profiling implementation . 21 2.5.3 Energy Formal Definitions . 21 2.5.3.1 Java Based Energy Formalism . 22 2.5.3.2 Energy Application Model . 22 2.5.4 Impact of language, Compiler, Optimisations .
    [Show full text]
  • Ibsurgeon Interbase/Firebird Database Information Tool
    IBSurgeon Free Tools: User Guide © IBSurgeon, 2015, www.ib-aid.com IBSurgeon Free Tools: User Guide IBSurgeon Free Tools is a set of 3 tools for Firebird and InterBase administrators and developers, designed to facilitate several typical tasks: 1) measure response time of specific SQL query to find time when query runs slower than usual (“Response Checker”), 2) view how much data, indices, blobs, etc, are stored in your Firebird or InterBase database (“DBInfo”) 3) investigate Firebird log for errors and warnings, (“Log Viewer”) These tools are simple to use, below you can find their short overview and frequently asked questions. IBSurgeon Response Checker 1. Why do you need Response Checker? If you are trying to improve Firebird database performance, the first thing you need to define is criteria of performance optimization. And, Firebird database performance has such criteria: Average response time Maximum response time Response time should be measured with your real-world application and with your production database (or in test environment which simulates production close enough). There is no reason to measure average response time out of the scope of your real application, until you want some abstract «optimization» - or you are using test environment which is proven to be very close or even identical to your production database. Response time is what your end users will refer as «slow», «very slow» or «good enough» (end users never say that your software is «fast»). How to measure the average and maximum response times in real-world production environments running Firebird? For the basic response time measurement you can use IBSurgeon Response Checker.
    [Show full text]
  • Interbase 2020 Award Winning Multi-Device Secure Embeddable Database
    InterBase 2020 Award winning Multi-device Secure Embeddable Database © Embarcadero Technologies, Inc. Embarcadero® InterBase® 2020 is a full-featured, high-performance, encryptable, multiplatform and scalable relational database for developers who are looking to embed a low-cost, zero admin, lightweight secure database into their cross-platform connected applications. With InterBase 2020 you get powerful access control, data change management, disaster recovery and journaling, as well as support for popular database drivers for increased deployment flexibility. SMALL, ULTRAFAST, HIGHLY EFFICIENT, SECURE FireMonkey comes with hundreds of controls and components, covering all of the functionality you need. Responsive UIs can use the platform native style, or a single cross- platform look and feel, letting you rapidly create visually stunning designs perfect for your app that highlight your brand across platforms. CHANGE VIEWS™ Many frameworks mimic controls, but FireMonkey provides pixelperfect, platform-specific styling. Real, platform-native controls on Windows, iOS, and Android are also available. Cross-platform design does not have to mean generic: give your users a real, native look-andfeel. BUILT FOR MODERN CPU ARCHITECTURES Without FireMonkey, other developers recreate their UI for each platform, using a different language and separate IDE. With FireMonkey, you can build a single visually stunning responsive platform aware UI once in a single language and deploy it to every platform. Rapidly design your UI, directly connected to your code and easily make platform and device-specific changes to cut development and maintenance times in half or more! SPEED UP TO LOWER RISK DEVELOPMENT AND DEPLOYMENT A UI should be fast, responsive, and snappy, with awesome rendering quality and smooth animations.
    [Show full text]
  • Installing Python, Pygame, and Visual Studio Code
    Set up Python and Visual Studio Code: Macs Installing Python, Pygame, and Visual Studio Code To provide more flexibility, capability, and better tools for editing and debugging your code we are going to set up our computers with software for developing Python applications, Python games, and Web sites. Python 3 Installation (includes IDLE and Pip) • This will install the following software: o Python 3 Programming language and Interpreter o IDLE: an integrated development environment for Python o Pip: Python package installer • We want to use Python 3. Although Python is already installed on most Macs, it may be Python 2, or maybe an older version of Python 3. We need to leave Python 2 alone as your Mac may need it for some apps. We will install the latest version of Python 3. • Check your version of MacOS (Apple icon: About this Mac); the latest Python 3 requires version 10.9 or higher • Check your versions of Python: o Open terminal from the dock or command-space and type “Terminal” o In terminal type ‘python —version’ to see the version of Python 2 o In terminal type ‘python3 —version’ to see the version of Python3 • Go to https://www.python.org/downloads/ • The site detects whether you are on Windows or Mac and presents a download button for the latest version for your operating system. Click the “Download Python 3.8.1” button (or whatever is current version…) • Install by clicking Downloads from the dock or Finder, then click python-3-8-1- macosx-10.9.pkg to bring up the installer © Fox1 Valley Girls Coding Club Setup Python and Visual Studio Code: Windows • Follow the steps in the installer.
    [Show full text]
  • An Empirical Study of Local Database Usage in Android Applications
    2017 IEEE International Conference on Software Maintenance and Evolution An Empirical Study of Local Database Usage in Android Applications Yingjun Lyu∗, Jiaping Gui∗, Mian Wan, William G.J. Halfond Department of Computer Science University of Southern California Email: {yingjunl, jgui, mianwan, halfond}@usc.edu For example, both local and remote databases can be attacked Abstract—Local databases have become an important compo- using SQL injection (SQLI) attacks, if developers do not nent within mobile applications. Developers use local databases follow best practices for validating user input and interacting to provide mobile users with a responsive and secure service for data storage and access. However, using local databases comes with the databases [4], [5], [6]. However, some of the problems with a cost. Studies have shown that they are one of the most are unique to the context in which mobile devices operate. energy consuming components on mobile devices and misuse Many database operations, such as transactions, require file of their APIs can lead to performance and security problems. locking and rollback capability. This means that the use of In this paper, we report the results of a large scale empirical such operations is resource intensive, requiring CPU time, study on 1,000 top ranked apps from the Google Play app store. Our results present a detailed look into the practices, costs, memory, and I/O access. Unsurprisingly, the use of these and potential problems associated with local database usage in operations means that the use of local databases also comes deployed apps. We distill our findings into actionable guidance with a high energy cost; recent studies have found that they are for developers and motivate future areas of research related to among the top two or three energy consumers of all services on techniques to support mobile app developers.
    [Show full text]
  • Firebird 3 Quick Start Guide
    Firebird 3 Quick Start Guide IBPhoenix Editors, Firebird Project Members Version 5.4, 27 June 2020 Table of Contents Table of Contents 1. About this guide . 3 2. The Firebird licenses . 4 3. Installing Firebird . 5 3.1. Installation kits . 5 3.2. Installing the Firebird server. 5 3.2.1. Before installation. 5 3.2.2. Installation drives . 6 3.2.3. Installation script or program . 6 3.2.4. Server modes . 6 3.2.5. Installing on Windows. 7 3.2.6. Installing on Linux and other Unix-like platforms . 8 3.3. Installing multiple servers . 8 3.4. Testing your installation . 9 3.4.1. Pinging the server . 9 3.4.2. Making sure that the Firebird server is running. 9 3.5. Performing a client-only install . 12 3.5.1. Windows . 12 3.5.2. Linux and some other Posix clients . 12 4. Default disk locations . 14 4.1. Linux . 14 4.2. Windows. 14 5. Server configuration and management . 17 5.1. User management . 17 5.1.1. Changing the SYSDBA password . 17 5.1.2. Adding Firebird user accounts . 18 5.1.3. The security database . 19 5.1.4. Appointing co-administrators . 19 5.2. Security . 21 5.3. Administration tools . 26 6. Working with databases . 27 6.1. Connection strings . 27 6.1.1. Local connection strings . 27 6.1.2. TCP/IP connection strings . 28 6.1.3. NetBEUI connection strings . 29 6.1.4. URL-style connection strings . 30 6.1.5. Third-party programs . 31 6.2. Connecting to an existing database .
    [Show full text]