However you do it, for a multi-table join you will need one data object for
the select, and one data object per table for insert, update, delete.

My pages don't know what data objects are.  They get a reference to a an
object called a RowContainer, which contains Row objects.

The page calls getRows() on the RowContainer to get rows, which might be
existing rows or to-be-inserted rows created on another page in the same
session, or getNewRow() to initialize a new row.  If the RowContainer is
empty, it will retrieve table rows and build Row objects, but this is
transparent to the page.

The page calls setValue, getValue on the Row to set/get column values.  It
can test row status via isNew(), isAltered(), isDeleted().  The page calls
update() on one Row or on the RowContainer, which passes the update to all
Rows.  A Row can include rows from different tables.  The delete() command
ahead of the update() will cause the Row to be deleted on update.  Each
table row in a Row is evaluated separately.  In the case of an outer join,
you might start with a row from table A, and nothing from table B, and an
update to the Row might cause an update to table A and an insert to table B.  

Under the hood, it is what I said in the first sentence above, in most cases.

-- Curt Springer, Team ND

At 01:03 PM 6/18/99 -0800, [EMAIL PROTECTED] wrote:
>
>Okay, this is what I suspected. However, I am still unclear on the wording
of your reply.
>Are you saying that I use one object that has references to two DO's for
select/ update functionality. If so could you clarify as to what object
this would be.
>Or are you saying that I use two dataobjects for the page?
>
>Thanks a lot,
>Bryant Brabson
>
>Curt Springer <[EMAIL PROTECTED]> wrote:
>>Unfortunately, you can't update against a multi-table MultiSQL DO, only
>>against a single-table one.
>>
>>We get around this with an object that has a reference to a multi-table DO
>>(either CSpSelect or CSpMultiSQL, which extends CSpSelect) that is used for
>>'select' only, and, for each table in the join, a single-table CSpMultiSQL
>>DO for insert,update,delete.  We send 'select' or 'update' to the object.
>>In the case of 'update', it tracks status and value changes to the contents
>>since the 'select', and then sends 'insert', 'update' or 'delete' (or
>>nothing) to the CSpMultiSQL DO(s), as needed.  There is also a provision
>>for temporary/computed values, a buffer that does not map to a table (or
DO).
>>
>>-- Curt Springer, Team ND
>>
>>
>>At 09:49 AM 6/18/99 -0800, [EMAIL PROTECTED] wrote:
>>>First off, please bear with me if my terminology is a little off-
>>>I just inherited the NetDynamics responsibilities around here 
>>>recently!
>>>I have a MultiSQL data object that I have modified to use
>>>computed columns via using the whole override SQL option.
>>>I have done this as I needed to do a join between 2 tables and then sort
>>the results based on one of the computed columns.
>>>This page has an update feature based on the value of a checkbox.
>>>Now that I have added the computed columns, update doesn't work.
>>>I remember hearing about this somewhere, and am wondering if I can make
>>this work or if I need to pursue a different strategy. Also, is there
>>anyway to construct a MultiSQL do that uses 2 tables?
>>>
>>>Thanks,
>>>Bryant Brabson
>>>_________________________________________________________________________
>>>
>>>For help in using, subscribing, and unsubscribing to the discussion
>>>forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
>>>
>>>For dire need help, email: [EMAIL PROTECTED]
>>> 
>
>_________________________________________________________________________
>
>For help in using, subscribing, and unsubscribing to the discussion
>forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
>
>For dire need help, email: [EMAIL PROTECTED]
> 
_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to