I recently added a new Oracle table to our dictionary and am currently the only one that has access to it. When I attempt to edit a record I get the Error 89. This used to be fairly common when writing to any SQL database due to the way datetimes were stored. And, I suspect that is the cause of this issue; however, the last time I encountered it was probably 10 years ago and I can not recall what the fix was.
I have tried everything I can think of including hand-coding the form and putting WATCH on specific fields in an attempt to make it go away. Nothing worked… Does anyone remember what the cure for this error is?1
Thanks, in advance
Table:
GRIDDEDUCT FILE,DRIVER('Oracle',GloOraDriver),OWNER(GloOraOwner),NAME(GloGridDeductName),PRE(GRD),BINDABLE,THREAD
GRIDDEDUCT_PK KEY(GRD:PROD_LINE,GRD:PROD_STYLE,GRD:Operable,GRD:Surface,GRD:Orientation),NOCASE,PRIMARY
Record RECORD,PRE()
PROD_LINE STRING(2)
PROD_STYLE STRING(2)
Operable BYTE
Surface BYTE
Orientation BYTE
Deduct PDECIMAL(9,5)
CreatedBy STRING(3)
CreateDt STRING(8)
CreateGrp GROUP,OVER(CreateDt)
CreatedDate DATE
CreatedTime TIME
END
ModifiedBy STRING(3)
ModifyDt STRING(8)
ModifyGrp GROUP,OVER(ModifyDt)
ModifiedDate DATE
ModifiedTime TIME
END
END
END
PrepareProcedure code:
IF LocalRequest = InsertRecord
LocalResponse = RequestCompleted
DO PrimeFields
IF LocalResponse = RequestCancelled
DO ProcedureReturn
END
ELSIF LocalRequest = DeleteRecord
IF StandardWarning(Warn:StandardDelete) = Button:OK
LOOP
LocalResponse = RequestCancelled
SETCURSOR(Cursor:Wait)
DELETE(GRIDDEDUCT)
IF ERRORCODE()
SETCURSOR()
CASE StandardWarning(Warn:DeleteError)
OF Button:Yes
CYCLE
OF Button:No OROF Button:Cancel
BREAK
END
ELSE
SETCURSOR()
LocalResponse = RequestCompleted
END
BREAK
END
END
DO ProcedureReturn
ELSE
SAV::GRDPosition = POSITION(GRIDDEDUCT)
WATCH(GRIDDEDUCT)
REGET(GRIDDEDUCT, SAV::GRDPosition)
SAV::GRD:RECORD = GRD:RECORD
END
Code on OK Button:
CASE LocalRequest
OF InsertRecord
ADD(GRIDDEDUCT)
CASE ERRORCODE()
OF NoError
LocalResponse = RequestCompleted
POST(Event:CloseWindow)
OF DupKeyErr
IF DUPLICATE(GRD:GRIDDEDUCT_PK)
IF StandardWarning(Warn:DuplicateKey,'GRD:GRIDDEDUCT_PK')
SELECT(?GRD:PROD_LINE:Prompt)
CYCLE
END
END
ELSE
IF StandardWarning(Warn:InsertError)
SELECT(?GRD:PROD_LINE:Prompt)
CYCLE
END
END
OF ChangeRecord
LOOP
LocalResponse = RequestCancelled
SETCURSOR(Cursor:Wait)
RecordChanged = False
IF (SAV::GRD:Record <> GRD:Record)
RecordChanged = True
END
IF RecordChanged THEN
PUT(GRIDDEDUCT)
Update::Error = ERRORCODE()
ELSE
Update::Error = 0
END
if errorcode()
message('Clarion Error: ' & ERRORCODE() & ' - ' & ERROR() & '|' |
& ' Oracle Error: ' & FILEERRORCODE() & ' - ' & FILEERROR() & '||' |
& 'Any key to continue...', 'GRIDDEDUCT ERROR', ICON:Hand)
end
SETCURSOR()
IF Update::Error THEN
IF Update::Error = 1 THEN
CASE StandardWarning(Warn:UpdateError)
OF Button:Yes
CYCLE
OF Button:No
POST(Event:CloseWindow)
BREAK
END
END
DISPLAY
SELECT(?GRD:PROD_LINE:Prompt)
ELSE
IF RecordChanged
LocalResponse = RequestCompleted
END
POST(Event:CloseWindow)
END
BREAK
END
END