相当于Delphi 2010 dbExpress 中的TUpdateSQL?

发布于 2024-08-09 07:44:40 字数 316 浏览 2 评论 0原文

我计划将 Delphi 6 BDE 应用程序迁移到 Delphi 2010...

  • 首先,我是否必须放弃 BDE? (我会,但如果可能的话,我更喜欢分阶段进行)

  • 第二,dbExpress 是最好的选择吗? (我使用的是MS SQL)

  • 最后,dbExpress 中是否有相当于 TUpdateSQL 的工具? (或其他任何东西)

我有很多代码从网格内更新只读查询(使用 TUpdateSQL 和 ApplyUpdate)。

请帮忙~~~

非常感谢。

I am planning to migrate a Delphi 6 BDE application to Delphi 2010...

  • First of all, do I have to move away from BDE? (I will but I prefer to do this in stages if possible)

  • Second, is dbExpress the best choice? (I am using MS SQL)

  • Lastly, is there an equivalent of TUpdateSQL in dbExpress? (or anything else)

I have a lot of codes updating readonly query from within a grid (using TUpdateSQL and ApplyUpdate).

Please help~~~

Thanks a lot.

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

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

发布评论

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

评论(4

世态炎凉 2024-08-16 07:44:41

1) 您绝对必须从 BDE 迁移到 DbExpress 。 BDE 是一种已过时且已弃用的技术。

您可以阅读这些文章

2) DbExpress 是比 BDE 更好的与 sql server 通信的替代方案,但是我更喜欢 ADO,因为它是 SQL Server 原生的。

3) dbExpress 没有类似于 TUpdateSQL 的组件,但是 Luxene 有一个 TDBXUpdateSQL,它是 dbExpress eXtension 组件的一部分。

您还可以检查InstantBDExpress是一个组件库,可以无缝迁移旧的BDE dbExpress 技术的应用程序)来自 ETHEA

再见。

1) You definitely have to migrate from BDE to DbExpress. BDE is an obsolete and deprecated technology.

You can read these articles

2) DbExpress is a better alternative than BDE to communicate with sql server, however I prefer ADO because is native for SQL Server.

3) dbExpress has no component similar to TUpdateSQL, however Luxene have a TDBXUpdateSQL wich is part from dbExpress eXtension components.

You can check also InstantBDExpress (is a component library that enables seamless migration of old BDE applications to the dbExpress technology) from ETHEA

Bye.

恰似旧人归 2024-08-16 07:44:41

在 TDataSetProvider 上有一个名为 BeforeUpdateRecord 的事件,这基本上是一种更手动的执行 TUpdateSQL 的方法,

您必须自己创建 SQL,然后更新它。(通过 TADOQuery 等..)

它如何具有相同的新旧基础知识TUpdateSQL sry 中的值

是 C++ 我不知道 dehpli 但我认为它基本上是相同的

DeltaDS->FieldByName("id")->NewValue;

,而且

DeltaDS->FieldByName("id")->OldValue;

你还必须进行设置

Applied = true;

,以便在你手动完成更新后它不会尝试进行更新

这里有几个链接应该有帮助
关于 BeforeUpdateRecord

(如果您需要)更多信息只需添加评论,我会回复您

On a TDataSetProvider there is a event called BeforeUpdateRecord which is basicly a more manual way of doing TUpdateSQL

you have to create the SQL your self and then update it.(via TADOQuery etc..)

how ever it has the same basics of old and new values which where in TUpdateSQL

sry this is c++ i don't know dehpli but it basicly the same i think

DeltaDS->FieldByName("id")->NewValue;

and

DeltaDS->FieldByName("id")->OldValue;

also you have to set

Applied = true;

so that it doesn't try to do the update after you have manually done it

here a few links which should help
About BeforeUpdateRecord

if you need any more info just add a comment and ill get back to you

喜爱纠缠 2024-08-16 07:44:41

使用 dbExpress 的 SQLQuery 组件,可以编写“查询”,例如,

update <table>
set value = :v1
where something = :v2

然后调用“execsql”方法来物理更新表。

Using the SQLQuery component of dbExpress, one can write 'queries' such as

update <table>
set value = :v1
where something = :v2

and then one calls the 'execsql' method to physically update the table.

情独悲 2024-08-16 07:44:41

使用 ClientDatasets 和提供程序,您可以将 TDatasetProvider 与通用 OnUpdateRecord(?,现在不记得确切的名称)处理程序一起使用,并使其使用
您在 TUpdateSQL 上使用的 sql。

只是一个想法,以防您无法使用第 3 方组件......

Using ClientDatasets and providers, you can use a TDatasetProvider with a generic OnUpdateRecord(?, don't remember the exact name now) handler and make it uses the
sqls you used on TUpdateSQL.

Just an idea, in the case you cannot use 3rd party components....

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