我可以向IBDataset添加额外的参数吗 [英] Can i add extra parameters to an IBDataset

查看:75
本文介绍了我可以向IBDataset添加额外的参数吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以向IBDataset添加额外的参数。
我想为插入sql中添加一些额外的值,用于选择sql中不存在的字段。

Is it possible to add extra params to an IBDataset. I would like to add a couple of extra values to the insert sql for fields that don't exist in the select sql.

我不认为Delphi支持此功能,但我想知道是否有人有任何独特的解决方法。

I don't think Delphi supports this, but i wondered if anyone had any unique workarounds.

推荐答案

您可以手动应用插入 。例如,如果您具有以下selectSQL:

You can apply the insert manually. For example if you have this selectSQL:

select somefield
  from sometable

您可以编写一个OnUpdateRecord事件处理程序,并手动 ukInsert 这种更新,使用插入查询,例如:

You can write a OnUpdateRecord event handler and do it manually for the ukInsert kind of update, using a insert query like:

insert into sometable (somefield, someotherfield)
values (:somefield, :someotherfield)

应用插入后,设置 uaApplied 值作为UpdateAction变量参数。

After you applied the insert, you set the uaApplied value for the UpdateAction var parameter.

这篇关于我可以向IBDataset添加额外的参数吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