runtime error 216(100分)

  • 主题发起人 主题发起人 cee
  • 开始时间 开始时间
C

cee

Unregistered / Unconfirmed
GUEST, unregistred user!
在我写过的很多Delphi程序中(当然多是小玩意啦),遇到过几次runtime error 216错误。单击
这个错误消息框,又会跳出一个,有时连关几十个也关不掉。

这个错误很蹊跷,很难找到它的原因。一般说来,好象是当程序出错时容易发生。比如今天我写
了一个用了BDE、SQL-LINK操作远程ORACLE数据库的小东西,用Install Shield制作安装程序时,
忘记了选“SQL-LINK”项,安装到别的机器上时就出现了这个错误。

还有一例是最初我写光盘大管家时,有个别网友反映有同样错误信息出现。但是也不是每台电脑
上都会有。好象很偶然,但又难以找到它。

我有理由相信一定有不少朋友也有同样的经历。请告诉我怎样对付。
 
runtime error问题确实很令人头疼,
出现的原因也多种多样,
不过我认为主要原因是编写的程序与Delphi的动态联结库产生冲突,
或者调用了错误的动态联结库。
要想避免这类错误,必须了解Delphi的内部运行机制,
同时在编程时尽量避免此类错误的发生,
相信使用Delphi时间长了,此类错误发生的几率就会小的多!
祝你好运!
 
好大的可能是出在控件上,你是不是用了第三方控件呀
 
懒着翻译了俺要吃饭了.

Runtime errors

Runtime errors occur when your program contains valid statements,
but the statements cause errors when they are executed. For example,
your program might try to open a nonexistent file,
or it might try to divide a number by zero.
The operating system detects runtime errors and stops program execution when they occur.
Using the debugger, you can run to a specific program location. From there,
you can execute your program one statement at a time,
watching the behavior of your program with each step.
When you execute the statement that causes your program to fail,
you can fix the source code, recompile the program, and resume testing.


&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
Certain errors at runtime cause the program to display an error message and terminate:

Runtime error nnn at xxxxxxxx

where nnn is the runtime error number,
and xxxxxxxx is the runtime error address.

Delphi applications that use the SysUtils unit map most runtime errors to Exceptions,
which enable your application to resolve the error without terminating.
This is called "exception handling".

The runtime errors are divided into three categories:

I/O errors, numbered 100 through 149
fatal errors, numbered 200 through 255
Operating system errors
 
请继续或结束
 
多人接受答案了。
 
后退
顶部