Firedac -How to use the same Fdquery in more than one bank?

Asked

Viewed 2,204 times

3

I heard that the FD has to program for two different database managers using the same FDQuery, that is, could put the two SQL s of each bank in the same FDQuery... or something like that...

Hold on there’s some tutorial for this?

1 answer

4


Hello, yes possible. The component to be used is FDLocalSQL, where you would basically do the SELECT of a FDQuery.
In practice, it works like this:

  1. Insert a component FDLocalSQL;
  2. Enter the dataset s linked to the N banks you want, each one with their due SQL s;
  3. Connect the property LocalSQL of each dataset in the component FDLocalSQl;
  4. Insert a new FDConnection with Driver SQLite;
  5. Insert a new FDQuery on the form;
  6. Turn on the FDLocalSQL and the new Query in FDConnection of item 4.0;
  7. In the latter FDQuery, insert SQL referencing each Query as being a table. Ex.: SELECT NOME FROM FDQUERY1 JOIN FDQUERY2 ON (FDQUERY1.CAMPO = FDQUERY2.CAMPO);
  8. Open the last dataset.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.