How Long Will Access 97 Work

D

David W. Fenton

I'm sure that your schema is badly designed, that wasn't the case
here.

Well, frack you.

<PLONK>

I recently encountered a question about updating the schema on
UtterAccess.com. It turned out it was a questionaire-type database,
and the developer was adding fields to tables as questions changed.
That is a typical schema error, and if it had been properly
designed, adding questions would not have required schema changes.
 
R

Rick Brandt

There are
significant differences between A97 and A2K that can cause many things
to break. The most obvious to me are that form references used in
queries need to be declared as parameters in A2K3 in order to be
resolved correctly, and that the order of event processing in A2K forms
and later is not the same as in A97 (which can lead to all sorts of
things breaking).

Can you provide details on these two issues? I have not encountered
either of them. Is the form reference thing only when using the
2002/2003 file format? I have lots of users running the 2000 file format
of apps developed in 97 and then converted, and I don't recall any issues
with queries.
 
D

David W. Fenton

Can you provide details on these two issues? I have not
encountered either of them. Is the form reference thing only when
using the 2002/2003 file format? I have lots of users running the
2000 file format of apps developed in 97 and then converted, and I
don't recall any issues with queries.

Well, you likely don't use form references in saved queries. I don't
any more, but about a year ago I converted an A97 app originally
dating from 1997 to Access 2003, and a query that got values for an
append query from controls on an unbound form failed to work. I
can't recall the exact circumstances, but it was returning Null
instead of the values of the controls. The result was pretty
disastrous, as it was in the Apply Payments module of a billing
application. The quick solution was to define the control references
as parameters, while the long-term solution was to write the SQL on
the fly, with all values resolved in code, but at the time I figured
out the bug, I needed a solution that was very quick to implement
and would involve the fewest changes, so I went with the parameters
until I had time to do it properly.

On the issue of order of events, I encountered this on a much more
recent conversion, an A97 app that also dates from 1997 that I
converted to A2K3 (A2K format, in this case). The biggest problem I
had was with a function I used to find out if a form is loaded as a
subform of a subform:

Public Function IsSubForm(frm As Form) As Boolean
On Error GoTo errHandler

IsSubForm = Len(frm.Parent.Name) > 0

exitRoutine:
Exit Function

errHandler:
Select Case err.Number
Case Is <> 2452
MsgBox err.Number & ": " & err.Description, _
vbExclamation, "Error in IsSubForm()"
End Select
Resume exitRoutine
End Function

This would error out when the app was closed with a really bad error
that was untrappable (it was happening at the point in the shutdown
of Access where COM had already been torn down to the point that
there was no automation server to handle it). I eventually had to
declare a global Boolean flag that gets set when the app is closing
so that in that context, this function skips from the beginning to
the exitRoutine. Unfortunately, under some circumstances, it still
occurs:

1. if the user force closes the app.

2. in some unspecified circumstances after who knows what sequence
of events (I was working at the client yesterday and encountered it
myself).

The problem comes from the order in which the subform in question is
unloaded in relation to other events that are happening in the
shutdown of Access. I have not yet tried to unload the subform
during the shutdown, but that may be the way to go.

There were also some other complications that I've forgotten, but
those were fixed by rewriting some old spaghetti code that I'd been
wanting to fix for a very long time, anyway.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top