0

I am trying to connect my Delphi application to Informix database using fireDAC. I all the parameters supplied in connection editor. But I have to run PA Server to make it work.

So is it necessary to run the PA Server to connect to Informix db.

Cœur
  • 37,241
  • 25
  • 195
  • 267
  • This is the error I get when executing application without PA Server: Error: E0003 Please make sure that 'Platform Assistant Server' is running on the host machine and is configured to use port 64211 – user3406438 Mar 26 '14 at 06:52
  • That really doesn't make sense. I guess there is something wrong in your connection parameters or compile / linker options. Firedac doesn't need PA server, that's for remote debugging... – Copilot Mar 26 '14 at 10:15
  • It seems you are using non-Windows target platform. What is it ? – da-soft Mar 26 '14 at 15:32

1 Answers1

0

I am able to solve it using the following code to connect instead of dragging droping he controls:

procedure TForm1.FormCreate(Sender: TObject);
var
Params: TStringList;
begin
 FDManager := TFDManager.Create(self);
 FDconnection := TFDConnection.Create(self);
 FDQuery := TFDQuery.Create(self);
 FDataSOurce := TDataSource.Create(self);
 Params := TStringList.create;
 Params.Values['User_Name'] := paramstr(3);
 Params.Values['Database'] := paramstr(2);
 Params.Values['Password'] := paramstr(4);
 Params.Values['DriverName'] := 'Informix';
 Params.Values['HostName'] := paramstr(1);
 Params.Values['RDBMS'] := 'OTHER';
 Params.Values['DriverID'] := 'TDBX';
 FDManager.AddConnectionDef('BOSSConnection', 'TDBX', Params);
 FDConnection.DriverName := 'TDBX';
 FDConnection.ConnectionDefName:='BOSSConnection';
 FDConnection.Connected := True;
 FDQuery.SQL.Add('select first 10 cust_code, bus_name, status from strcustr;');
 FDQuery.Connection := FDConnection;
 FDataSource.DataSet := FDQuery;
 FDQuery.Active := True;
 DBGrid1.DataSource := FDataSource;
 FDConnection.LoginPrompt := False;
end;
  • And what are your connection props when you drag/drop the controls? Also for informix I recommend using the ODBC bridge instead of going by dbexpress. – Copilot Mar 27 '14 at 08:40
  • What are the disadvantages of using dbExpress? And I guess ODBC has to be mannualy configured in WIndows. Any suggestions – user3406438 Mar 27 '14 at 12:04