July 30, 2004 at 6:11 am
Is it possible to raise an error in the error log but prevent the error from being sent back to the client (Access).
I want for example to trap for unexpected errors when calling XP_SMTP_SENDMAIL but any other unexpected errors in the procedure should be returned to the client.
July 30, 2004 at 6:17 am
Hi Stefan,
http://www.sommarskog.se/error-handling-II.html
and
http://www.sommarskog.se/error-handling-I.html
might be worth reading.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
August 2, 2004 at 6:33 pm
What you really need here is client side error handling. Unfortunately, you're using Acess, so you're stuck with what it offers (plus the SQL error handling, which is not that great).
Option: use a different client. both c# and java use 'try..catch' blocks to handle errors.
Signature is NULL
August 12, 2004 at 6:53 am
in your button click write this
Dim cnn As ADODB.Connection
On Error GoTo Err_Command44_Click
'put your code of calling server here
Exit Sub
Err_Command44_Click: 'Access Errors
DoCmd.SetWarnings True
'MsgBox Error$
MsgBox " Error: " & Err.number & ", Description : " & Err.Description
Dim errADO As ADODB.Error
Dim MsgADO As String
For Each errADO In cnn.Errors
MsgADO = " Number: " & errADO.number
MsgADO = MsgADO & " Description: " & errADO.Description
MsgADO = MsgADO & " Source: " & errADO.Source
MsgADO = MsgADO & " NativeError: " & errADO.NativeError
MsgADO = MsgADO & " SQLState: " & errADO.SQLState
MsgBox MsgADO
Next
DoCmd.SetWarnings False
I hope this help u
Alamir Mohamed
Alamir_mohamed@yahoo.com
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply