ASP:多个人同时写入XML文件时遇到麻烦 [英] ASP: Having troubles with multiple people writing to XML file at the same time
问题描述
我有一个标准的ASP页面附加到xml页面。
目前如果有多个人试图追加到同一个
一次是XML文件。一个用户将有能力追加,而另一个用户b $ b用户将不会追加任何东西。
有没有办法避免这种情况发生?例如。让我们说用户
打开页面的缓存版本然后附加到实际文件。对于
某些原因,我记得读过类似的东西,但是不能再回想起来。
谢谢,
Kelly
I have a standard ASP page that appends to an xml page.
Currently if there is more than one person attempting to append to the same
XML file at a time. One user will have the ability to append, and the other
user will append nothing.
Is there a way to avoid this from happening? For example. Lets say the user
opens up a cached version of the page then append to the actual file. For
some reason I remember reading about something like that, but just can''t
recall.
Thanks,
Kelly
推荐答案
使用数据库!
Ray在家里
" Kelly Vernon" < KV @ ******&houston.rr.com GT;在消息中写道
新闻:0X ***************** @ tornado.texas.rr.com ...
Use a database!
Ray at home
"Kelly Vernon" <kv******@houston.rr.com> wrote in message
news:0X*****************@tornado.texas.rr.com...
我有一个标准的ASP页面附加到xml页面。
目前,如果有多个人试图一次附加到同一个XML文件。一个用户将有能力追加,而其他用户将不会追加任何内容。
有没有办法避免这种情况发生?例如。让我们说
用户打开页面的缓存版本然后附加到实际文件。
由于某种原因,我记得读过类似的东西,但只是
不记得。
谢谢,
凯莉
I have a standard ASP page that appends to an xml page.
Currently if there is more than one person attempting to append to the
same XML file at a time. One user will have the ability to append, and the
other user will append nothing.
Is there a way to avoid this from happening? For example. Lets say the
user opens up a cached version of the page then append to the actual file.
For some reason I remember reading about something like that, but just
can''t recall.
Thanks,
Kelly
我希望我们可以,但他们不允许那个选择。 :(
Kelly
Ray Costanzo [MVP]<<我在34号广告商店的名字>写在
消息新闻:%2 **************** @ tk2msftngp13.phx.gbl ...
I wish we could, but they didn''t allow that option. :(
Kelly
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:%2****************@tk2msftngp13.phx.gbl...
使用数据库!
<家里的雷
凯莉弗农< kv ****** @ houston.rr.com>在留言中写道
新闻:0X ***** ************ @ tornado.texas.rr.com ...
Use a database!
Ray at home
"Kelly Vernon" <kv******@houston.rr.com> wrote in message
news:0X*****************@tornado.texas.rr.com...
我有一个标准的ASP页面附加到xml页面。
有没有办法避免这种情况发生?例如。让我们说
用户打开页面的缓存版本然后附加到实际的
文件。出于某种原因,我记得读到类似的东西,但是不能回想起来。
谢谢,
凯莉
I have a standard ASP page that appends to an xml page.
Currently if there is more than one person attempting to append to the
same XML file at a time. One user will have the ability to append, and
the other user will append nothing.
Is there a way to avoid this from happening? For example. Lets say the
user opens up a cached version of the page then append to the actual
file. For some reason I remember reading about something like that, but
just can''t recall.
Thanks,
Kelly
Kelly Vernon写道:
Kelly Vernon wrote:
我有一个标准的ASP页面附加到xml页面。
目前,如果有多个人一次尝试附加到同一个
XML文件。一个用户将有能力追加,而另一个用户将不会追加任何东西。
有没有办法避免这种情况发生?例如。让我们说用户
打开页面的缓存版本然后附加到实际文件。由于某些原因,我记得读过类似的东西,但是不能回想起来。
I have a standard ASP page that appends to an xml page.
Currently if there is more than one person attempting to append to the same
XML file at a time. One user will have the ability to append, and the other
user will append nothing.
Is there a way to avoid this from happening? For example. Lets say the user
opens up a cached version of the page then append to the actual file. For
some reason I remember reading about something like that, but just can''t
recall.
通过要求序列化对文件的访问用户在更新
文件之前首先访问
应用程序对象(或特定的应用程序变量)。所以类似于:
....
Application.Lock
打开文件
追加数据>
关闭文件
Application.Unlock
....
Serialize access to the file by requiring the user to first access the
Application object (or a specific Application variable) before updating
the file. So something like:
....
Application.Lock
open file
append data
close file
Application.Unlock
....
这篇关于ASP:多个人同时写入XML文件时遇到麻烦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!