0

I have delphi xe7 and using paradox tables with BDE.

Actually, I have more then one database and I'am trying to use one query and one dbgrid for showing the result

1st database in C:\GEST_AP\Base de données\1\beneficiaire

2nd database in C:\GEST_AP\Base de données\2\beneficiaire

my sql code is :

dm.Beneficiaire.sql.clear;

dm.Beneficiaire.SQL.Add('select *');

dm.Beneficiaire.SQL.Add('from "C:\GEST_AP\Base de données\1\beneficiaire"');

dm.Beneficiaire.SQL.Add('FULL JOIN "C:\GEST_AP\Base de données\2\beneficiaire"');

dm.Beneficiaire.SQL.Add('ON "C:\GEST_AP\Base de données\1\beneficiaire".nom="C:\GEST_AP\Base de données\2\beneficiaire".nom');

dm.Beneficiaire.SQL.Add('where "C:\GEST_AP\Base de données\1\beneficiaire".nom like "%'+edit1.Text+'%"');

dm.Beneficiaire.Active:=true;

When I write something on edit1.text it show me just the result for the first database. :(

soundslikeodd
  • 1,078
  • 3
  • 19
  • 32
  • 1
    BDE/Paradox? Please we are in the 21st century now, use a more modern alternative like Firebird, MySQL, PostGres, SQL server, .... – whosrdaddy Dec 30 '16 at 18:01
  • thank u for u'r comment whosrdaddy – Beddiar Abdelhalim Dec 30 '16 at 18:04
  • Anyway if you execute the query in the database explorer, do you get the wanted result? – whosrdaddy Dec 30 '16 at 18:15
  • No he check only from the first database C:\GEST_AP\Base de données\1\beneficiaire.db – Beddiar Abdelhalim Dec 30 '16 at 18:25
  • 2
    Have you followed the instructions here http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/devwin32/fhxr27506_xml.html#53656520416C736F for JOINs across different databases, in particular to use different BDE aliases for the two databases? – MartynA Dec 30 '16 at 18:50
  • Yes MartynA the problem was i dont have alias for those database and if i try to replace alias with link to my database it gave me an error ! – Beddiar Abdelhalim Dec 30 '16 at 19:17
  • Well what's stopping you creating an alias then? – MartynA Dec 30 '16 at 19:36
  • with BDE you would have all possible troubles with Win64, UAC file privileges and what not. We have to maintain one PDOX based program and it is a nightmare. But... "the road is closed. Bridge crashed. But you are entitled to your rights of driving there" – Arioch 'The Dec 30 '16 at 20:17
  • Thanks all i will try creating alias and try, otherwase i will falow whosrdaddy i will move to SQL server thanks again all of u – Beddiar Abdelhalim Dec 30 '16 at 20:46
  • When you say "show me just the result for the first database" do you mean the result contains no columns from the second database, or the columns are represented but contain no data? – A. I. Breveleri Jan 04 '17 at 17:23

0 Answers0