gpt4 book ai didi

sql-server - EDBEngineError 'table is readonly'

转载 作者:行者123 更新时间:2023-12-03 18:43:09 27 4
gpt4 key购买 nike

我有 3 TQueries : qy_master, qy_detail, qy_detail2 , 大师 qy_detail2qy_detail , 大师 qy_detailqy_Master ,所有查询都有相应的数据源,我将查询放在数据模块中,当数据模块创建时我激活了这些查询。

在另一种形式中,我在尝试 'qy_detail.open' 时使用了这些查询。它说'EDbengine error : Tables is read-only'但是打开时没问题qy_detail ,我没有修改SQL语句,但是不知道为什么会出现这个错误。

我也试过 qy_detail.Active := True ;该语句也会引发错误,

我使用通过 BDE 和 ODBC 数据源连接的 SQL Server 2005。

请任何人帮我解决这个问题。

最佳答案

你设置了 TQuery.RequestLive = true 吗? RequestLive 默认为 False,强制查询始终作为只读结果集返回。

来自 documentation :

A TQuery can return two kinds of result sets: "live" as with TTable component (users can edit data with data controls, and when a call to Post occurs changes are sent to database), "read only" for display purposes only. To request a live result set, set a query component's RequestLive property to True...

关于sql-server - EDBEngineError 'table is readonly',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8396016/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com