访问更新限制的变通方法 [英] Workarounds to Access update restrictions

查看:69
本文介绍了访问更新限制的变通方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


这些年来,我不得不继续处理相同的访问限制 -

你不能更新表中的表连接到另一个

不可更新的查询或使用不可更新的子查询。我一次又一次地碰到这个

的问题,但我从来没有想过单一的,通用的

解决方案。

我想知道其他人在这里做了什么。


选项我用过和不喜欢:

1.调用一个查询中的域查找功能 - 慢。

2.从不可更新的部分创建一个临时表 - 膨胀

数据库,或者需要使用复杂的代码临时数据库 - 要求

严格执行前端同一副本的一个实例,除非使用
临时数据库。

3。循环遍历代码中的一个记录集,构建一个In(...)列表以查询

other,并使用相同的排序顺序。循环遍历记录集

并行 - 杂乱,慢(虽然没有使用域函数那么慢)和

不适合大量更新。

解决方案

2003年11月17日星期一17:39:35 GMT,Steve Jorgensen

< no **** @ nospam.nospam>写道:


如果查询不能重写,我使用选项2.磁盘空间便宜。

-Tom。

大家好,

多年来,我不得不继续处理相同的访问限制 -
你不能更新表中的表,它将其连接到另一个不可更新的查询或使用不可更新的子查询。我一次又一次地遇到这个问题,但我从来没有想过一个单一的,通用的
解决方案。

我想知道其他什么这里有人在做。

我曾经使用和不喜欢的选项:
1。从查询中调用域查找功能 - 慢。
2。从不可更新的部分创建一个临时表 - 膨胀数据库,或者需要复杂的代码来使用临时数据库 - 需要严格执行前端相同副本的一个实例,除非<采用临时数据库。
3。循环遍历代码中的一个记录集,构建一个In(...)列表以查询
其他,并采用相同的排序顺序。并行循环记录集 - 凌乱,缓慢(虽然不像使用域函数那么慢)和
不适合大量更新。




no****@nospam.nosp am(Steve Jorgensen)写的

< ei ******************************** @ 4ax.com>:

这些年来,我不得不继续处理相同的Access
限制 - 你不能在声明中更新表格
将它连接到另一个非-updateable查询或使用
不可更新的子查询。我再次遇到这个问题并且再次,但我从来没有想过一个单一的,通用的
解决方案。

我想知道其他什么这里有人在做。

我曾经使用和不喜欢的选项:
1。从查询中调用域查找功能 - 慢。
2。从不可更新的部分创建临时表 -
膨胀数据库,或者需要复杂的代码来使用临时数据库 - 需要严格执行前面相同副本的一个
实例 - 除非使用临时数据库。
3。循环遍历代码中的一个记录集,构建一个In(...)
列表来查询另一个,并使用相同的排序顺序。通过记录集并行循环 - 凌乱,缓慢(尽管不像使用域函数那么慢)并且不适合大量的
更新。




不能相关的子查询有时会给你你需要的结果吗?


我几乎不需要这种为了持续的目的,

,因为我只使用Jet数据,我有DISTINCTROW

谓词可供我使用,它可以处理这些中的很多

情况。


我去临时表路线,这并不难维护,因为我只需要把b $ b tmp.mdb中的临时表永久存在于前端的同一个

文件夹中,永远都不会打扰它。它是b / b
在任何我曾经用这样构建的应用程序中都不是问题而且我已经这样做了至少5年。


-

David W. Fenton http://www.bway.net/~dfenton

dfenton at bway dot net http://www.bway.net/~dfassoc


On Tue,2003年11月18日03:23 :格林尼治标准时间32, dX********@bway.net.inva 盖子(大卫W.

Fenton)写道:


....


相关的子查询有时候不能给出你需要的结果吗?


仅当子查询可更新时。这个问题通常会出现

聚合。

我几乎不需要这种用于持续目的的东西,
因为我只与Jet数据,我有DISTINCTROW
谓词可供我使用,它可以解决很多这些情况。


嗯,我认为这不再是一个有意义的选择。我会看看它是否有任何
的影响。

我去临时表路线,这不是很难维护,因为我
只需将临时表放在tmp.mdb永久存放在与前端相同的文件夹中,永远不用费心去压缩它。它在任何我曾经建立的应用程序中都不是问题,而且我已经这样做了至少5年。



压缩可能没有必要,但如果我要去临时数据库的麻烦,我通常会一直走到模板中创建它/>
每次在系统Temp文件夹中使用随机名称。这样,如果

