
two major problems in VB4
HELP!
Our environment is: WFW3.11, VB4, DOS 6.22 running on 486DX100s, 16mb
ram,
400+mb free disk space, 800x600 SVGA, 65kcolor.
We have an application that consists of a main GUI for the users (EAMS)
and three background processes (Scheduler, Manager and Interface). EAMS
starts all three applications and communicates with them via class
declarations.
FIRST Problem:
If either Scheduler or Interface crashes, it will immediately cause the
other to crash, then Manager crashes, then EAMS hangs with an OLE
Automation Error and we have to reboot. This happens consistently and
always in this order. Scheduler, Manager and Interface do not
communicate with each other, only with EAMS. The GPFs almost always
occurs in DAO2516, although we have seen occasional other modules named
as the culprit.
From reading the manuals, it appears that each module opens it's own
copy of DAO2516 (ie, non-reentrant). Why should a blowout in one cause
immediate, similar blowouts in the others?
We have a similar problem when running the modules in VB mode for
debugging. When we terminate all processes and close VB (it doesn't
matter which one we close first), it almost always gives a GPF in VBA2
and sure enough, so will all the others. If the first one does not
error out, the others won't, either.
SECOND Problem:
The following chunk of code exists in a timer routine that executes
every
three seconds. It has run with no hitches at all until we did like
Microsoft suggested and added DbEngine.Idle DbFreeLocks after all seeks,
finds, and recordset opens. Now it runs until we complete a packaging
sequence, at which time the marked line gives an error of Invalid
Database Object. At no point in the code is the database (SDB) changed
in any way. We open it in Sub Main when the app starts and close it
when a shutdown message is received from EAMS. Once we remove the Idle
statements, everything works OK.
If DatabasesOpen Then
' refresh sysfile to see if any changes were made
Set DsSysFile = SDB.OpenRecordset("select * from Sysfile",
dbOpenDynaset)
' get the max number of envelopes per medtote
'If DsSysFile!Envfilled = 0 Then
If Not gbEnvPerPat Then
' one order per envelope
MaxEnvs = DsSysFile!MaxEnvsIfMed <==== ERROR
OCCURS HERE
Else
MaxEnvs = DsSysFile!MaxEnvsIfPat
End If
End If
' get max pills per envelope and maxorders per envelope in case they
have
' changed as well
MaxOrdersPerEnvelope = DsSysFile!maxordersenv
MaxPillsPerEnvelope = DsSysFile!maxpillsenv
' if we are waiting on a dump cartridge command, look to see if
authorization
' is needed. if not, do the dump, otherwise exit
If DsSysFile!needtodumpcartridges Then
If DsSysFile!NeedAuthorization Then
frmManager.Caption = AppName & " - Waiting for
Authorization"
If RunInProgress And Not PauseInProgress Then
PauseInProgress = True
SelectedRunId = CurrentRunId
Call UpdateDisplay("Pausing")
cmdPause.Caption = "&Resume"
cmdPause.Enabled = False
End If
Exit Sub
Else
Call LookForZeroContainers
On Error GoTo syserror
If StartUp And Successful Then
DsSysFile.LockEdits = True
DsSysFile.Edit
DsSysFile!needtodumpcartridges = False
DsSysFile.Update
DsSysFile.LockEdits = False
On Error GoTo 0
frmManager.Caption = AppName
End If
End If
End If
We're very frustrated, as you might imagine. Has anyone had similar
problems
and, if so, what did you do to get around them?
Thanks in advance!