如何通过 ODBC 获取 Access 中详细的 PostgreSQL 错误?

发布于 2024-07-26 09:20:23 字数 159 浏览 2 评论 0原文

使用 ODBC 接口驱动程序从命令行或 PG-Admin 等客户端运行查询时,有没有办法获取 PostgreSQL 显示的详细错误消息?

Access 中的 Err 对象只是告诉您出现了问题,但并不是很有帮助 - 我必须在 PG-Admin 中再次运行相同的查询才能查看问题出在哪里。

Is there a way to get the detailed error-messages PostgreSQL shows when running a query from command-line or a client like PG-Admin when using the ODBC-Interface-Driver?

The Err-object in Access just tells you that something went wrong but is not very helpful - I have to run the same query again in PG-Admin to see where the problem is.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

纵性 2024-08-02 09:20:23

傻我啊! 只需要遍历 Errors 对象...

Dim errX As DAO.Error
Dim strError As String

For Each errX In DAO.Errors
    strError = strError & "# >> " & errX.number & " | txt >> " & _
                errX.DESCRIPTION & Chr(10) & Chr(10)
Next errX 

Silly me! Just have to iterate through the Errors-object...

Dim errX As DAO.Error
Dim strError As String

For Each errX In DAO.Errors
    strError = strError & "# >> " & errX.number & " | txt >> " & _
                errX.DESCRIPTION & Chr(10) & Chr(10)
Next errX 
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文