
True DbGrid - multiple, Editable JOINS ?
I use the APEX True DBGrid Standard Edition (just downloaded from
APEX and I am desperately trying to display fields from 4 different
tables at once in a Jet-Database and I also wish to be able to EDIT
these fields from the grid.
Table one will always have a match in table two witch will ALWAYS
have a match in table Three ....and four.
I have tried different variations of nested Joins (INNER JOINS).
SQL = "SELECT Table1.field(any), Table2.field(any), table3.field(any), "
SQL = SQL & "table4.field(any) FROM Table1 INNER JOIN (Table2 INNER JOIN
"
SQL = SQL & "(Table3 INNER JOIN Table4 On table3.field(3) =
Table4.Field(5)) "
SQL = SQL & "ON Table2.Field(7) = Table3.Field(1)) "
SQL = SQL & "ON Table1.field(1) = Table2.field(9) WHERE
Table1.Field(any) > 2 "
SQL = SQL & "ORDER BY Table1.field(any)"
'RMK The grids DataSource is DATA1
Data1.RecordSource=SQL
TdBGrids1.Refresh
Well, If I skip One of the Joins I get this new Recordset Displayed.
But it is not Editable. And.. otherwise I get JOIN Err-msg's...
Anybody know a Good way to join Fields from 4 or More table in a
TDBgrid (standard edition) in a way that'll let me edit them from the
grid?
I will also need to use a few AND conditions at the end... Will this be
a problem?
IF anybody know a workaround and have the time to help,
I would appreciate it very much..
:-) Terje Viken