Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RAISERROR

17 views
Skip to first unread message

Andro Dgebuadze

unread,
Jun 20, 2004, 2:30:20 AM6/20/04
to
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


Malcolm Cook

unread,
Jun 20, 2004, 4:05:06 AM6/20/04
to
Andro,

RAISERROR msgs will ony display to screen if severity level is greater than
10 (see
http://office.microsoft.com/assistance/preview.aspx?AssetID=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


--
Malcolm Cook - m...@stowers-institute.org
Database Applications Manager - Bioinformatics
Stowers Institute for Medical Research - Kansas City, MO USA


0 new messages