Informix 4GL - WinWord 7.0
Posted in 1997
Topics: Stored Procedures & SPL, Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL, Data Types & Schema Design
Version: Informix Online 7.13.UC1
Informix 4GL For Windows (Development Tool)
Microsoft WinWord 7.0 on Win95
Data Type: Byte Field
Problem: DB Crashes During Save
Details:
The databases goes down once in a while i.e. not on every save or
modifications to the document. There were no helpful database error
messages except for "Online must abort. Action: reinitialise shared
memory, rsinit.c line 9185, thread 41, process id 20029, bus error, panic
attempting to bring system down".
WinWord is invoked by a system call via a MS-DOS batch file. The batch
file closes the DOS window upon exit from WinWord. A batch file is used
because the 4GL application could not detect the exit signal directly from
WinWord.
Do not know where the problem lies (backend or frontend)? Can provide
further source code if required.
Can anybody offer some suggestion?
SAMPLE:
function new_brpt(rpt_num)
define
rpt_num smallint,
formname char(40),
buf char(60),
DiagDocFile char(40)
let DiagDocFile = FullLocalPath("diag.doc")
...
locate mr_brpt.diag in file DiagDocFile
initialize mr_brpt.diag to null
locate mr_brpt.diag in file DiagDocFile
open window w_newbrpt at 1,1 with 24 rows, 80 columns
let formname = FullBinPath("new_brp1")
open form new_brp1 from formname
display form new_brp1
let int_flag=false
...
input by name mr_brpt.* without defaults
on key (F5)
if infield(diag) then
call WinWord(DiagDocFile)
end if
...
end input
if int_flag then
let int_flag=false
message "Input cancelled" attribute (red)
sleep 1
else
whenever error continue
locate mr_brpt.diag in file DiagDocFile
insert into b_report values (mr_brpt.*)
whenever error stop
if status < 0 then
error status using "-<<<<<<<<<<",
": Unable to save biopsy report in database."
sleep 2
else
message "Biopsy report added to database" attribute (red)
sleep 1
end if
end if
return
end function -- new_brpt
function WinWord(Filename)
-- call the winword to edit a file
define
Filename char(60),
buf char(100)
let buf = WinwordPath clipped, " ", Filename clipped
run buf
end function
--
EMCheah
cheahem@jnesw.com.sg