What causes this error? “Runtime error 380: Invalid property value”

前端 未结 13 1868
野的像风
野的像风 2020-12-18 00:21

we had developed an application using vb6.0 and SQL server 2000 a few years ago. recently, some of our customers tell us that while running the application, on some of comp

13条回答
  •  甜味超标
    2020-12-18 01:02

    What causes runtime error 380? Attempting to set a property of an object or control to a value that is not allowed. Look through the code that runs when your search form loads (Form_Load etc.) for any code that sets a property to something that depends on runtime values.

    My other advice is to add some error handling and some logging to track down the exact line that is causing the error.

    • Logging Sprinkle statements through the code that say "Got to X", "Got to Y", etc. Use these to find the exact location of the error. You can write to a text file or the event log or use OutputDebugString.
    • Error handling Here's how to get a stack trace for the error. Add an error handler to every routine that might be involved, like this code below. The essential free tool MZTools can do this automatically. You could also use Erl to report line numbers and find the exact line - MZTools can automatically put in line numbers for you.

    _

     On Error Goto Handler
          
     Handler: 
       Err.Raise Err.Number, "(function_name)->" & Err.source, Err.Description 
    

提交回复
热议问题