InterBase ToGo with dbExpress
Go Up to Developing Database Applications
Starting with XE3, RAD Studio provides support for InterBase ToGo databases.
What has changed
Starting with XE3, RAD Studio enhances the dbExpress framework by adding an InterBase ToGo-specific driver. This change makes it easier for users to establish connections to InterBase ToGo databases using dbExpress, in Delphi and C++ applications.
Using the InterBase ToGo Driver
The InterBase ToGo driver can be used only at run time.
If you activate a connection at design time using InterBase ToGo or have an open InterBase ToGo connection in your Data Explorer, and try to run your application, you will get an error at run time. This happens because the InterBase ToGo server license requires exclusive access to the database. Since you already have an open connection at design time, you cannot then open a local connection to the same database in the application you are building/running. InterBase ToGo is intended to be only a deployment option and should not be used in the IDE or in the Data Explorer.
The following example is a tutorial on how to establish a connection to an InterBase ToGo database in a Delphi VCL Forms Application:
- Select File > New > VCL Forms Application - Delphi.
- Add the following components to the form:
- Add the following code to the OnClick event handler for the
procedure TForm1.connectButtonClick(Sender: TObject); begin // create a new TSQLConnection object SQLConnection1 := TSQLConnection.Create(nil); // set the driver of the TSQLConnection control SQLConnection1.DriverName := 'IBToGo'; // add the Database parameter to Params SQLConnection1.Params.Add('Database=full_path_to_your_database_file'); // set the Username and Password parameters SQLConnection1.Params.Add('User_Name=SYSDBA'); SQLConnection1.Params.Add('Password=masterkey'); try // open the connection SQLConnection1.Open; Memo1.Text := 'Connection established'; except on E: Exception do Memo1.Text := 'Exception raised with message : ' + #13#10 + E.Message; end; end;
- InterBase ToGo
- Mobile Tutorial: Using InterBase ToGo with dbExpress (iOS and Android)
- InterBase XE3 ToGo Quick Start Guide
- InterBase XE7 ToGo Quick Start Guide
- Object Inspector
- Data Explorer