By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,188 Members | 844 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,188 IT Pros & Developers. It's quick & easy.

IT

P: n/a
Hi im trying to have the same file open in access on two different
pc's. So that when the users input data on one it well update the file
so it well show up on the other pc and vaice verse.

can any one PLEASE HELP ME!!!
thank you

Michael
mi*****@phonesbyasap.com

Sep 15 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
nazrth8591 wrote:
Hi im trying to have the same file open in access on two different
pc's. So that when the users input data on one it well update the file
so it well show up on the other pc and vaice verse.
Trivially replace your Access interfaces with Ruby on Rails, running on a
lite web server.

(And because this newsgroup doesn't discuss Access databases, I'm allowed to
recommend that! This group is only qualified to discuss raw C++ itself. Try
an Access newsgroup!)

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
Sep 15 '06 #2

P: n/a
na********@gmail.com wrote:
Hi im trying to have the same file open in access on two different
pc's. So that when the users input data on one it well update the
file so it well show up on the other pc and vaice verse.

can any one PLEASE HELP ME!!!
I don't think it's a language problem. If your PCs run the operating
systems that allow networking, you should be able to specify the
location of the same file on each of them (it could reside on one of
the systems or on an independent server altogether). The fact that
access to that file has to be _shared_ has nothing to do with the
language. It is achieved through operating system mechanisms, that's
why you need to ask in the newsgroup dedicated to your OS.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Sep 16 '06 #3

P: n/a
On Sat, 16 Sep 2006 11:21:01 -0400, "Victor Bazarov"
<v.********@comAcast.netwrote:
>na********@gmail.com wrote:
>Hi im trying to have the same file open in access on two different
pc's. So that when the users input data on one it well update the
file so it well show up on the other pc and vaice verse.

I don't think it's a language problem. If your PCs run the operating
systems that allow networking, you should be able to specify the
location of the same file on each of them (it could reside on one of
the systems or on an independent server altogether). The fact that
access to that file has to be _shared_ has nothing to do with the
language. It is achieved through operating system mechanisms, that's
why you need to ask in the newsgroup dedicated to your OS.
It's more a design than an OS problem. The challenge is to ensure that
at the same time only one process accesses the file. It's tedious but
it can (almost) be done in C++ with a lock file. The sketch of a
soulution is presented here:
http://www.informit.com/guides/conte...eqNum=144&rl=1
.. The solution is incomplete because it doesn't address "if a process
that holds the lock terminates before releasing it".
I have implemented something similar but would not recommend it.
Better use other 'collaborative' protocols (eg. each process writes to
its own file which can be read (but not modified) by all other
processes).

Best regards,
Roland Pibinger
Sep 17 '06 #4

P: n/a

Roland Pibinger wrote:
On Sat, 16 Sep 2006 11:21:01 -0400, "Victor Bazarov"
<v.********@comAcast.netwrote:
na********@gmail.com wrote:
Hi im trying to have the same file open in access on two different
pc's. So that when the users input data on one it well update the
file so it well show up on the other pc and vaice verse.
It's more a design than an OS problem. The challenge is to ensure that
at the same time only one process accesses the file. It's tedious but
it can (almost) be done in C++ with a lock file. The sketch of a
soulution is presented here:
http://www.informit.com/guides/conte...eqNum=144&rl=1
. The solution is incomplete because it doesn't address "if a process
that holds the lock terminates before releasing it".
Well, that's easily added? Make a global of class type and have the
dtor clean
up. Of course, in the presence of UB that might not work. In the
presence of
UB, *any* C++ construct may fail, so I don't consider it a on-topic
objection.

HTH,
Michiel Salters

Sep 18 '06 #5

P: n/a
On 18 Sep 2006 05:15:54 -0700, Mi*************@tomtom.com wrote:
>Roland Pibinger wrote:
>it can (almost) be done in C++ with a lock file. The sketch of a
soulution is presented here:
http://www.informit.com/guides/conte...eqNum=144&rl=1
. The solution is incomplete because it doesn't address "if a process
that holds the lock terminates before releasing it".

Well, that's easily added? Make a global of class type and have the
dtor clean up. Of course, in the presence of UB that might not work. In the
presence of UB, *any* C++ construct may fail, so I don't consider it a
on-topic objection.
When the process that holds the lock file is terminated unexpectedly
someone has to clean up the situation, ie. programmatically, another
process must delete the lock file and create its own. So the lock file
needs to expire after some time. Then several processes simultanously
try to delete and recreate the lock file. In order to avoid any race
condition a process must create a lock file for the expired lock file
before it can safely delete and recreate it. A 100% safe solution is
not that easy ...
BTW, not only 'UB' can terminate a process. Some operating systems
'freeze' at times or the electric power is simply turned off
inadvertently.

Best wishes,
Roland Pibinger
Sep 18 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.