Kbase 16478: Workaround for Error 4114 When Cancel a SmartObject Add
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/05/1998 |
|
Workaround for Error 4114 When Cancel a SmartObject Add
PROBLEM
=======
When canceling the addition of record with SmartObjects
in the following situation error 4114 may occur:
A Smartwindow contains the following SmartObjects:
- SmartBrowser for customer table and the customer table
contains no records
- SmartViewer for customer table which is a record-target
of the SmartBrowser
- Update SmartPanel with is a tableio-source for the
SmartViewer
If the user chose add from the panel to add a record to
this empty table and then chooses cancel or undo (depending
on the update panel being used) to cancel the add, the following
error occurs:
"No query record is available. (4114)"
WORKAROUND
==========
The following code change to bstates.i, located in
DLC\SRC\ADM\TEMPLATE will resolve this problem:
In 8.1A:
Replace the following lines in the update-complete case:
IF RETURN-VALUE NE "YES":U THEN
DO:
GET CURRENT {&BROWSE-NAME}.
RUN dispatch ('row-changed':U).
END.
with the following:
IF NUM-RESULTS("{&BROWSE-NAME}":U) NE ? AND
NUM-RESULTS("{&BROWSE-NAME}":U) NE 0 THEN DO:
GET CURRENT {&BROWSE-NAME}.
RUN dispatch ('row-changed':U).
END.
In 8.0A02:
Replace the following lines in the update-complete case:
&IF DEFINED(TABLES-IN-QUERY-{&BROWSE-NAME}) <> 0 &THEN
GET CURRENT {&BROWSE-NAME}.
RUN dispatch ('row-changed':U).
&ENDIF
with the following:
IF NUM-RESULTS("{&BROWSE-NAME}":U) NE ? AND
NUM-RESULTS("{&BROWSE-NAME}":U) NE 0 THEN DO:
GET CURRENT {&BROWSE-NAME}.
RUN dispatch ('row-changed':U).
END.
When making a bug fix to the ADM code in this manner you should
follow certain guidelines to ensure an easier migration to later
releases of Progress. Refer to knowledgebase entries: 16167
Statement to Programmers on New Releases of ADM code and
15815 Modifying ADM support code.
Here are steps to make the above code change to bstates.i and
remain within these guidelines:
1) Create an ADM directory structure to place the code you
will modify. For example, the current structure of the ADM
source code directories is:
c:\DLC
\SRC
\ADM
\METHOD
\OBJECTS
\SAMPLES
\SUPPORT
\TEMPLATE
You would need to add the following directory structure:
c:\DLC
\MYDLC
\SRC
\ADM
\METHOD
\OBJECTS
\SAMPLES
\SUPPORT
\TEMPLATE
2) Put your custom directory before DLC in the propath
c:\MYDLC,c:\DLC
3) Make a COPY of \DLC\SRC\ADM\TEMPLATE\bstates.i and put it
into \MYDLC\SRC\ADM\TEMPLATE and modify this new copy.
4) Re-compile your SmartBrowser to get the changes to bstates.i.
5) When you upgrade to a new release of Progress compare the code
you have in c:\MYDLC to the new ADM code and make appropriate
modifications.
Progress Software Technical Support Note # 16478