-
Nov 27th, 2000, 06:32 AM
#1
Thread Starter
Addicted Member
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
-
Nov 27th, 2000, 06:49 AM
#2
Hi kanejone,
can you tell us what you were doing when you got this error please?
-
Nov 27th, 2000, 07:02 AM
#3
Thread Starter
Addicted Member
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
-
Nov 27th, 2000, 07:09 AM
#4
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!)
-
Nov 28th, 2000, 06:58 AM
#5
Member
Trap it
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.
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
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.
A mind is like a parachute, it has to open to let it work
www.2beesoft.com for Icon Manager with over 20.000 free icons
VB6 Ent. SP4, ASP, W2000/W98
-
Nov 28th, 2000, 07:00 AM
#6
Member
Not complete
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]
A mind is like a parachute, it has to open to let it work
www.2beesoft.com for Icon Manager with over 20.000 free icons
VB6 Ent. SP4, ASP, W2000/W98
-
Nov 28th, 2000, 07:21 AM
#7
Thread Starter
Addicted Member
Thanks a lot for the feedback. It was really helpful.
Cheers
JK
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|