At 08:26 AM 1/3/2003 +0000, Alastair Burr wrote:

In the mean time does anybody else who is having these crashes have any of
the following conditions:

Is the form that might be the cause one that is based on a temp table?
Do you have any "set" commands that are database linked but with no database
connected prior to calling the form? Or maybe ones that need the owner
password?
Do you have any other commands that return an error that you believe that
you can safely ignore prior to calling the form? Disconnect when there is no
db connected, for example.


Well Alastair.

I think, you are answering your own questions. And, let me see if I can help you
understand:

01. If the form is based on a TEMPORARY TABLE, you, as a programmer,
need to make sure that the related TEMPORARY table exist before
using the form.

TEMPORARY TABLES are disappeared when the database is
DISConnected.

You will need to create startup file to re-define those temporary tables.

02. Use CVAL('Database')) option to return a text string
containing the current connected database or NULL if
the user is not connected to a database. This can be
used to ensure that the user is connected before
trying to execute some code. The example below shows
how this might work.

SET VAR vDB = (CVAL('Database'))
IF vDB IS NULL THEN
CONN MyDB
ENDIF

SET VAR vDB = (CVAL('Database'))
IF vDB IS NULL THEN
PAUSE 2 USING 'MyDB is currently unavailable'
ENDIF

The check is repeated to ensure that the attempt to
connect to the database was successful before
continuing with the command file.

03. Make sure to pre-define all global variables used in forms with
appropriate data type.

04. Use ENTER USING FormName or EDIT USING FormName at
the R> prompt to make sure they work.

05. Make sure to SET MESSAGES ON and SET ERROR MESSAGES ON
while testing and debugging your forms, reports, command files, etc.

06. Use TRACE to narrow down the problem, if any, in your code.

07. If you are using any bit map buttons on form, make sure to use BMP.
(works better in 6.5++ for Windows)

Of course, 7.0 supports ALL kinds of buttons and graphics, including
maps and GPS coordinates.

Hope that helps!

Very Best Regards,

Razzak.

Reply via email to