I’m running the SQL update statement below using NotesSQL 3.02g and a Visual Basic EXE. The date I’m trying to change updates just fine, but a completely different field that I am not referencing is getting blanked out during the update. Any thoughts as to what may be causing this and how I may prevent it from happening? I’ve tried to re-write that field during the update, but I end up getting an Access Violation error.
Oddly enough, the data is still there in the field. When looking at that document in a view or on the form the information does not show, but if you open the document for editing the data shows up. Saving from there will return the data to it’s original state.
UPDATE PDP SET ReleaseDate = ‘" & vAnticipatedValue & "’ WHERE NoteUNID = ‘" & rs(“NoteUNID”) & "’ and PDPType = ‘Bug’ and escalationlevel <> ‘Closed’
Subject: NotesSQL update blanking out other field
What field is getten overwritten? Is it a field you’ve created on the form or a Notes internal field?
Is that other field a calculated field? If so, what’s it’s formula?
Ron
Subject: RE: NotesSQL update blanking out other field
The field being updated is ‘Editable’ and ‘Date/Time’
The field being overwritten is ‘Editable’ and ‘Dialogue List’. There is a ‘default’ formula of @If(ParentForm = “CTR”;Product;“”)
The value in the Editable/Dialogue List seems to be getting blanked out.
Subject: RE: NotesSQL update blanking out other field
When NotesSQL updates a field, it tells the document to recalculate itself before save so that any formulas that might get affected by the change get updated.
Wasn’t sure, was the formula you list the default formula of the ‘Dialogue List’ field? If so, it looks like this formula is checking the field ParentForm contains CTR? If it does, it should update the Dialogue List field with the information in the Product field. If ParentForm does not contain CTR, then Dialogue List would be blank.
Thing is, it could be any formula in the document that is causing this to happen (not just the formula in the Dialogue List field), so I would say you’ll need to go through them to figure out who is causing this. It most definitely is a formula problem tho…
Ron
Subject: RE: NotesSQL update blanking out other field
Thanks Ron!
It looks like we were able to resolve the issue. We were unaware of the recalculate through NotesSQL. There were formulas that were referencing different NSF databases. I’m assuming that since the ODBC connection only specifies one NSF that the others could not be referenced. We’ve changed the formulas so that they do not try to reference a different NSF when we run this update and all seems well now.