How to access InterBase XE Desktop edition.

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Tsagoth
Posts: 33
Joined: Wed 15 Jul 2009 01:25

How to access InterBase XE Desktop edition.

Post by Tsagoth » Thu 18 Oct 2012 14:54

Interbase XE Desktop doesn't permit TCP connections. Can Unidac still work with it or does only work with Interbase Server edition ? I don't see any way to specify filepath for database filename in Unidac.

AndreyZ

Re: How to access InterBase XE Desktop edition.

Post by AndreyZ » Fri 19 Oct 2012 08:03

Hello,

To work with InterBase without using TCP connections, you must not set the TUniConnection.Server property. If TUniConnection.Server is blank, UniDAC uses local protocol to work with InterBase. You can specify the path to the InterBase database in the TUniConnection.Database property. Here are code examples:

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  UniConnection1.ProviderName := 'InterBase';
  UniConnection1.Server := ''; // local protocol
  UniConnection1.Database := 'C:\ibxe.gdb';
  UniConnection1.Username := 'sysdba';
  UniConnection1.Password := 'masterkey';
  UniConnection1.SpecificOptions.Values['ClientLibrary'] := 'gds32.dll';
  UniConnection1.LoginPrompt := False;
  UniConnection1.Open;
end;

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  UniConnection1.ProviderName := 'InterBase';
  UniConnection1.Server := 'localhost'; // TCP
  UniConnection1.Database := 'C:\ibxe.gdb';
  UniConnection1.Username := 'sysdba';
  UniConnection1.Password := 'masterkey';
  UniConnection1.SpecificOptions.Values['ClientLibrary'] := 'gds32.dll';
  UniConnection1.LoginPrompt := False;
  UniConnection1.Open;
end;

Post Reply