Caché Core: Server-Side Programming

Total Page:16

File Type:pdf, Size:1020Kb

Caché Core: Server-Side Programming Caché Core: Server-Side Programming CACHÉ CORE : SERVER – SIDE PROGRAMMING COPYRIGHT NOTICE Copyright © InterSystems Corporation 1997-2002 All rights reserved NOTICE PROPRIETARY — CONFIDENTIAL This document contains trade secret and confidential information which is the property of InterSystems Corporation, One Memorial Drive, Cambridge, MA 02142, or its affiliates, and is furnished for the sole purpose of the operation and maintenance of the products of InterSystems Corporation. No part of this publication is to be used for any other purpose, and this publication is not to be reproduced, copied, disclosed, transmitted, stored in a retrieval system or translated into any human or computer language, in any form, by any means, in whole or in part, without the express prior written consent of InterSystems Corporation. The copying, use and disposition of this document and the software programs described herein is prohibited except to the limited extent set forth in the standard software license agreement(s) of InterSystems Corporation covering such programs and related documentation. InterSystems Corporation makes no representations and warranties concerning such software programs other than those set forth in such standard software license agreement(s). In addition, the liability of InterSystems Corporation for any losses or damages relating to or arising out of the use of such software programs is limited in the manner set forth in such standard software license agreement(s). THE FOREGOING IS A GENERAL SUMMARY OF THE RESTRICTIONS AND LIMITATIONS IMPOSED BY INTERSYSTEMS CORPORATION ON THE USE OF, AND LIABILITY ARISING FROM, ITS COMPUTER SOFTWARE. FOR COMPLETE INFORMATION REFERENCE SHOULD BE MADE TO THE STANDARD SOFTWARE LICENSE AGREEMENT(S) OF INTERSYSTEMS CORPORATION, COPIES OF WHICH WILL BE MADE AVAILABLE UPON REQUEST. InterSystems Corporation disclaims responsibility for errors which may appear in this document, and it reserves the right, in its sole discretion and without notice, to make substitutions and modifications in the products and practices described in this document. InterSystems™, InterSystems Caché™, DCP™, DTM™, DSM™, and DASL™ are trademarks of InterSystems Corporation. DSM DDP™, VAX™, VMS™, OpenVMS™, and DEC™ are trademarks of Digital Equipment Corp. Microsoft®, MS-DOS®, Microsoft Access®, and, Excel® are registered trademarks and Windows™, Windows NT, Visual Basic™, and Visual C++™ are trademarks of Microsoft Corporation. ORACLE® is a registered trademark of Oracle Corporation. For questions about any InterSystems products, contact our Worldwide Response Center: Phone: US: +1 617 621-0700 Europe: +44 (0) 1753 830-077 Fax: US: +1 617 374-9391 Europe: +44 (0) 1753 861-311 Internet: [email protected] FTP Site: ftp.intersys.com World Wide Web: www.intersys.com Documentation: cache.intersys.com/contactus/doc_action_form.html European BBS: +44 (0) 1753-853-534 Intersystems Caché Core: Server-Side Programming – Treinamento INDEX Module 1: Overview What is Caché?....................................................................................... 10 Completely Connected ............................................................................ 10 The Toolset ........................................................................................... 11 The Caché Cube ..................................................................................... 11 The Caché Program Group ....................................................................... 12 Caché Object Architect ............................................................................ 12 Caché Studio ......................................................................................... 13 Caché SQL Manager ................................................................................ 13 Caché Explorer ....................................................................................... 14 Caché Terminal ...................................................................................... 14 Caché Control Panel ................................................................................ 15 Caché Configuration Manager ................................................................... 15 Remote System Access ........................................................................... 16 The System Viewer ................................................................................. 16 Module 2: Getting Started Basic Structure ...................................................................................... 18 Databases ............................................................................................. 18 Routines ............................................................................................... 18 Globals ................................................................................................. 19 Namespaces .......................................................................................... 19 Changing Namespaces ............................................................................ 19 Creating a Namespace ............................................................................ 20 Connections ...........................................................................................20 ODBC Data Source ................................................................................. 21 Bi-Directional ODBC ................................................................................ 21 CSP Application ...................................................................................... 22 Management ..........................................................................................22 Error Handling ....................................................................................... 22 Exercises ...............................................................................................24 Module 3: Tour Example Application ............................................................................... 27 Classes and Objects ................................................................................ 27 The MenuItem Class ............................................................................... 27 The Order Class ..................................................................................... 28 Packages ............................................................................................... 28 Creating a Class ..................................................................................... 28 Editing a Class Definition ......................................................................... 29 Properties ............................................................................................. 29 The Name Property ................................................................................. 30 The Price Property .................................................................................. 30 The Quantity Property ............................................................................. 31 Simple Property Parameters .....................................................................31 More Property Parameters ....................................................................... 31 Parameters ............................................................................................ 32 Intersystems 3 Caché Core: Server-Side Programming – Treinamento Methods ................................................................................................ 32 Queries ................................................................................................. 33 Saving and Compiling ............................................................................. 33 Generated Routines and Globals ............................................................... 33 Compile Options ..................................................................................... 34 Class Definition Language ........................................................................ 34 Export/Import of CDL ..............................................................................34 Creating The User Interface ..................................................................... 35 Form Wizards ........................................................................................ 35 Using ObjectScript .................................................................................. 35 Examples of Using Objects ....................................................................... 36 Syntax Conventions ................................................................................ 36 Concurrency .......................................................................................... 36 Success or Failure .................................................................................. 37 OREFs and IDs ....................................................................................... 37 ID ........................................................................................................ 37 OIDs .....................................................................................................37 ObjectScript: Commands ......................................................................... 38 ObjectScript: Objects .............................................................................. 38 ObjectScript: Pattern Examples ................................................................ 38 Exercises ...............................................................................................40
Recommended publications
  • DM2 Week 15 PHP Mysql.Pptx
    PHP and MySQL ATLS 3020 Digital Media 2 Aileen Pierce Web Database Applications PHP Working with Databases ¤ PHP scripts can easily access many different databases ¤ MySQL ¤ Oracle ¤ Informix ¤ mSQL ¤ ODBC ¤ PHP provides functions that begin with mysqli_ to access MySQL databases. PHP Communicating with MySQL ¤ PHP works with MySQL using the following process: 1. Connect to MySQL 2. Prepare a SQL statement 3. Execute the statement and save the result 4. Extract the data from the result 5. Prepare the resulting page Connecting PHP to MySQL ¤ Connect to MySQL $dbc= mysqli_connect(“hostname”, “username”, “password”, “db_name”); ¤ Hostname is the URL of the MySQL server. ¤ Use localhost if PHP and MySQL servers are on the same machine (as on redwood). ¤ Username and password are for MySQL. ¤ Database name is identikey+db (apiercedb) ¤ Must assign the connection to a variable to use throughout your script. Connecting PHP to MySQL ¤ mysqli_connect_error() returns an error if the connection is not made. $dbc= mysqli_connect(“hostname”, “username”, “password”, “db_name”) OR die ('Could not connect to MySQL: ' . mysqli_connect_error() ); ¤ die() will cause the script to exit ¤ Prints out an error message SQL Statements ¤ The mysqli_query() function allows you to pass any SQL command to the database and the result is returned. $result= mysqli_query(“db connection”, “SQL”); ¤ Use phpmyadmin to help you create the SQL statement $result = mysqli_query($dbc, “SELECT * from drink” ); SQL Statements ¤ Or assign the SQL statement to a variable $sql = “INSERT INTO drink (name, caf, whip, calories) VALUES ('cappuccino', 'yes', 'no', '90')”; ¤ Then pass the SQL statement to the database connection $result = mysqli_query($dbc, $sql); ¤ You must assign the result to a variable.
    [Show full text]
  • Oracle® Transparent Gateway for Microsoft SQL Server Administrator’S Guide 10G Release 2 (10.2) for Microsoft Windows (32-Bit) B14270-01
    Oracle® Transparent Gateway for Microsoft SQL Server Administrator’s Guide 10g Release 2 (10.2) for Microsoft Windows (32-bit) B14270-01 June 2005 Oracle Transparent Gateway for Microsoft SQL Server Administrator’s Guide, 10g Release 2 (10.2) for Microsoft Windows (32-bit) B14270-01 Copyright © 2002, 2005, Oracle. All rights reserved. Primary Author: Amitai Sela Contributing Author: Laurel Hale, Cynthia Kibbe, Kishan Peyetti, Juan Ahues-Vasquez, Govind Lakkoju Contributor: Orit Curiel, Jacco Draaijer, Vira Goorah The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited. The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. This document is not warranted to be error-free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose. If the Programs are delivered to the United States Government or anyone licensing or using the Programs on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S.
    [Show full text]
  • A Relational Multi-Schema Data Model and Query Language for Full Support of Schema Versioning?
    A Relational Multi-Schema Data Model and Query Language for Full Support of Schema Versioning? Fabio Grandi CSITE-CNR and DEIS, Alma Mater Studiorum – Universita` di Bologna Viale Risorgimento 2, 40136 Bologna, Italy, email: [email protected] Abstract. Schema versioning is a powerful tool not only to ensure reuse of data and continued support of legacy applications after schema changes, but also to add a new degree of freedom to database designers, application developers and final users. In fact, different schema versions actually allow one to represent, in full relief, different points of view over the modelled application reality. The key to such an improvement is the adop- tion of a multi-pool implementation solution, rather that the single-pool solution usually endorsed by other authors. In this paper, we show some of the application potentialities of the multi-pool approach in schema versioning through a concrete example, introduce a simple but comprehensive logical storage model for the mapping of a multi-schema database onto a standard relational database and use such a model to define and exem- plify a multi-schema query language, called MSQL, which allows one to exploit the full potentialities of schema versioning under the multi-pool approach. 1 Introduction However careful and accurate the initial design may have been, a database schema is likely to undergo changes and revisions after implementation. In order to avoid the loss of data after schema changes, schema evolution has been introduced to provide (partial) automatic recov- ery of the extant data by adapting them to the new schema.
    [Show full text]
  • ASA- R-20222 / / ;' P Q DEPARTMENT of COMPUTER SCIENCE COLLEGE of SCIENCES OLD DOMINION UNIVERSITY NORFOLK, VIRGINIA 23529
    INASA-_R-20222 / / ;' p Q DEPARTMENT OF COMPUTER SCIENCE COLLEGE OF SCIENCES OLD DOMINION UNIVERSITY NORFOLK, VIRGINIA 23529 INFORMATION TECHNOLOGY: A TOOL TO CUT HEALTH L) CARE COSTS © By Dr. Ravi Mukkamala, Principal Investigator Final Report For the period ended August 31, 1996 Prepared for National Aeronautics and Space Administration Langley Research Center Hampton, VA 23681-0001 Under Research Grant Number NAG-l-1690 Wayne H. Bryant, Technical Monitor O Submitted by the Old Dominion University Research Foundation P.O. Box 6369 Norfolk, VA 23508-0369 September 1996 DEPARTMENT OF COMPUTER SCIENCE COLLEGE OF SCIENCES OLD DOMINION UNIVERSITY NORFOLK, VIRGINIA 23529 INFORMATION TECHNOLOGY: A TOOL TO CUT HEALTH CARE COSTS By Dr. Ravi Mukkamala, Principal Investigator Final Report For the period ended August 31, 1996 Prepared for National Aeronautics and Space Administration Langley Research Center Hampton, VA 23681-0001 Under Research Grant Number NAG-l-1690 Wayne H. Bryant, Technical Monitor Submitted by the Old Dominion University Research Foundation P.O. Box 6369 Norfolk, VA 23508-0369 September 1996 Information Technology: A Tool to Cut Health Care Costs Final Report (NAG-l-1690) R. Mukkamala K.J. Maly C.M. Overstreet E.C. Foudriat Department of Computer Science Old Dominion University Norfolk, Virginia 23529. Abstract We report on the work done as part of the NASA LaRC grant NAG-l-1690. As part of this effort, we have designed and built a prototype for an integrated medical record system. MRS (Medical Record System) is written in Tcl/Tk. While the initial version of the prototype had patient information hard coded into the system, the later versions used an INGRES database for storing patient information.
    [Show full text]
  • 01 Front.Pdf
    Copyright is owned by the Author of the thesis. Permission is given for a copy to be downloaded by an individual for the purpose of research and private study only. The thesis may not be reproduced elsewhere without the permission of the Author. Developing a Courseware Database for The AudioGraph A Thesis presented in partial fulfilment of the requirements for the degree of Master m Computer Science At Massey University, Palmerston North, New Zealand. Jun Pan 2000 Dedication To memory of my auntie, Jin Yuan Pan To my eldest sister, Feng Lan Pan To my lovely daughter, Shu Ke Acknowledgments I would like to take this opportunity to thank the people who have helped to make my thesis a reality. First, I would like to thank my supervisor, Chris Jesshope, for providing valuable guidance and suggestions along the way. I would also like to thank Elizabeth Kemp, who was very careful of checking my thesis and giving suggestions. Second, I would like to give my thanks to Zhenzi Zhang, my colleague and my best friend, for her ability to endure my demands for improvement. Without her continued help, my thesis wouldn't be handed in on time. Thanks to my friend, Margaret Rollinson for checking my English grammar and for making this a smooth and understanding process. Thanks to my colleagues, Simon Zhang, Robin Luo and Y ongqiu Liu. They gave me valuable feedback for my coding test. Finally I give my thanks to my lovely daughter, Shu for her support and understanding during thesis writing. Giving up mum time has not been easy for her.
    [Show full text]
  • SQL Inventory Manager Home
    SQL Inventory Manager 2.4 – SQL Inventory Manager Home SQL Inventory Manager Home SQL Inventory Manager Home – 1 SQL Inventory Manager 2.4 – SQL Inventory Manager Home Discover, track, and manage your SQL Server inventory using IDERA SQL Inventory Manager • View your SQL Server inventory - know what you have where & who owns it • Auto-discover any new servers installed, to better manage server sprawl • Get alerts when a server goes down, or space is running low • Set tags to better organize servers and databases across the enterprise • Quickly deploy and access from anywhere via web-based and agentless UI IDERA SQL Inventory Manager lets you discover and visualize your SQL Server environment. Learn more > > IDERA Website Products Purchase Support Community About Us Resources Legal Discover, track, and manage your SQL Server inventory using IDERA SQL Inventory Manager – 2 SQL Inventory Manager 2.4 – SQL Inventory Manager Home Release notes IDERA SQL Inventory Manager provides fundamental information on your SQL Servers to help you keep track of and manage your database environment without having to be an expert in Microsoft SQL Server. It gives a broad enterprise-wide view of all your SQL Servers through automated discovery as well as simple, actionable information about the state of your environment. View core information such as how many databases exist, whether they are being backed up, get access to options like availability monitoring, and notification emails so you can take action as needed. IDERA strives to ensure our products provide quality solutions for your SQL Server needs. If you need further assistance with any issue, please contact Technical Support.
    [Show full text]
  • Msql: SQL Extensions and Database Mechanisms for Managing Biosequences
    mSQL: SQL Extensions and Database Mechanisms for Managing Biosequences Willard S. Willard Wenguo Liu Shulin Ni Rui Mao Weijia Xu Daniel P. Miranker Computer Sciences Department University of Texas at Austin {willard, liu, shulin, rmao, xwj, miranker}@cs.utexas.edu Abstract 1. Introduction mSQL is an extended SQL query language targeting the expanding area of biological As biological data proliferates, the creation of new sequence databases and sequence analysis computational biological protocols is also proliferating. methods. The core aspects include first-class data The focus of attention within sequence analysis is moving types for biological sequences, operators based beyond the identification of proteins and their homology. on an extended-relational algebra, an ability to New foci include identification of regulatory elements define logical views of sequences as overlapping such as transcription binding sites and RNA coding genes q-grams and the materialization of those views as [2,22,23,26,32]. Some investigational techniques, such as metric-space indices. phylogenetic footprinting, often require the comparison of We first describe the current trends in biological the entire contents of two or more genomes. While its analysis that necessitate a more intuitive, domain of applicability is often stretched, BLAST targets flexible, and optimizable approach than current protein sequence homology and its execution comprises a methodologies. We present our solution, mSQL, linear scan of the database. In many cases BLAST is and describe its formal definition with respect to either not equipped to discern the features of interest, or it both physical and logical operators, detailing the is computationally infeasible to use BLAST.
    [Show full text]
  • Sqlways Documentation
    SQLWays Documentation Database and Application Migration Software Version 6.0 Ispirer Systems Ltd. Copyright © 1999-2015 Ispirer Systems Ltd. Ispirer and SQLWays are trademarks of Ispirer Systems Ltd. All other product names may be trademarks of the respective companies. All rights reserved. www.ispirer.com Contents Contents Conventions Used in This Manual Introduction Key Benefits ...................................................................... 13 Supported Databases......................................................... 14 Database Object and Features Support.............................. 16 IBM DB2 for Linux, Unix and Windows Support ............................. 17 IBM DB2 for z/OS and OS/390 Support ....................................... 19 IBM DB2 for iSeries and AS/400 Support ..................................... 21 Oracle Support ......................................................................... 23 Microsoft SQL Server Support .................................................... 25 MySQL Support ........................................................................ 27 PostgreSQL Support .................................................................. 29 Sybase Adaptive Server Enterprise Support .................................. 31 Pervasive.SQL Support .............................................................. 32 What’s New....................................................................... 33 Getting Started Preparing for Installation .................................................. 35 Installing
    [Show full text]
  • PHP Mysql Training?
    follow us Tel +441273 6222 72 [email protected] What is PHP MySQL Training? PHP is a scripting language written by and for web developers: it is quick to learn, easy to deploy and provides many of the programming tools a web developer could wish for ... all in a single, free, cross-platform, open-source package. What areas does the PHP MySQL training course cover? After two full days of intensive PHP MSQL training course, you will leave with a comprehensive understanding of premier PHP use and features, including MySQL, Object Orientated PHP Programming, sessions, security and performance. Get up to speed with tried-and-true programming strategies, for both Web and local development. Gain valuable tips and tricks for using the PHP language and syntax. See how to integrate MySQL in Windows, PHP's most popular development platform. Learn how to streamline PHP's interaction with MySQL, SQL, and relational databases in general. See how Object Orientated Programming with PHP can allow for code reuse, modularity and rapid development. Watch how PHP's sessions can be used to quickly build full-scale web applications. Glimpse at PHP's inner workings to understand how to build secure and performance conscience programs, including proper use of references, global variables and scope. Begin to see how PHP Technology can be leveraged to rapidly create and maintain large enterprise web applications. Call us on +44 (0)1273 622272 to book or further discuss your training needs. Who is PHP MySQL training intended for? Before attending our PHP MySQL training course you should be familiar with hand coding HTML and web form design, SQL and Relational database theory & fundamental programming techniques, style and logic.
    [Show full text]
  • An Evaluation of Programming Assistance Tools to Support the Learning of IT Programming: a Case Study in South African Secondary Schools
    An Evaluation of Programming Assistance Tools to Support the Learning of IT Programming: A Case Study in South African Secondary Schools by Melisa Koorsse Submitted in fulfilment of the requirements for the degree of Philosophiae Doctor in Computer Science at the Nelson Mandela Metropolitan University Promoter: Prof C.B. Cilliers Co-Promoter: Prof. A.P. Calitz January 2012 Declaration I, Melisa Koorsse (199201064), hereby declare that the thesis for my qualification to be awarded is my own work and that it has not previously been submitted for assessment or completion of any postgraduate qualification to another University or for another quali- fication. M. Koorsse Copyright © 2012 Nelson Mandela Metropolitan University All rights reserved. ii Summary Worldwide, there is a decline in interest in the computer science profession and in the subject at secondary school level. Novice programmers struggle to understand introduc- tory programming concepts and this difficulty of learning to program is contributing to the lack of interest in the field of computer science. Information Technology (IT) learners in South African secondary schools are novice programmers, introduced to introductory programming concepts in the subject which also includes topics on hardware and system software, e-communication, social and ethical issues, spreadsheets and databases. The difficulties faced by IT learners are worsened by the lack of suitably qualified teachers, a saturated learning programme that allocates very little time to the understanding of complex programming concepts and limited class time where practical examples can be implemented with the support of the IT teacher. This research proposes that IT learners could be supported by a programming assistance tool (PAT).
    [Show full text]
  • Dbms and Web Delivery
    DBMs and Web Delivery (A more complete version of this text is available at http://www.lib.ncsu.edu/staff/morgan/dbms-and-web-delivery/.) This text, DBMs and Web Delivery, compares and number, email address, URL of home page, contrasts three database applications and describes department, etc. Furthermore, this specific display how their content can be made available on the Web. could be a form itself allowing the authorized user to edit the information as necessary. Filemaker Microsoft Access Filemaker is a cross-platform, desktop, relational database application. The creation of tables is Microsoft Access is the most popular relational simplistic and the process of creating relationships database application here because it is a Microsoft between them relatively straight forward. If you move or product and it comes bundled with Microsoft's Office rename the flat tables, then relations will break causing suite. Access is more than capable of handling many you to recreate the relations. of your database needs and combined with Microsoft's free Personal Web Server and a knowledge of the To say Filemaker is a cross-platform application is a Active Server Pages scripting language you can make tiny misnomer. Filemaker is supported under various the content of your Access database(s) available on the Windows platforms (95, 98, and NT) as well as just Web. about any Macintosh. There is a single difference between Windows and Macintosh versions, and that Access has a number of very nice features when difference is AppleScript. It allows you to write compared to Filemaker or MySQL. For one, multiple programs querying Filemaker data and report on it's tables of Access databases are saved in a single file.
    [Show full text]
  • Microsoft SQL Server on SUSE Linux Enterprise Server — Getting Started
    SUSE Best Practices Microsoft SQL Server on SUSE Linux Enterprise Server — Getting Started SUSE Linux Enterprise Server 12 SP3 – SP5, Microsoft SQL Server 2019 James Yang, SUSE 1 Microsoft SQL Server on SUSE Linux Enterprise Server — Getting Started This guide helps users install and congure a basic Microsoft SQL Server deployment on SUSE Linux Enterprise Server. Disclaimer: The articles and individual documents published in the SUSE Best Practices series were contributed voluntarily by SUSE employees and by third parties. If not stated otherwise inside the document, the articles are intended only to be one example of how a particular action could be taken. Also, SUSE cannot verify either that the actions described in the articles do what they claim to do or that they do not have unintended consequences. All information found in this article has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Therefore, we need to specically state that neither SUSE LLC, its aliates, the authors, nor the translators may be held liable for possible errors or the consequences thereof. Publication Date: 2021-03-16 Contents 1 Motivation 3 2 Installation 4 3 Configuration 5 4 Tools 7 5 Administration 8 6 Summary 12 7 Appendix 12 8 Legal notice 13 9 GNU Free Documentation License 15 2 Microsoft SQL Server on SUSE Linux Enterprise Server — Getting Started 1 Motivation 1.1 Background Since Microsoft released SQL Server for Linux in 2017 1, the feature gap 2 for SQL Server between Windows and Linux has been closing quickly with each update. Aside from some niche features 3, it’s now extremely viable to consider running SQL Server workloads on Linux, with the 2019 release 4.
    [Show full text]