Board index » cppbuilder » Using Access database in a network with ADO

Using Access database in a network with ADO


2007-11-26 03:00:32 AM
cppbuilder63
Hi,
I wrote an ADO application that use a MS Access database. I'd like to
use it in a LAN where there are 2-3 computers on which run my
application that use the same database.
I've seen that when one of this application write on db, the others
applications don't see any modification of data. My goal is that all
applications must have the same view on db at the same time.
I use a TAdoConnection component that is connected with database and
TAdoTable and TAdoQuery components that are connected with AdoConnection.
How can solve this?
Thanks
Mario Sernicola
 
 

Re:Using Access database in a network with ADO

I may be wrong, but you may have to force a refresh peridoically, this may
even need to be a close / open of the dataset if it is to pick up changes by
other users. It really isn't suitable for multi-user work in my opinion!
"Mario Sernicola" < XXXX@XXXXX.COM >wrote in message
Quote
Hi,

I wrote an ADO application that use a MS Access database. I'd like to use
it in a LAN where there are 2-3 computers on which run my application that
use the same database.

I've seen that when one of this application write on db, the others
applications don't see any modification of data. My goal is that all
applications must have the same view on db at the same time.

I use a TAdoConnection component that is connected with database and
TAdoTable and TAdoQuery components that are connected with AdoConnection.

How can solve this?

Thanks

Mario Sernicola
 

Re:Using Access database in a network with ADO

Is there a solution in order to work in multi-user mode?
I think is a problem due to the cache of the TAdoTable and TAdoQuery
components.
Mario Sernicola
Mark Richards wrote:
Quote
I may be wrong, but you may have to force a refresh peridoically, this may
even need to be a close / open of the dataset if it is to pick up changes by
other users. It really isn't suitable for multi-user work in my opinion!
"Mario Sernicola" < XXXX@XXXXX.COM >wrote in message
news:4749c64f$ XXXX@XXXXX.COM ...
>Hi,
>
>I wrote an ADO application that use a MS Access database. I'd like to use
>it in a LAN where there are 2-3 computers on which run my application that
>use the same database.
>
>I've seen that when one of this application write on db, the others
>applications don't see any modification of data. My goal is that all
>applications must have the same view on db at the same time.
>
>I use a TAdoConnection component that is connected with database and
>TAdoTable and TAdoQuery components that are connected with AdoConnection.
>
>How can solve this?
>
>Thanks
>
>Mario Sernicola


 

{smallsort}

Re:Using Access database in a network with ADO

One method is to set up a timer to peridoically flush any changes, close the
connection and then open it again.
A second method, and one which I use myself is every time a user selects to
do a new task in your application, for example if they change to a secondary
screen, or select an option from a menu, then the first cause of action
could be to flush any buffers, close the database connection, open it and
then launch the action the user has selected. This would ensure the changes
up to that point made by other users are displayed or calculated correctly.
hope that helps
 

Re:Using Access database in a network with ADO

How can I do in order to "flush any buffers, close the database
connection, open it"? Which are the methods?
Mark Richards wrote:
Quote
One method is to set up a timer to peridoically flush any changes, close the
connection and then open it again.

A second method, and one which I use myself is every time a user selects to
do a new task in your application, for example if they change to a secondary
screen, or select an option from a menu, then the first cause of action
could be to flush any buffers, close the database connection, open it and
then launch the action the user has selected. This would ensure the changes
up to that point made by other users are displayed or calculated correctly.

hope that helps