用户打开2份副本,或者如果系统管理员在终端

服务器上错误地安装它,它就不会是barf。


Hi all,

Over the years, I have had to keep dealing with the same Access restriction -
that you can''t update a table in a statement that joins it to another
non-updateable query or employs a non-updateable subquery. I run across this
problem again and again, and yet I''ve never come up with a single, universal
work-around.

I''m wondering what other people here are doing.

Options I''ve used and disliked:
1. Invoke a domain lookup function from within the query - slow.
2. Create a temporary table out of the non-updateable portion - bloats the
database, or requires complex code to employ a temporary database - requires
strict enforcement of only one instance of same copy of front-end unless
temporary database is employed.
3. Loop through one recordset in code, build an In(...) list to query the
other, and employ the same sort order. Loop through the recordsets in
parallel - messy, and slow (though not as slow as using domain functions) and
not good with large updates.

解决方案

On Mon, 17 Nov 2003 17:39:35 GMT, Steve Jorgensen
<no****@nospam.nospam> wrote:

If the query can''t be rewritten, I use option 2. Disk space is cheap.
-Tom.

Hi all,

Over the years, I have had to keep dealing with the same Access restriction -
that you can''t update a table in a statement that joins it to another
non-updateable query or employs a non-updateable subquery. I run across this
problem again and again, and yet I''ve never come up with a single, universal
work-around.

I''m wondering what other people here are doing.

Options I''ve used and disliked:
1. Invoke a domain lookup function from within the query - slow.
2. Create a temporary table out of the non-updateable portion - bloats the
database, or requires complex code to employ a temporary database - requires
strict enforcement of only one instance of same copy of front-end unless
temporary database is employed.
3. Loop through one recordset in code, build an In(...) list to query the
other, and employ the same sort order. Loop through the recordsets in
parallel - messy, and slow (though not as slow as using domain functions) and
not good with large updates.




no****@nospam.nospam (Steve Jorgensen) wrote in
<ei********************************@4ax.com>:

Over the years, I have had to keep dealing with the same Access
restriction - that you can''t update a table in a statement that
joins it to another non-updateable query or employs a
non-updateable subquery. I run across this problem again and
again, and yet I''ve never come up with a single, universal
work-around.

I''m wondering what other people here are doing.

Options I''ve used and disliked:
1. Invoke a domain lookup function from within the query - slow.
2. Create a temporary table out of the non-updateable portion -
bloats the database, or requires complex code to employ a
temporary database - requires strict enforcement of only one
instance of same copy of front-end unless temporary database is
employed.
3. Loop through one recordset in code, build an In(...)
list to query the other, and employ the same sort order. Loop
through the recordsets in parallel - messy, and slow (though not
as slow as using domain functions) and not good with large
updates.



Can''t correlated subqueries sometimes give you the results you
need?

I''ve hardly ever needed this kind of thing for an ongoing purpose,
and since I work only with Jet data, I have the DISTINCTROW
predicate available to me, which takes care of quite a few of these
circumstances.

I go the temp table route, which isn''t that hard to maintain, as I
just put the temp table in a tmp.mdb permanently living in the same
folder as the front end, and never bother to compact it, ever. It
has not been an issue in any app I''ve ever built like this and I''ve
been doing this for at least 5 years.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc


On Tue, 18 Nov 2003 03:23:32 GMT, dX********@bway.net.invalid (David W.
Fenton) wrote:

....


Can''t correlated subqueries sometimes give you the results you
need?
Only if the subquery is updateable. The issue usually comes up with
aggregates.
I''ve hardly ever needed this kind of thing for an ongoing purpose,
and since I work only with Jet data, I have the DISTINCTROW
predicate available to me, which takes care of quite a few of these
circumstances.
Hmm, I thought that was no longer a meaningful option. I''ll see if it has any
impact.
I go the temp table route, which isn''t that hard to maintain, as I
just put the temp table in a tmp.mdb permanently living in the same
folder as the front end, and never bother to compact it, ever. It
has not been an issue in any app I''ve ever built like this and I''ve
been doing this for at least 5 years.



The compacting may not be necessary, but if I''m going to go to the trouble of
a temporary database, I usually go all the way and create it from a template
each time using a random name in the system Temp folder. This way, if the
user opens 2 copies or if a sysadmin installs it incorrectly on a terminal
server, it won''t barf.


这篇关于访问更新限制的变通方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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