--- In IBObjects@y..., Geoff Worboys <geoff@t...> wrote:
Geoff,
> If this is a Delphi compile error then I dont imagine that this
could possibly be related to the IB client.
I don't know how I could write "compile error". Very sorry. I must
have been very tired, yesterday.
It is no compile error, it is an execution error. The code compiles
ok on both computers. However, when I launch the application, ev goes
smooth on PC 1, while on PC 2 I get the JOIN error.
The following code - which is very like - executes ok on both PCs:
with TIBOQuery(MaiTab) do
begin
DatabaseName:='cb4db';
FetchWholeRows:=False;
RequestLive:=False;
SQL.Add('select');
SQL.Add('a.y_mov ,');
SQL.Add('a.n_mov ,');
SQL.Add('a.d_mov ,');
SQL.Add('a.cod_cf ,');
SQL.Add('a.cod_art ,');
SQL.Add('a.cod_cau ,');
SQL.Add('a.qta ,');
SQL.Add('a.um ,');
SQL.Add('a.prezzo ,');
SQL.Add('a.lotto ,');
SQL.Add('b.des_art ,');
SQL.Add('c.des_cf ,');
SQL.Add('d.des_cau ,');
SQL.Add('d.tipo ,');
SQL.Add('e.n_doc ,');
SQL.Add('e.d_doc ,');
SQL.Add('e.serie ');
SQL.Add('from mv_li a');
sql.Add('join art b on a.cod_art=b.cod_art');
sql.add('join tb_cf c on a.cod_cf=c.cod_cf');
sql.Add('join tb_cau d on a.cod_cau=d.cod_cau');
sql.Add('join mv_hd e on a.y_mov=e.y_mov and a.n_mov=e.n_mov');
SQL.Add('where');
SQL.Add('mv_li.cod_mag="'+GetBtwPar(MovArtFrm.CodMagBox.Text)
+'"');
SQL.Add('order by cod_art, d_mov');
Prepare;
ParamByName('d1').AsDateTime:=D1Pik.Date;
ParamByName('d2').AsDateTime:=D2Pik.Date;
ExecSQL;
First;
end;