Client Tools Applications

From InterBase

Go Up to Application Development


Client tools such as Delphi and C++Builder can access InterBase databases using Database Express (DBX). Server query reporting is built into the client tool providing Windows application support. This enables you to build sophisticated, user-friendly database applications with minimal programming effort.

InterBase Express (IBX) for Delphi and C++Builder

InterBase Express (IBX) for Delphi and C++Builder

IBX is a library of components that allows Delphi and C++Builder programmers to access InterBase features.The version of IBX that ships with Delphi and C++Builder does not access the latest InterBase features. An enhanced version of IBX ships with InterBase.

dbExpress (DBX)

dbExpress (DBX)

dbExpress is a set of database drivers that provide fast access to a variety of SQL database servers. For each supported type of database, dbExpress provides a driver that adapts the server-specific software to a set of uniform dbExpress interfaces. When you deploy a database application that uses dbExpress, you need only include a dll (the server-specific driver) with the application files you build.

dbExpress lets you access databases using unidirectional datasets, which are designed for quick lightweight access to database information, with minimal overhead. Unidirectional datasets can only retrieve a unidirectional cursor. They do not buffer data in memory, which makes them faster and less resource-intensive than other types of dataset. However, because there are no buffered records, unidirectional datasets are also less flexible than other datasets. For example, the only supported navigation methods are the First and Next methods. Most others raise exceptions. Some, such as the methods involved in bookmark support, simply do nothing.

There is no built-in support for editing because editing requires a buffer to hold the edits. The CanModify property is always False, so attempts to put the dataset into edit mode always fail. You can, however, use unidirectional datasets to update data using an SQL UPDATE command or provide conventional editing support by using a dbExpress-enabled client dataset or connecting the dataset to a client dataset.

There is no support for filters, because filters work with multiple records, which requires buffering. If you try to filter a unidirectional dataset, it raises an exception. Instead, all limits on what data appears must be imposed using the SQL command that defines the data for the dataset.

There is no support for lookup fields, which require buffering to hold multiple records containing lookup values. If you define a lookup field on a unidirectional dataset, it does not work properly.

Despite these limitations, unidirectional datasets are a powerful way to access data. They are the fastest data access mechanism, and very simple to use and deploy.

ADO.NET Provider for InterBase (64-bit)

Note:
This page describes the old ADO.NET driver, For information and instructions on the new driver refer to the new ADO.NET Driver documentation.

RADStudio now has 64-bit drivers for dbExpress (since RADStudio XE2) which means you can use the 64-bit Ado.NET driver. The existing 32-bit installer of Ado.NET driver has been modified and incorporates the 64-bit assemblies into the same installer. This installer is intelligent enough to install the required assemblies on the target OS platform (32-bit assemblies for 32-bit OS, 32 and 64 assemblies on 64-bit OS).

ADO.NET Installation and Usage Instructions

Note:
If you have previously installed RAD Studio on this computer, you do not need to perform any additional installation procedures in order to use the ADO.NET 2.0 driver with Microsoft Visual Studio 2005/2008.
  • Prerequisites:
  • .NET 2.0 SDK with update
  • Microsoft Visual Studio 2005/2008
  • InterBase XE or later
  • Installation Instructions:
  • Run the InterBase ADO.NET 2.0 installer.
  • Usage Instructions:
  • Start Visual Studio 2005/2008.
  • File new C# Windows application.
  • Project - Add Reference and add the AdoDbxClient.dll, DbxCommonDriver, DBXInterBaseDriver to your project.
  • Add a DataGridView component to your Windows Form.
  • The sample code below fills a DataGridView component with the contents of the employee table of the employee.gdb sample InterBase database:
>>>
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Borland.Data;
using Borland.Data.Units;
using System.Data.SqlClient;
using System.Data.Common;
namespace IBXEApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
ReadData(getConnection());
}
public DbConnection getConnection()
{
// DbProviderFactory factory = DbProviderFactories.GetFactory
// ("Borland.Data.AdoDbxClient");
DbConnection c = new TAdoDbx{{Product}}Connection();
//DbConnection c = factory.CreateConnection();
c.ConnectionString = "Database=C:\\Embarcadero\\{{Product}}\\examples\\database\\employee.gdb;User_Name=sysdba;Password=masterkey";
return c;
}
public void ReadData(DbConnection conn)
{
string sql = "select * from employee";
DbCommand cmd = conn.CreateCommand();
cmd.CommandText = sql;
conn.Open();
DbDataReader myreader = cmd.ExecuteReader();
dataGridView1.DataSource = myreader;
DataSet ds = new DataSet();
DataTable dt = new DataTable("employee");
ds.Tables.Add(dt);
ds.Load(myreader, LoadOption.PreserveChanges, ds.Tables[0]);
dataGridView1.DataSource = ds.Tables[0];
myreader.Close();
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{

}
}
}
<<<

Advance To: