Beschreibung
This book is intended to explain how to use the program packet Gupta SQLWindows to develop databases which are executable under Windows 32-bit operating systems. It is an introductory book of programming and as such, targeted toward beginners; due to its structuring and many examples, however, it may also prove helpful to advanced programmers.
Great emphasis has been laid upon presenting examples individually and completely. In this way it is hoped that the examples can easily be tested in the reader’s own, smaller programs. It is, however, impossible to represent every functionality. Selection of topics is inherently subjective; nonetheless, the chosen selection should serve as a motivating start to programming database applications with this powerful tool.
This edition details Gupta Team Developer versions 2.1 and 3.0 (beta 4 at time of printing). The functionalities which were not or differently implemented in earlier releases (1.x) are indicated on their respective pages in this book.
Because the basic functionality of Gupta Team Developer has not changed significantly since the last version, the introductory capitals 1 and 2, with exception of the new section 1.2.3 An Excursion in Object Oriented Programming, have been included unchanged from earlier editions.
New additions are sections on the Component Development Kit, tooltip pushbuttons, and WebDeveloper, which were also already available in CTD 1.x.
Further topics include OLE DB database integration, ActiveX integration – with particular attention to Excel and Word –,COM server and client creation, and the Web XML table, which are available from Gupta beginning with Team Developer version 2.x. Especially these functionalities enable development of modern, performant applications with SQLWindows.
The examples of configuration given in this book can be downloaded from the publisher’s homepage ([…]) under “Download”.
We would like to thank the Gupta Company, with special thanks to Martin Teetz. Special thanks to EvaSara Toullier who translated into English.
Remagen and Lauf, January 2003
Dr. Norbert Kessel
Dr. Veit Wadewitz
***
Chapter 1 Introduction 1
Chapter 1.1 Tips for Programming Database Applications 8
Chapter 1.2 An Introduction to Gupta Team Developer 17
Chapter 1.2.1 Standard Practice with Gupta Team Developer 17
Chapter 1.2.1.1 The SQLWindows Startup Screen 17
Chapter 1.2.1.2 Gupta Application Structure 29
Chapter 1.2.1.3 Four Examples 32
Chapter 1.2.1.3.1 Variations on a Theme of “hello world” 32
Chapter 1.2.1.3.2 Displaying Data in a Table 35
Chapter 1.2.1.3.3 Curves: Business Images 42
Chapter 1.2.1.3.4 Creating New Classes 43
Chapter 1.2.2 SAL, the SQLWindows Program Language 47
Chapter 1.2.2.1 Data Types 47
Chapter 1.2.2.2 Variables 48
Chapter 1.2.2.3 Constants 57
Chapter 1.2.2.4 Statements 59
Chapter 1.2.2.4.1 Set 59
Chapter 1.2.2.4.2 If, Else, Else IF 60
Chapter 1.2.2.4.3 Select Case 61
Chapter 1.2.2.4.4 Call 62
Chapter 1.2.2.4.5 On 63
Chapter 1.2.2.4.6 While, Loop 64
Chapter 1.2.2.4.7 Return 65
Chapter 1.2.2.5 Functions 69
Chapter 1.2.2.6 Operators 71
Chapter 1.2.2.7 Comments 72
Chapter 1.2.3 Excursus in Object Oriented Programming 73
Chapter 1.2.4 Objects and their Uses 75
Chapter 1.2.4.1 Default Class Objects 75
Chapter 1.2.4.1.1 Top Level Objects 76
Chapter 1.2.4.1.1.1 Form Windows 78
Chapter 1.2.4.1.1.2 MDI Window 85
Chapter 1.2.4.1.1.3 Dialog Box 87
Chapter 1.2.4.1.1.4 Table Window 88
Chapter 1.2.3.1.2 Child Objects 129
Chapter 1.2.4.1.2.1 Background Text 132
Chapter 1.2.4.1.2.2 Frame 133
Chapter 1.2.4.1.2.3 Line 133
Chapter 1.2.4.1.2.4 Picture 134
Chapter 1.2.4.1.2.5 Data Field 139
Chapter 1.2.4.1.2.6 Multiline Text 140
Chapter 1.2.4.1.2.7 List Box 142
Chapter 1.2.4.1.2.8 Combo Box 148
Chapter 1.2.4.1.2.9 Radio Buttons 150
Chapter 1.2.4.1.2.10 Option Buttons 151
Chapter 1.2.4.1.2.11 Check Box 155
Chapter 1.2.4.1.2.12 Pushbuttons 155
Chapter 1.2.4.1.2.13 Scroll Bars 157
Chapter 1.2.4.13 Menu Objects 158
Chapter 1.2.4.14 Graphics 164
Chapter 1.2.4.15 Creating Applications and Classes with a Wizard 167
Chapter 1.2.5 Errors 171
Chapter 1.3 Printing 176
Chapter 1.3.1 Report Builder 177
Chapter 1.3.2 Printing Reports 185
Chapter 1.3.2.1 Printing Data from a Table Window 185
Chapter 1.3.2.2 Printing Data Which Must First Be Read 190
Chapter 1.3.3 Crosstabs 193
Chapter 1.3.3.1 Crosstabs with Report Builder 194
Chapter 1.3.3.2 Self-coding Crosstabs 195
Chapter 1.3.4 Printing Graphs 199
Chapter 1.3.5 Printing Images 201
Chapter 1.4 SQLConsole 204
Chapter 1.5 SQLTalk 210
Chapter 1.6 Database Explorer 212
Chapter 2 Sample Application 215
Chapter 2.1 Addresses (Customer, Courier) 216
Chapter 2.2 Specifying Activities 217
Chapter 2.3 Writing Jobs 218
Chapter 3 Expansion 221
Chapter 3.1 DDE with Excel and WinWord 221
Chapter 3.2 Drag and Drop 225
Chapter 3.3 Tooltip Pushbuttons 227
Chapter 3.4 Setting Properties with the Component Development Kit (CDK) 227
Chapter 3.5 Using Other Databases 232
Chapter 3.5.1 Louts Notes 232
Chapter 3.5.2 ODBC 233
Chapter 3.5.2.1 ODBC with dBASE Files 234
Chapter 3.5.2.2 ODBC with Access Databases (MDB-Files) 237
Chapter 3.6 Database Access with OLE DB 240
Chapter 3.6.1 Accessing with OLE DB 241
Chapter 2.7 Barcode 243
Chapter 3.8 SQL.INI 246
Chapter 4 ActiveX and COM 249
Chapter 4.1 Basics 249
Chapter 4.2 ActiveX Integration in SQLWindows 250
Chapter 4.2.1 Introduction: Acrobat Reader 250
Chapter 4.2.2 Excel as Example of Static Automation 253
Chapter 4.2.2.1 Associating a Type Library with ActiveX Explorer 254
Chapter 4.2.2.2 Creating the Application 258
Chapter 4.2.2.3 ActiveX Integration with Word 261
Chapter 4.2.2.3.1 Creating a New Document 261
Chapter 4.2.2.3.2 Working with Bookmarks 266
Chapter 4.3 Creating COM Applications with SQLWindows 267
Chapter 4.3.1 Creating the Server Component 267
Chapter 4.3.2 Creating the Client Component 274
Chapter 5 Web Development with SQLWindows 279
Chapter 5.1 Gupta Web Quick Objects 279
Chapter 5.1.1 The Empty Application 279
Chapter 5.1.2 Web Objects 281
Chapter 5.1.2.1 Developing Web Clients 283
Chapter 5.1.2.1.1 Sample Java Script 286
Chapter 5.1.2.2 Implementing the Application 287
Chapter 5.1.2.3 WebXMLTable 289
Chapter 5.1.2.4 Other Web Clients 299
Chapter 6 Appendix 301
Chapter 6.1 Database Island 301
Chapter 6.2 Terms and Definitions 304
Chapter 6.3 Gupta SQLWindows Functions 309
Chapter 6.3.1 System Functions 309
Chapter 6.3.1.1 Editing Array Contents 309
Chapter 6.3.1.2 Colors and Fonts 310
Chapter 6.3.1.3 Data Type Conversion 310
Chapter 6.3.1.4 Processing Date Values 311
Chapter 6.3.1.5 ActiveX Functions 311
Chapter 6.3.1.6 Debugging 311
Chapter 6.3.1.7 Dialog Boxes 312
Chapter 6.3.1.8 Accessing DOS Files 312
Chapter 6.3.1.9 Drag and Drop 313
Chapter 6.3.1.10 Edit Functions (Cut and Paste) 314
Chapter 6.3.1.11 File Management 314
Chapter 6.3.1.12 Setting Formats 315
Chapter 6.3.1.13 List Boxes and Combo Boxes 316
Chapter 6.3.1.12 Windows Management 317
Chapter 6.3.1.15 Background Text 318
Chapter 6.3.1.16 MDI (Multiple Document Interface) Windows 319
Chapter 6.3.1.17 Sending Messages 319
Chapter 6.3.1.18 Diverse Functions 319
Chapter 6.3.1.19 Numeric Functions 321
Chapter 6.3.1.20 Images 322
Chapter 6.3.1.21 Printing 323
Chapter 6.3.1.22 Report Processing 323
Chapter 6.3.1.23 Scrollbars 324
Chapter 6.3.1.24 SQL 324
Chapter 6.3.1.25 Strings 325
Chapter 6.3.1.26 Table Windows 326
Chapter 6.4 Messages 329
Chapter 7 Index 333