RAISERROR

  • Thread starter Thread starter Andro Dgebuadze
  • Start date Start date
A

Andro Dgebuadze

My adp file sometime shows error message indicated in RAISERROR command of
my Trigger, and sometimes not.
What is the problem and how can I correct it?

Thanks

Andro
 
Andro,

RAISERROR msgs will ony display to screen if severity level is greater than
10 (see
http://office.microsoft.com/assista...ID=HP030854151033&CTT=4&Origin=CH063655151033)

To demonstrate this to yourself, paste these into your immediate window:

APPLICATION.CurrentProject.AccessConnection.Execute "raiserror('This wont
raise an error', 10, 1)"

APPLICATION.CurrentProject.AccessConnection.Execute "raiserror('This WILL
raise an error', 11, 1)"


..
So make sure they all are 11 or more.

16 is used by most as customary value for some reason


I'm using ACC2002 - and you?


And THERE is NO WAY to get RAISERROR msgs with severity level less than 11.
Somewhere I read that even though they are not printed the will be in
APPLICATION.CurrentProject.AccessConnection.errors collection. They are
not.

Also, on the topic, PRINT statements are not trapped by access. Viz:

APPLICATION.CurrentProject.AccessConnection.execute "print('hello')"



Nothing happens.



Too bad.



Maybe next release?



Cheers
 
Back
Top