I'm writing a .net application that connect to a remote database server hosted on internet to make a sort of replication.
The database source is on my local firebird server, the destination database is on the Firebird server hosted on the internet
This is the query
execute block as DECLARE panum INT; DECLARE nom varchar(50); DECLARE prenom
varchar(50); DECLARE dna date; DECLARE datemodif date; DECLARE VARIABLE VSQL
VARCHAR(500); begin VSQL = 'select panum, nom, prenom, dna, DATEMODIF from
patient where (datemodif is not null) and (datediff (day from current_date
to cast(DATEMODIF as date)) >= 0) ';
FOR execute statement VSQL ON EXTERNAL DATA SOURCE
'127.0.0.1:C:\BDD\D2018.gdb'
AS USER 'sysdba' PASSWORD 'masterkey' INTO :panum, :nom, :prenom, :dna,
:DATEMODIF DO
merge into patient bb using (select :panum panum, :nom nom, :prenom prenom,
:dna dna, :DATEMODIF datemodif from RDB$DATABASE ) n on bb.panum = n.panum
when matched
then update set bb.nom = :nom, bb.prenom = :prenom, bb.dna = :DNA,
bb.DATEMODIF = :DATEMODIF when not matched
then insert(panum, nom, prenom, dna, datemodif) values(:panum, :nom,
:prenom, :dna, :datemodif);
suspend; end;
Both servers run Firebird 3.0.3 on Windows 64 machines.
It fails with this error message :
Error while trying to open file 12515659 : The system cannot find the path specified. Data source : Firebird::127.0.0.1:C:\BDD\D2018.gdb
I have also tried localhost and my local ip adress as well as server name .
If I flip the direction so my source database is the remote server and the destination is my local server it works.
I know that's a little weird, but I have some constraints for doing it like this.