The following components are located on the InterBase tab of the component palette.
. Jj TIBTransaction
Though they are similar to BDE components in name, the IBX components are somewhat different. For each component with a BDE counterpart, the sections below give a discussion of these differences.
There is no simple migration from BDE to IBX applications. Generally, you must replace BDE components with the comparable IBX components, and then recompile your applications. However, the speed you gain, along with the access you get to the powerful InterBase features make migration well worth your time.
Use a IBDatabase component to establish connections to databases, which can involve one or more concurrent transactions. Unlike BDE, IBX has a separate transaction component, which allows you to separate transactions and database connections.
Warning: Tip: You can store the username and password in the IBDatabase component's Params property by setting the LoginPrompt property to false after logging in. For example, after logging in as the system administrator and setting the LoginPrompt property to false, you may see the following when editing the Params property:
user name=sysdba password=masterkey
Unlike the Borland Database Engine, IBX controls transactions with a separate component, TIBTransaction. This powerful feature allows you to separate transactions and database connections, so you can take advantage of the InterBase two-phase commit functionality (transactions that span multiple connections) and multiple concurrent transactions using the same connection.
Use an IBTransaction component to handle transaction contexts, which might involve one or more database connections. In most cases, a simple one database/one transaction model will do.
IBX dataset components
There are a variety of dataset components from which to choose with IBX, each having their own characteristics and task suitability:
Use an IBTable component to set up a live dataset on a table or view without having to enter any SQL statements.
Use an IBQuery component to execute any InterBase DSQL statement, restrict your result set to only particular columns and rows, use aggregate functions, and join multiple tables.
IBQuery components provide a read-only dataset, and adapt well to the InterBase client/server environment. To set up an IBQuery component:
Use an IBDataSet component to execute any InterBase DSQL statement, restrict your result set to only particular columns and rows, use aggregate functions, and join multiple tables. IBDataSet components are similar to IBQuery components, except that they support live datasets without the need of an IBUpdateSQL component.
Se|eCtSQL SELECT Country, Currency FROM Country
RefreShSQL SELECT Country, Currency FROM Country WHERE Country = :Country
M0difySQL UPDATE Country SET Country = :Country, Currency = :Currency WHERE
Country = :Old Country
De|eteSQL DELETE FROM Country WHERE Country = :Old_Country
|nSertSQL INSERT INTO Country (Country, Currency) VALUES (:
1. Set the Active property to true.
Note: Note: Parameters and fields passed to functions are case-sensitive in dialect 3. For example,
would return nothing in dialect 3 if the field was 'EMPNO'. IBStoredProc
Use IBStoredProc for InterBase executable procedures: procedures that return, at most, one row of information. For stored procedures that return more than one row of data, or "Select" procedures, use either IBQuery or IBDataSet components.
Use an IBSQL component for data operations that need to be fast and lightweight. Operations such as data definition and pumping data from one database to another are suitable for IBSQL components.
SELECT GEN_ID(MyGenerator, 1) FROM RDB$DATABASE
Use an IBSQLMonitor component to develop diagnostic tools to monitor the communications between your application and the InterBase server. When the TraceFlags properties of an IBDatabase component are turned on, active IBSQLMonitor components can keep track of the connection's activity and send the output to a file or control.
A good example would be to create a separate application that has an IBSQLMonitor component and a Memo control. Run this secondary application, and on the primary application, activate the TraceFlags of the IBDatabase component. Interact with the primary application, and watch the second's memo control fill with data.
Use an IBDatabaseInfo component to retrieve information about a particular database, such as the sweep interval, ODS version, and the user names of those currently attached to this database.
Use an IBEvents component to register interest in, and asynchronously handle, events posted by an InterBase server.
IBEvents->Events->Add("EVENT_NAME"); // C++ Example
1. 4. Set the Registered property to true.
If you have InterBase 6 installed, you can use the InterBase 6 Administration components, which allow you to use access the powerful InterBase Services API calls.
The components are located on the InterBase Admin tab of the IDE and include:
^-^TIBRestoreService —TIBValidationService . TIBStatisticalService : TIBLogService .^v-TIBSecurityService ■ - TIBLicensingService
IB- g t^--. TIBInstall , TIBUnInstall
Note: You must install InterBase 6 to use these features. IBConfigService
Use an TIBConfigService object to configure database parameters, including page buffers, async mode, reserve space, and sweep interval.
Use an TIBBackupService object to back up your database. With IBBackupService, you can set such parameters as the blocking factor, backup file name, and database backup options.
Use an TIBRestoreService object to restore your database. With IBRestoreService, you can set such options as page buffers, page size, and database restore options.
Use an TIBValidationService object to validate your database and reconcile your database transactions. With the IBValidationService, you can set the default transaction action, return limbo transaction information, and set other database validation options.
Use an TIBStatisticalService object to view database statistics, such as data pages, database log, header pages, index pages, and system relations.
Use an TIBLogService object to create a log file. IBSecurityService
Use an TIBSecurityService object to manage user access to the InterBase server. With the IBSecurityService, you can create, delete, and modify user accounts, display all users, and set up work groups using SQL roles.
Use an TIBLicensingService component to add or remove InterBase software activation certificates. IBServerProperties
Use an TIBServerProperties component to return database server information, including configuration parameters, and version and license information.
Use an TIBInstall component to set up an InterBase installation component, including the installation source and destination directories, and the components to be installed.
Use an TIBUnInstall component to set up an uninstall component.
Was this article helpful?
What you need to know about… Project Management Made Easy! Project management consists of more than just a large building project and can encompass small projects as well. No matter what the size of your project, you need to have some sort of project management. How you manage your project has everything to do with its outcome.