Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Runtime error 0

Posted on 2001-06-19
9
Medium Priority
?
1,750 Views
Last Modified: 2012-08-14
We are receiving runtime error 0 on some client machines when we deploy a new project for order entry.  The project installs on the client machines and runs fine through several forms until it comes to any form that uses S-grid - a grid control obtained from vbAccelerator.  

Can you please explain what runtime error 0 means so that we can correct our problem?

We are using VB 6 - SP5, Access 2000 and Windows 98.  The project in question is an order entry and inventory system.
0
Comment
Question by:patann
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 15

Expert Comment

by:ameba
ID: 6208362
You forgot "Exit Sub" or "Exit Function" before your error handler label.

Sub SomeSub()
    On Orror Go To EH
    ' .... some code
    Exit Sub                    <----- this line is missing

EH:
    MsgBox Err.Description
End Sub
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6208637
0 is not an error. If err.number <> 0 then you have an error.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6208640
Can you show some code?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 5

Expert Comment

by:ianouii
ID: 6208940
or u reset the err.number to 0 & u're handling the error yourself?

try to log down the error to a text file or escalate it out thru a msgbox.

good luck.
0
 

Author Comment

by:patann
ID: 6211174
Thanks for the help.  I am still working on the problem.

I did check to make sure there is an exit sub or exit function in conjunction with each error handling routine.

Since it works on some machines and not others, I believe the problem may be a Windows dll or ocx that is not loaded and/or registered on the machines where it does not work.

I have not yet had the opportunity to check it out with Norton CrashGuard to narrow the error location.

Thanks again for the help.  If I continue to have a problem, I will post some code for your scrutinity.
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 600 total points
ID: 6212015
There is no requirement (other than program logic) that you should have an Exit Sub or Exit Function prior to an Error handler.  This is not to say that there should not be one: normally there is, it just does not explain the Err.Number = 0

On the other hand what is probably happening is that an error is raised and the Error object is getting reset prior to displaying the value.  So the clue is in your error handler routine.  If you have something as follows in your error handler:

ErrHandler:
'Do something (for example call a function that logs the error)
Msgbox Err.Number  ' Probably 0

End Sub

Hope this helps,
Anthony
0
 

Author Comment

by:patann
ID: 6215837
We loaded mdac 2.5 on one of the Windows 98 machines that received the error 0, and it seemed to have solved the problem. We had narrowed it down to a Windows file that was missing on the machines having the problem since the exe file on all the machines were the same.  Now I will try loading mdac 2.5 on the other machines also and let you know the results.

By the way below is the code I use for error handling in my code.  The Public sub is in a public module since it is referenced from all the forms in the project.  The first snippet of code is repeated anywhere I trap errors.

ErrorHandler:
    Select Case Err.Number
        Case Else
            Call HandleUnexpectedError(Err.Number, Err.Description)
    End Select
    Resume ExitHere
End Sub

Public Sub HandleUnexpectedError(lngError As Long, strDescription As String)
    MsgBox "Error: " & strDescription & _
    " (" & lngError & ")"
End Sub

Thanks again for your input.  You started me on the right path.
Pat
0
 
LVL 15

Expert Comment

by:ameba
ID: 6215864
I'm glad it works - now, you can delete this question since you solved it yourself.
0
 

Author Comment

by:patann
ID: 6216212
Although the comment did not solve the problem, it pointed me in the right direction to solve it on my own.

Thanks, Pat
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question