How can i know the value of field that have the identity property? Because i
need it for set this value in the detail dw.
Thank you very much
Alejandro.
alejand...@siu.edu.ar
In the UpdateEnd event of the master, do a GetItemNumber() on the identity
column. It should automatically be populated with the autoincrement value
that was assigned by the database. (If this isn't happening, that's another
issue to solve...)
Save that value into an instance variable.
In the UpdateStart event of the child, loop thru each row and evaluate the
status flag. If the row is NewModified! then do a SetItem of the instance
variable into the primary key of that row.
We developed an extension to our framework's version of the linkage service
(sorry, it's not PFC) that also handles many to many, i.e., multiple new
parents (grid or tabular style parent) linked with a child dw.
Paul Horan
VCI
Springfield, MA
Alejandro Delu <alejand...@siu.edu.ar> wrote in message
news:xmMtdV03#GA....@forums.sybase.com...
Good luck,
Terry [TeamSybase] and Sequel the auto-incrementing techno-kitten
Thank you, but my problem continue.
In the master dw, I've MORE ONE ROW. Then in updateend event i can't know
all values of autoincrement values! understand you?
Because for each row of master dw, i need (once update the row) know value
of autoincrement column and set this in all row of detail-dw.
The problem is what PowerBuilder not populate the field autoincrement after
i did Update!!!
I'm working with PB 6.5 and Informix 7.30 (In informix the datatype
autoincrement is 'Serial', this is an integer datatype)
TIA
Alejandro Delu
This works just fine for us. After the Update() statement, every new row in
the Master has a unique value automatically placed in the identity column.
This is a configuration issue between PB6.5, Informix, and your datawindow.
Solving the Master/Child linking issue is something solved with
Powerscript... There may be something in the PFC linkage service that does
this, but we're not a PFC shop. We had to build that ourselves.
Our trick was to add a computed integer column AutoLink to each datawindow.
As the parent row is inserted, we generate a random number and SetItem that
into the master.AutoLink column. As each child is inserted, we copy the
value of AutoLink from the parent to the child. That keeps them linked.
In the UpdateStart event of the child, we find the row in Master that
matches on the AutoLink column, and do the SetItem of the master.Identity
column into the Child, where they match on the autolink column.
Paul
Alejandro Delu <alejand...@siu.edu.ar> wrote in message
news:Ff7$RWC4#GA....@forums.sybase.com...