简体   繁体   English

IBDAC / UniDAC + Interbase 6或7 +一个名为“ returning”的表字段

[英]IBDAC / UniDAC + interbase 6 or 7 + a table field named “returning”

I am porting REALLY old code to use the UniDAC components. 我正在移植真正的旧代码以使用UniDAC组件。 I have hit a wall with a specific UPDATE sql that changes a field named "returning." 我碰到了一个特定的UPDATE sql,它更改了一个名为“ 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. 简单地将字段用引号引起来并不能解决问题,因为数据库中的SQL方言是1,它不支持双引号字段定界符。 Is there any way around this without changing the field? 在不改变领域的情况下有什么办法吗? I am on delphi 7, and am moving away from the interbase db components. 我在delphi 7上,并且正在远离interbase db组件。

Edit : SQL is as follows: 编辑 :SQL如下:

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: 即使在代码中将客户端SQL方言设置为1时,也会发生这种情况:

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

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 :/ 很奇怪,但是它是一种解决方法:/

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

I think this is due to the new syntax where returning is a reserved word! 我认为这是由于新的语法所致,其中return是保留字!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM