Board index » delphi » D3: How do you edit a sql, that is a join over 3 tables

D3: How do you edit a sql, that is a join over 3 tables

Hi,

We normalized our database (on Delphi 3.01) and wanted to show and edit
the data, that after normalization is split into 3 tables. The sql for
this runs perfect and looks like this:

SELECT DISTINCT D1.Titel, D1.Description, D1.RefTitelID,
D.ForumSeitenID, D.FpFilename, D.RelativeDir, D.IntID, D.LanguageID,
D.ReferenceID, D1.LastUpDate, D2.URL
FROM "Fpindex.DB" D, "RefTitel.DB" D1, "Reference.DB" D2
WHERE
(D1.ReferenceID = D.ReferenceID)
 AND (D2.ReferenceID = D1.ReferenceID)
ORDER BY  D1.Titel, D1.Description, D1.RefTitelID, D.ForumSeitenID,
D.FpFilename, D.RelativeDir, D.IntID, D.LanguageID, D.ReferenceID,
D1.LastUpDate, D2.URL

(The propertie RequestLive is set to true.)

Now the SQL brings all data, but not one can be edited.

No that we found all, what shall we gonna do to change it?

Thanks for help

Markus

 

Re:D3: How do you edit a sql, that is a join over 3 tables


Add an TUpdateSQL component - and write the appropriate update/Insert/SQL
statements.

As mention in the Help, RequestLive only works on a single table - to have
it work across joins you must add a TUPdateSQL component - then it works
okay.

Quote
markus baumgartner wrote in message <36672EA3.3...@active.ch>...
>Hi,

>We normalized our database (on Delphi 3.01) and wanted to show and edit
>the data, that after normalization is split into 3 tables. The sql for
>this runs perfect and looks like this:
>(The propertie RequestLive is set to true.)

>Now the SQL brings all data, but not one can be edited.

>No that we found all, what shall we gonna do to change it?

Re:D3: How do you edit a sql, that is a join over 3 tables


Quote
>Now the SQL brings all data, but not one can be edited.

>No that we found all, what shall we gonna do to change it?

Local SQL does not support live queries on local tables  with a Join

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:D3: How do you edit a sql, that is a join over 3 tables


The best solution is to link the tables on a form using three TTables or
TQueries instead of doing a join.

--
Bill Todd
(Sorry but TeamB cannot answer questions received via email)
(Remove nospam from my email address to contact me for any other reason)

Re:D3: How do you edit a sql, that is a join over 3 tables


Hello Myles,

Thanks for your help.

Greetings

Markus

Quote

> Add an TUpdateSQL component - and write the appropriate update/Insert/SQL
> statements.

> As mention in the Help, RequestLive only works on a single table - to have
> it work across joins you must add a TUPdateSQL component - then it works
> okay.

> markus baumgartner wrote in message <36672EA3.3...@active.ch>...
> >Hi,

> >We normalized our database (on Delphi 3.01) and wanted to show and edit
> >the data, that after normalization is split into 3 tables. The sql for
> >this runs perfect and looks like this:
> >(The propertie RequestLive is set to true.)

> >Now the SQL brings all data, but not one can be edited.

> >No that we found all, what shall we gonna do to change it?

Other Threads