QPSQL + QSqlQuery 准备失败
再次大家好:)我目睹了一种奇怪的行为。
当我这样做时,
if (!physical_query.prepare("CREATE USER sensei")) { ... }
它无法自行准备。但是当查询是 SELECT 时(例如),一切正常。 我构建的QPSQL驱动程序是针对Postgre 9.0.6的,现在安装的数据库也是9.0.6。但较新的版本。也许不同的dll有问题?或者我应该重建驱动程序?
谢谢。
Hello again :) I'm witnessing a strange behaviour.
When I do this
if (!physical_query.prepare("CREATE USER sensei")) { ... }
The it cannot prepare itself. But when the query is SELECT (for example) everything is ok.
The QPSQL driver I built was for Postgre 9.0.6, and now the installed db is also 9.0.6. but a newer version. Maybe different dlls are the problem? Or should I rebuild the driver?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
即使在 SQL 级别,也无法准备诸如“CREATE USER”之类的 DDL 语句:
DDL statements such as "CREATE USER" can't be prepared, even at the SQL level: