我在前段时间在某个地方见过这个,但我现在找不到它。

我记得某些组件(Tsqldataset,tdatasetprovider,tclientdatasetet,tclientdataset或else)中的一个错误事件之一将给我一个由数据库服务器本身返回的错误消息,但我无法回忆起它。

有人知道我在说什么吗?

提前感谢。

有帮助吗?

解决方案

TClientDataSet.OnReconcileError contains a parameter of type EReconcileError which includes the error message, context and code. This data contains the message from the database server.

其他提示

Of course EReconcileError only helps if that is the particular type of database error you have. For all errors first look at the E.Messaage string, which gives you a description of the problem. Not always the same as the exact server text i think - it dpends also which database driver you are using - I am more familiar with the TMySQLConnection, but it's still a DBExpress driver... Chris

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top