Hi guys
I'm getting an error with a number of 8004oe14. Can someone plese tell me how to write an error trap for this error number.
Thanks a lot
JK
Printable View
Hi guys
I'm getting an error with a number of 8004oe14. Can someone plese tell me how to write an error trap for this error number.
Thanks a lot
JK
Hi kanejone,
can you tell us what you were doing when you got this error please?
Hi alex_read
What I'm doing is trying to connect to a database. The problem is that I am importing data from text files. I have about 50,000 files and there are some duplicates of file names but the data in the files are all different. So what I am trying do is figure a way around this. Any suggestions would be really helpful!!!
Thanks
JK
I looked on MSDN for this, and there was a similar code for an ADO error. You could try the site I was pointed to if you are using ADO :
http://www.msdn.microsoft.com/librar..._adorosest.htm
Otherwise, can you post your code here & we can see if we can help (if you are using DAO or SQL I may be able to help, if it's ADO, post anyway & someone else will look at this and help - please guys!)
I use this standard code for Error trapping. If there's a description kown you'll get it from VB. ADO error descriptions are much better these days.
Handle Errors according to their Error numbers with a Case statement. This prevents your application from shutting down and it will give you more feedback on errors to handle them.Code:Private sub Whatever()
On Error Goto WhatEH
'do you stuff here
Exit Sub
WhatEH:
Screen.MousePointer = vbNormal
Select Case Err.Number
Case Else
Call ProcError(Err.Number, Err.Source, Err.Description)
End Select
Err.Clear
Resume Next
End Sub
Sorry,
Of course you don't have the procError function, but just use a msgbox instead like this:
[code]
gvDummy = MsgBox("Error Nr. " & Err.Number & " in " & Err.Source & Chr(13) & Err.Description & Chr(13) & Chr(13) & "Unexpected error.", vbCritical, "Error")
[\code]
Thanks a lot for the feedback. It was really helpful.
Cheers
JK