Adding database support
In this chapter you will learn how to use the VA Smalltalk database parts to construct database logic. You can use the following parts from the palette to add database support to an application:
Database Functions category
Multi-row Query
Provides access to SQL for retrieving large blocks of data
Single-Row Query
Provides access to SQL for retrieving a single row of data
SQL Statement
Provides access to SQL for updating, inserting, and deleting data
Stored Procedure
Provides access to a program that is accessible through the database
This chapter focuses on the Multi-row Query part. For more information on using the Single-Row Query, SQL Statement, and Stored Procedure parts, refer to
More database techniques.
You will be lead through the construction of a sample database application using the Call Level Interface to the IBM DATABASE 2 (DB2) product and the SAMPLE database that is shipped with DB2. To follow the construction of this application, you need to have DB2 installed or access to a supported host-based database through IBM SAA Distributed Database Connection Services/2. For a list of supported databases, refer to the VA Smalltalk web page under
System Requirements.
Note:
You need to purchase DB2 separately from VA Smalltalk. DB2 does not come with VA Smalltalk. VA Smalltalk only provides an interface to it.
You can also use ORACLE or ODBC support to follow along the sample application. If you use ORACLE or ODBC, the information on using static SQL support does not apply.
Installing an ODBC text database contains instructions defining an ODBC data source and creating the SAMPLE database in text format for access through the ODBC text database driver.
Most of the instructions in this chapter are general. You can adapt them for an application of your own design using the database management system (DBMS) that you have installed. The database parts function the same regardless of the database you access.
Last modified date: 05/25/2022