At 05:41 PM 5/17/2005, Damian Voigt wrote:
If the user enters the wrong user identifier, when I issue the connect
statement the message -ERROR- The current user identifier will not allow
access to any table. (2318). I can turn the error message off. What I
want to do is suppress the dialog box that follows so that I can present
my form again.
Damian,
How about:
01. Suppress the -ERROR- Message using:
SET ERROR MESSAGE 2318 OFF
-- do your stuff here ...
02. Check the database status using the (CVAL('DATABASE')) function as
following:
Example:
IF(CVAL('DATABASE')) <> 'dbname' OR (CVAL('DATABASE')) IS NULL THEN
-- bring up your dialog box again ..
ENDIF
SET ERROR MESSAGE 2318 ON
Hope that gives you some ideas!
Very Best R:egards,
Razzak.