Database Commands |
Top Previous Next |
EMUE offers powerful tools for directly accessing OLEDB and ODBC databases, as well as Excel files. EMUE is able to retrieve selected information from database tables, and to insert, update or delete records. In fact, with the appropriate permissions, any commands that can be executed directly within the database software can be run from within EMUE including SQL queries. Information read from a database can be used within an EMUE script to interact with a mainframe or the web. EMUE has supported the older ODBC standard since version 2.0. As of EMUE version 2.1, a parallel set of commands provides the same functionality for the newer OLEDB standard. This newer standard uses a more efficient and reliable way of working with databases. The examples in this topic will use the OLEDB commands, but note that the corresponding ODBC commands are functionally equivalent. See the ODBC and OLEDB topics for details. The first step in accessing a database via EMUE is to provide the connection string, which is required to locate the data source and open it. Many commonly used connection strings can be found at developer websites like http://www.connectionstrings.com. The GetOLEDBData command is used to retrieve data values from the database and add them to an EMUE list. The GetOLEDBData command requires a list name, the appropriate connection string, and a query statement that returns the desired information. In order to utilize the full functionality of the GetOLEDBData command, it is necessary to become acquainted with EMUE Lists. When data is retrieved from a database table, it is stored in a list, which is like a two dimensional array or a table. When used in tandem with the GetOLEDBData command, EMUE Lists are a particularly convenient way of temporarily storing database values for processing within an EMUE script. Some of the most useful list commands, such as CreateList, GetListMember, GetListCount, and FindListPosition are used in the Database Examples.
|