Here is the excerpt from the PB help file. If this doesn't come thru okay then look
it up under the SetItemStatus() function.
Original status Specified status
New! NewModified!
DataModified! NotModified!
New! -
Yes Yes No
NewModified! No -
Yes New!
DataModified! NewModified! Yes
- Yes
NotModified! Yes Yes
Yes -
HTH
"Skiffington, Bill" wrote:
> Dario,
>
> You can't change the status from NewModified! to DataModified!. You go from
> NewModified! to NotModified! and then to DataModified!. You can find a table
> that illustrates all your options in help under SetItemStatus.
>
> HTH,
> Bill
>
> -----Original Message-----
> From: Daniel Coppersmith [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 30, 1999 6:28 AM
> To: Dario Schmidt
> Cc: PFCSIG
> Subject: Re: PFCSIG SetItemStatus
>
> Are you absolutely sure the status of the keys are NotModified! (check it
> right before the update). Is it possible that any of the columns are still
> set to New! (or NewModified!??), this might confuse PB if some of the other
> columns are DataModified! and NotModified!....
>
> I would execute a script right before the update that looks something like
> this:
>
> ll_cols = long(dw_1.describe("datawindow.column.count"))
> do while ll_cols > 0
> choose case dw_1.getItemStatus(1, ll_cols, Primary!)
> case New!
> messagebox("Column " + string(ll_cols), "New!")
> case NewModified!
> messagebox("Column " + string(ll_cols), "NewModified!")
> case NotModified!
> messagebox("Column " + string(ll_cols), "NotModified!")
> case DataModified!
> messagebox("Column " + string(ll_cols), "DataModified!")
> end choose
> ll_cols = ll_cols - 1
> loop
>
> If any pop up as New! or NewModified!, try setting the row's item status to
> NotModified! right after the New!. Keep in mind also that you cannot always
> go from 1 status to another status with one step. I think that going from
> New! to NotModified! requires DataModified! then NotModified! (check my
> facts though).
>
> Also, check to make sure there is only 1 row and none in the delete buffer
> as you expect....
>
> D
>
> (P.S. I didn't try to compile the above code, so there may be some syntax
> issues, but it should be a good start).
>
>
> ----- Original Message -----
> From: Dario Schmidt <mailto:[EMAIL PROTECTED]>
> To: Lista PFC <mailto:[EMAIL PROTECTED]>
> Sent: Tuesday, November 30, 1999 8:32 AM
> Subject: RE: PFCSIG SetItemStatus
>
> Hi Peter,
>
> My problem is:
>
> * Dw Update properties --> Key modification: Use delete then insert
> * I insert a new row (dw_x.insertrow(0)). The row's status is NewModified!
> * The user input values. If the database have a record with the values of
> the key columns, i retrieve this record and setitem the values of the nokey
> columns. The value of a nokey column is changed with setitem. In this
> situation, i need generate a Sql Update, not a Sql Insert. Then, i set the
> status of the row to Datamodified! and set the status of the key columns to
> NotModified!. Too, the status of the nokey columns is set to NotModified!,
> except one that is set to DataModified!
> * When i update the dw, this generate a sql Delete and then a sql Insert. I
> think that should be generate a Sql Update
> that update the only nokey column modified.
>
> Any ideas
>
> Thanks
>
> -----Mensaje original-----
> De: Peter Brawley < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >
> Para: Dario Schmidt < [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]> >
> CC: Lista PFC < [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >; Lista PB <
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> >
> Fecha: Mi�rcoles, 01 de Diciembre de 1999 03:09 a.m.
> Asunto: Re: PFCSIG SetItemStatus
>
> What am I missing? Use of update vs. delete/insert is set in the dw painter
> update properties, dlg and why change the status of a new row from newmod to
> datamod?
>
> Peter
>
> ----------------
>
> Dario Schmidt wrote:
>
> Hi, I am using PB 6.5, PFC and Sybase ASE 11.9.2. I have problems with
> SetItemStatus: 1) I insert a new row (status NewModified!)2) I modified the
> status of the row to DataModified!. The status of the key columns is set to
> NotModified!.3) When update the dw, this generate a Delete and then a
> Insert. I want to generate a Update. Any ideas.
>
> > [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> > A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE: help pfcsig
> > SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]
> [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE: help pfcsig
> SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]