Discussion:
List of DAO error codes
(too old to reply)
Dale
2004-04-05 21:57:03 UTC
Permalink
Hi,

I have some flakiness going on with some code ... getting crytic ODBC
errors on the DAO Update method. I forgot to write the error number
down and can't seem to reproduce the error now. But I want to put some
error checking in and dump out the error code next time it happens. I
have searched and I don't know if I'm blind but I can't seem to find a
list of error codes and descriptions. Do you know where I can get a
list? Thanks.
Jim Carlock
2004-04-06 04:51:39 UTC
Permalink
I don't know if these are correct or where they got them from, but there
do seem to be references here and there that there are files that come
with Visual C++, ( dbdaoerr.h ?? ).

http://www.vb123.com/toolshed/01_bugs/access_errors.htm

Also, you can use the Err.Number, Err.Description to trap the errors
and get the friendly help information for each error number.

Use

Private Sub subProblemSub()
On Error Goto LocalErr
'...doing stuff
Exit Sub
LocalErr:
MsgBox "Error # " & CStr(Err.Number) & vbCrLf & Err.Description
Err.Clear
End Sub

Hope that helps.
--
Jim Carlock
http://www.microcosmotalk.com/
Post replies to the newsgroup.


"Dale" <***@hotmail.com> wrote in message news:%***@TK2MSFTNGP10.phx.gbl...
Hi,

I have some flakiness going on with some code ... getting crytic ODBC
errors on the DAO Update method. I forgot to write the error number
down and can't seem to reproduce the error now. But I want to put some
error checking in and dump out the error code next time it happens. I
have searched and I don't know if I'm blind but I can't seem to find a
list of error codes and descriptions. Do you know where I can get a
list? Thanks.
Dale
2004-04-06 16:01:56 UTC
Permalink
Thanks for your help Jim. I don't have Visual C++ but I'll go with your
other suggestions.
Post by Jim Carlock
I don't know if these are correct or where they got them from, but there
do seem to be references here and there that there are files that come
with Visual C++, ( dbdaoerr.h ?? ).
http://www.vb123.com/toolshed/01_bugs/access_errors.htm
Also, you can use the Err.Number, Err.Description to trap the errors
and get the friendly help information for each error number.
Use
Private Sub subProblemSub()
On Error Goto LocalErr
'...doing stuff
Exit Sub
MsgBox "Error # " & CStr(Err.Number) & vbCrLf & Err.Description
Err.Clear
End Sub
Hope that helps.
Jim Carlock
2004-04-06 16:41:21 UTC
Permalink
Dale,

You can use some VBA code I think such as:

Dim ErrType As DAO.Error
Dim sErrMsg As String
For Each errType in DAO.Errors
sErrMsg = sErrMsg & "Error Number: " & errType.Number & " " &
errType.Description & vbCrLf
Next errType

There seem to be three properties for DAO.Error type.

You'll can play around with that on how to throw it into a textbox
or richtextbox, or you can throw the information into a data table.
--
Jim Carlock
http://www.microcosmotalk.com/
Post replies to the newsgroup.


"Dale" <***@hotmail.com> wrote in message news:uo8ggB$***@TK2MSFTNGP10.phx.gbl...
Thanks for your help Jim. I don't have Visual C++ but I'll go with your
other suggestions.
Post by Jim Carlock
I don't know if these are correct or where they got them from, but there
do seem to be references here and there that there are files that come
with Visual C++, ( dbdaoerr.h ?? ).
http://www.vb123.com/toolshed/01_bugs/access_errors.htm
Also, you can use the Err.Number, Err.Description to trap the errors
and get the friendly help information for each error number.
Use
Private Sub subProblemSub()
On Error Goto LocalErr
'...doing stuff
Exit Sub
MsgBox "Error # " & CStr(Err.Number) & vbCrLf & Err.Description
Err.Clear
End Sub
Hope that helps.
Dale
2004-04-06 22:29:01 UTC
Permalink
Thanks a lot Jim
Post by Jim Carlock
Dale,
Dim ErrType As DAO.Error
Dim sErrMsg As String
For Each errType in DAO.Errors
sErrMsg = sErrMsg & "Error Number: " & errType.Number & " " &
errType.Description & vbCrLf
Next errType
There seem to be three properties for DAO.Error type.
You'll can play around with that on how to throw it into a textbox
or richtextbox, or you can throw the information into a data table.
Jay Vinton
2004-05-08 15:21:04 UTC
Permalink
If you have Access installed, search for JETERR40.CHM. You'll probably find it, and others, in Program Files\Common Files\Microsoft Shared\Office10\103

----- Dale wrote: ----

list of error codes and descriptions.
Dale
2004-05-10 23:16:44 UTC
Permalink
Thanks Jay, I'll take a look.
If you have Access installed, search for JETERR40.CHM. You'll probably find it, and others, in Program Files\Common Files\Microsoft Shared\Office10\1033
----- Dale wrote: -----
list of error codes and descriptions.
Loading...