IBDAC / UniDAC +碱基间 6 或 7 +名为“returning”的表字段

发布于 2024-09-13 21:22:05 字数 688 浏览 14 评论 0原文

我正在移植非常旧的代码来使用 UniDAC 组件。我遇到了一个特定的 UPDATE sql 更改名为“returning”的字段的问题。简单地将字段用引号括起来并不能解决问题,因为数据库中的 SQL 方言是 1,它不支持双引号字段分隔符。有没有办法在不改变领域的情况下解决这个问题?我使用的是delphi 7,并且正在远离interbase db 组件。

编辑:SQL如下:

update logger set
returning = :RETURNING
where locator = :LOCATOR

尝试准备时返回以下错误:

---------------------------
Ww
---------------------------

Dynamic SQL Error
SQL error code = -104
Token unknown - line 3, char -1
where.
---------------------------
OK   
---------------------------

即使我在代码中将客户端SQL方言设置为1,也会发生这种情况:

query1.Connection.SpecificOptions.Values['SQLDialect'] := '1';

I am porting REALLY old code to use the UniDAC components. I have hit a wall with a specific UPDATE sql that changes a field named "returning." Simply wrapping the field in quotes does not resolve the issue, because the SQL dialect in the database is 1, which does not support double quote field delimiters. Is there any way around this without changing the field? I am on delphi 7, and am moving away from the interbase db components.

Edit: SQL is as follows:

update logger set
returning = :RETURNING
where locator = :LOCATOR

returns the following error when trying to prepare:

---------------------------
Ww
---------------------------

Dynamic SQL Error
SQL error code = -104
Token unknown - line 3, char -1
where.
---------------------------
OK   
---------------------------

This occurs even when I set the client SQL dialect to 1 in code:

query1.Connection.SpecificOptions.Values['SQLDialect'] := '1';

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

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

发布评论

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

评论(2

段念尘 2024-09-20 21:22:05

我必须和开发商谈谈。它已经解决了某个问题,但我需要在执行查询之前删除查询中的所有参数。很奇怪,但它是一个解决方法:/

I had to talk to the developer. It has been addressed to a certain point, but I need to remove all parameters in the query before executing it. Very odd, but its a workaround :/

提赋 2024-09-20 21:22:05

您是否可以创建一个视图,使除此字段之外的所有内容保持不变,并在您的应用程序中使用该视图?

是否可以使用 Firebird < 的客户端 dll 来运行此应用程序? 2.1(例如1.5)和具有相同版本的服务器?

我认为这是由于新语法中返回是保留字!

Is it possible for you to create a view leaving everything the same except for this field and use that view in your application?

Is it possible to run this application with the client dll of a Firebird < 2.1 (1.5 for example) and a server with the same version?

I think this is due to the new syntax where returning is a reserved word!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文