ContentsIndexPreviousNext

5.1 Writing Queries to Access Data

ODBC programs retrieve data through Structured Query Language (SQL). Although many Windows applications let you use Microsoft Query to generate SQL queries transparently, others require you to generate the SQL yourself. In some instances, you may want to generate your own SQL queries even for applications that could otherwise use MS Query. For example, you may want to generate a complex set of instructions for a custom query and display the result in a formatted dialog box. MS Query does not let you perform these functions.

This chapter gives you information you need to write your own queries (also known as commands or statements) or programs for accessing COBOL data from ODBC-enabled applications. It describes what to consider when writing queries and which SQL queries are supported by AcuODBC.

To understand the concepts in this chapter, you must have a minimum knowledge of the BASIC language, because many Windows application languages have a BASIC-like syntax. Before you begin, you should verify that the application from which you want access to COBOL data is ODBC-enabled.


Caution: To safeguard your system, we recommend that you perform all custom programming functions on a dedicated development machine.