Multiuser environment

C

Chris

Hi,
I am using SQL2000 and Access2000 .adp file. My
application will need to be distributed to several people
in our organisation and they will need to update the data
concurrently.

I set up a simple test .adp file. And put a copy into 2
directories named user1ADP and User2ADP.
I logged onto the network as user1 on 1 workstation and
opened the user1ADP file. I logged onto a separate
workstation as user2 and opened user2ADP file.

At this point both users could see the test database. If
user 1 made a change to a record the change was recorded
in the SQL backend (looking in Enterprise manager). If
user 2 made a change to the same data an error popped up
saying that 2 users were trying to access the same data
etc..

OK, so far so good. However If user1 makes a change to a
record, user2 continuse to see the data as it was when
they opened their copy of the database because it is
looking at the local cache rather than the SQL box.
Hitting refresh solves this, but I can't have the users
needing to do this manually, Is there a way to call this
in the OnCurrent event, so that only the most recent data
is displayed by other users?


Thanks
Chris
 
V

Van T. Dinh

Try using the Menu Tools /Options ... /Advanced tab and set the Refresh
interval to a shorter duration.
 
C

Chris

Hi,
Thanks for replying.

I have tried this, but it did not work.

I followed the instructions here:

http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/off2000/html/achowChangeHowOftenDataIsUpdatedAutomatical
lyS.asp

but note at the bottom it says about how this only works
if your database is shared on a network. I wonder if this
relates to .adp files as well as .mdb, as .adp files don't
get shared in a multiuser environment, but rather each
user hets his/her own copy of the frontend.


Regards
Chris
 
J

Josh Crosby

Are you making sure that you are closing the recordset/command and
connection after an update?
 
J

Josh Crosby

I completely missunderstood the question. sorry about that. the only way
that i can think of doing it is 1. the way Van explained or two (haven't
tried yet) create a me.requery or me.refresh on the fom_current.

sorry about that post,duh :)
 
C

Chris

Hi Josh,
I can't get Van's way to work. I have tried the me!
refresh, but the problem with this is that it wants to
refresh the entire cache rather than just the data that
has changed. Causes the form to hang for ages. I'll see if
me!requery is any better when I get to work tomorrow.

There must be an easier way to get the same functionality
as the refresh option from code. The other thought I had
was to use sendkeys to pass the keystrokes to use the menu
option, but i'm not too enthusiastic about that option
either.

Cheers
Chris
 
C

Chris

Josh,

Actually, your other post just gave me an idea, I wonder
if I can clone the recordset, then write a separate ADO
query to get the data on the current record, update the
clone and reconnect it.

Will try that tomorrow too.

If anyone else has any ideas please post!

Cheers
Chris
 
A

Alick [MSFT]

Hi Chris,

If you mean Record->Refresh menu is what you want, we can trigger the menu
command by code:

Dim CBarMenu As CommandBar
Dim CBarCtl As CommandBarPopup

Set CBarMenu = Application.CommandBars("Menu Bar")

Set CBarCtl = CBarMenu.Controls("Record")

CBarCtl.Controls("Refresh").Execute

Hope it helps.




Sincerely,

Alick Ye, MCSD
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


--------------------
| X-Tomcat-NG: microsoft.public.access.adp.sqlserver
|
| Josh,
|
| Actually, your other post just gave me an idea, I wonder
| if I can clone the recordset, then write a separate ADO
| query to get the data on the current record, update the
| clone and reconnect it.
|
| Will try that tomorrow too.
|
| If anyone else has any ideas please post!
|
| Cheers
| Chris
|
|
| >-----Original Message-----
| >I completely missunderstood the question. sorry about
| that. the only way
| >that i can think of doing it is 1. the way Van explained
| or two (haven't
| >tried yet) create a me.requery or me.refresh on the
| fom_current.
| >
| >sorry about that post,duh :)
| >
| >| >> Hi Josh,
| >> Thanks for answering.
| >>
| >> I got a little lost with what you mean though, please
| can
| >> you explain further. Are you talking about ADO?
| >>
| >> I am using an Access 2000 bound form to a SQL2000
| backend.
| >> I have not opened any ADO connections in code. The
| refresh
| >> I am speaking about is not the refresh method of the ADO
| >> command object, but rather the refresh facility within
| >> access itself.
| >>
| >> Regards
| >> Chris
| >>
| >>
| >> >-----Original Message-----
| >> >Are you making sure that you are closing the
| >> recordset/command and
| >> >connection after an update?
| >> >
| >> >| >> >> Hi,
| >> >> Thanks for replying.
| >> >>
| >> >> I have tried this, but it did not work.
| >> >>
| >> >> I followed the instructions here:
| >> >>
| >> >> http://msdn.microsoft.com/library/default.asp?
| >> >> url=/library/en-
| >> >>
| >>
| us/off2000/html/achowChangeHowOftenDataIsUpdatedAutomatical
| >> >> lyS.asp
| >> >>
| >> >> but note at the bottom it says about how this only
| works
| >> >> if your database is shared on a network. I wonder if
| >> this
| >> >> relates to .adp files as well as .mdb, as .adp files
| >> don't
| >> >> get shared in a multiuser environment, but rather
| each
| >> >> user hets his/her own copy of the frontend.
| >> >>
| >> >>
| >> >> Regards
| >> >> Chris
| >> >>
| >> >>
| >> >> >-----Original Message-----
| >> >> >Try using the Menu Tools /Options ... /Advanced tab
| and
| >> >> set the Refresh
| >> >> >interval to a shorter duration.
| >> >> >
| >> >> >--
| >> >> >HTH
| >> >> >Van T. Dinh
| >> >> >MVP (Access)
| >> >> >
| >> >> >
| >> >> >
| >> >> >| >> >> >> Hi,
| >> >> >> I am using SQL2000 and Access2000 .adp file. My
| >> >> >> application will need to be distributed to several
| >> >> people
| >> >> >> in our organisation and they will need to update
| the
| >> >> data
| >> >> >> concurrently.
| >> >> >>
| >> >> >> I set up a simple test .adp file. And put a copy
| >> into 2
| >> >> >> directories named user1ADP and User2ADP.
| >> >> >> I logged onto the network as user1 on 1
| workstation
| >> and
| >> >> >> opened the user1ADP file. I logged onto a separate
| >> >> >> workstation as user2 and opened user2ADP file.
| >> >> >>
| >> >> >> At this point both users could see the test
| >> database. If
| >> >> >> user 1 made a change to a record the change was
| >> recorded
| >> >> >> in the SQL backend (looking in Enterprise
| manager).
| >> If
| >> >> >> user 2 made a change to the same data an error
| >> popped up
| >> >> >> saying that 2 users were trying to access the same
| >> data
| >> >> >> etc..
| >> >> >>
| >> >> >> OK, so far so good. However If user1 makes a
| change
| >> to a
| >> >> >> record, user2 continuse to see the data as it was
| >> when
| >> >> >> they opened their copy of the database because it
| is
| >> >> >> looking at the local cache rather than the SQL
| box.
| >> >> >> Hitting refresh solves this, but I can't have the
| >> users
| >> >> >> needing to do this manually, Is there a way to
| call
| >> this
| >> >> >> in the OnCurrent event, so that only the most
| recent
| >> >> data
| >> >> >> is displayed by other users?
| >> >> >>
| >> >> >>
| >> >> >> Thanks
| >> >> >> Chris
| >> >> >
| >> >> >
| >> >> >.
| >> >> >
| >> >
| >> >
| >> >.
| >> >
| >
| >
| >.
| >
|
 
C

Chris

Hi Alick,
I have had problems adding the code, do I need to
set a reference first before I can use the Commandbar and
CommandBarPopup?

My system does not recognise these as types of objects.
They are not available from intellisense when defining the
variable and fails with a mesage about userdefined type
not recognised.

Thanks
Chris
 
A

Alick [MSFT]

Hi Chris,

We may need to add "Microsoft Office 9.0 Object library" (tools->References
in VBIDE Window) if you use Access 2000.

Hope it helps.


Sincerely,

Alick Ye, MCSD
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.



--------------------
| Content-Class: urn:content-classes:message
| From: "Chris" <[email protected]>
| Sender: "Chris" <[email protected]>
| References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<#[email protected]>
| Subject: Re: Multiuser environment
| Date: Thu, 14 Aug 2003 09:24:26 -0700
| Lines: 232
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNigIddylr0aEF5SySDrSYodBjkWQ==
| Newsgroups: microsoft.public.access.adp.sqlserver
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.access.adp.sqlserver:13723
| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| X-Tomcat-NG: microsoft.public.access.adp.sqlserver
|
| Hi Alick,
| I have had problems adding the code, do I need to
| set a reference first before I can use the Commandbar and
| CommandBarPopup?
|
| My system does not recognise these as types of objects.
| They are not available from intellisense when defining the
| variable and fails with a mesage about userdefined type
| not recognised.
|
| Thanks
| Chris
|
| >-----Original Message-----
| >Hi Chris,
| >
| >If you mean Record->Refresh menu is what you want, we can
| trigger the menu
| >command by code:
| >
| > Dim CBarMenu As CommandBar
| > Dim CBarCtl As CommandBarPopup
| >
| > Set CBarMenu = Application.CommandBars("Menu Bar")
| >
| > Set CBarCtl = CBarMenu.Controls("Record")
| >
| > CBarCtl.Controls("Refresh").Execute
| >
| > Hope it helps.
| >
| >
| >
| >
| >Sincerely,
| >
| >Alick Ye, MCSD
| >Microsoft Online Partner Support
| >
| >Get Secure! - www.microsoft.com/security
| >This posting is provided "as is" with no warranties and
| confers no rights.
| >
| >
| >--------------------
| >| X-Tomcat-NG: microsoft.public.access.adp.sqlserver
| >|
| >| Josh,
| >|
| >| Actually, your other post just gave me an idea, I
| wonder
| >| if I can clone the recordset, then write a separate ADO
| >| query to get the data on the current record, update the
| >| clone and reconnect it.
| >|
| >| Will try that tomorrow too.
| >|
| >| If anyone else has any ideas please post!
| >|
| >| Cheers
| >| Chris
| >|
| >|
| >| >-----Original Message-----
| >| >I completely missunderstood the question. sorry about
| >| that. the only way
| >| >that i can think of doing it is 1. the way Van
| explained
| >| or two (haven't
| >| >tried yet) create a me.requery or me.refresh on the
| >| fom_current.
| >| >
| >| >sorry about that post,duh :)
| >| >
| >| >| >| >> Hi Josh,
| >| >> Thanks for answering.
| >| >>
| >| >> I got a little lost with what you mean though,
| please
| >| can
| >| >> you explain further. Are you talking about ADO?
| >| >>
| >| >> I am using an Access 2000 bound form to a SQL2000
| >| backend.
| >| >> I have not opened any ADO connections in code. The
| >| refresh
| >| >> I am speaking about is not the refresh method of the
| ADO
| >| >> command object, but rather the refresh facility
| within
| >| >> access itself.
| >| >>
| >| >> Regards
| >| >> Chris
| >| >>
| >| >>
| >| >> >-----Original Message-----
| >| >> >Are you making sure that you are closing the
| >| >> recordset/command and
| >| >> >connection after an update?
| >| >> >
| >| >> >| >| >> >> Hi,
| >| >> >> Thanks for replying.
| >| >> >>
| >| >> >> I have tried this, but it did not work.
| >| >> >>
| >| >> >> I followed the instructions here:
| >| >> >>
| >| >> >> http://msdn.microsoft.com/library/default.asp?
| >| >> >> url=/library/en-
| >| >> >>
| >| >>
| >|
| us/off2000/html/achowChangeHowOftenDataIsUpdatedAutomatical
| >| >> >> lyS.asp
| >| >> >>
| >| >> >> but note at the bottom it says about how this
| only
| >| works
| >| >> >> if your database is shared on a network. I wonder
| if
| >| >> this
| >| >> >> relates to .adp files as well as .mdb, as .adp
| files
| >| >> don't
| >| >> >> get shared in a multiuser environment, but rather
| >| each
| >| >> >> user hets his/her own copy of the frontend.
| >| >> >>
| >| >> >>
| >| >> >> Regards
| >| >> >> Chris
| >| >> >>
| >| >> >>
| >| >> >> >-----Original Message-----
| >| >> >> >Try using the Menu Tools /Options ... /Advanced
| tab
| >| and
| >| >> >> set the Refresh
| >| >> >> >interval to a shorter duration.
| >| >> >> >
| >| >> >> >--
| >| >> >> >HTH
| >| >> >> >Van T. Dinh
| >| >> >> >MVP (Access)
| >| >> >> >
| >| >> >> >
| >| >> >> >
| >| >> >> >| >| >> >> >> Hi,
| >| >> >> >> I am using SQL2000 and Access2000 .adp
| file. My
| >| >> >> >> application will need to be distributed to
| several
| >| >> >> people
| >| >> >> >> in our organisation and they will need to
| update
| >| the
| >| >> >> data
| >| >> >> >> concurrently.
| >| >> >> >>
| >| >> >> >> I set up a simple test .adp file. And put a
| copy
| >| >> into 2
| >| >> >> >> directories named user1ADP and User2ADP.
| >| >> >> >> I logged onto the network as user1 on 1
| >| workstation
| >| >> and
| >| >> >> >> opened the user1ADP file. I logged onto a
| separate
| >| >> >> >> workstation as user2 and opened user2ADP file.
| >| >> >> >>
| >| >> >> >> At this point both users could see the test
| >| >> database. If
| >| >> >> >> user 1 made a change to a record the change was
| >| >> recorded
| >| >> >> >> in the SQL backend (looking in Enterprise
| >| manager).
| >| >> If
| >| >> >> >> user 2 made a change to the same data an error
| >| >> popped up
| >| >> >> >> saying that 2 users were trying to access the
| same
| >| >> data
| >| >> >> >> etc..
| >| >> >> >>
| >| >> >> >> OK, so far so good. However If user1 makes a
| >| change
| >| >> to a
| >| >> >> >> record, user2 continuse to see the data as it
| was
| >| >> when
| >| >> >> >> they opened their copy of the database because
| it
| >| is
| >| >> >> >> looking at the local cache rather than the SQL
| >| box.
| >| >> >> >> Hitting refresh solves this, but I can't have
| the
| >| >> users
| >| >> >> >> needing to do this manually, Is there a way to
| >| call
| >| >> this
| >| >> >> >> in the OnCurrent event, so that only the most
| >| recent
| >| >> >> data
| >| >> >> >> is displayed by other users?
| >| >> >> >>
| >| >> >> >>
| >| >> >> >> Thanks
| >| >> >> >> Chris
| >| >> >> >
| >| >> >> >
| >| >> >> >.
| >| >> >> >
| >| >> >
| >| >> >
| >| >> >.
| >| >> >
| >| >
| >| >
| >| >.
| >| >
| >|
| >
| >.
| >
|
 
G

Guy Horton

Chris,

Apologies in advance if I have misunderstood your requirements, but have you
tried the Resync method of the recordset?

Me.Recordset.Resync adAffectCurrent, adResyncAllValues
' Resync just the current record

Note. Please use with caution as I logged a bug via Brian Sockey [Microsoft]
and this Newsgroup see posting "4-Apr-2002 re:) Question 2" regarding the
use of the Resync command in an ADP.

Hope this helps

Cheers
Guy
 
C

Chris

Hi Alick,
I already have this one included, but it still
fails. I think your code is right, but it just won't run.
I'm at a bit of a loss. I tried creating an mdb instead of
the adp I am using, but it wasn't available there either.
I tried defining the variables as type object and whilst
the declarations were then on the code failed on :

Set CBarCtl = CBarMenu.Controls("Record")

I am using windows 2000, and Access 2000 do you know if it
works for this environment.

Thanks for your help
Chris
 
C

Chris

Thanks Guy,
This looks like another avenue I could explore.

Thanks for your help.

Cheers
Chris
 
A

Alick [MSFT]

Hi Chris,

Sorry there is a typo, it should be "Records" instead of "record"

Set CBarCtl = CBarMenu.Controls("Records")

Note: I assume the Refresh command is available when executing the command
Execute.

You may also try Guy's method :- )




Sincerely,

Alick Ye, MCSD
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.





--------------------
| Content-Class: urn:content-classes:message
| From: "Chris" <[email protected]>
| Sender: "Chris" <[email protected]>
| X-Tomcat-NG: microsoft.public.access.adp.sqlserver
|
| Hi Alick,
| I already have this one included, but it still
| fails. I think your code is right, but it just won't run.
| I'm at a bit of a loss. I tried creating an mdb instead of
| the adp I am using, but it wasn't available there either.
| I tried defining the variables as type object and whilst
| the declarations were then on the code failed on :
|
| Set CBarCtl = CBarMenu.Controls("Record")
|
| I am using windows 2000, and Access 2000 do you know if it
| works for this environment.
|
| Thanks for your help
| Chris
|
| >-----Original Message-----
| >Hi Chris,
| >
| >We may need to add "Microsoft Office 9.0 Object library"
| (tools->References
| >in VBIDE Window) if you use Access 2000.
| >
| >Hope it helps.
| >
| >
| >Sincerely,
| >
| >Alick Ye, MCSD
| >Microsoft Online Partner Support
| >
| >Get Secure! - www.microsoft.com/security
| >This posting is provided "as is" with no warranties and
| confers no rights.
| >
| >
| >
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "Chris" <[email protected]>
| >| Sender: "Chris" <[email protected]>
| >| References: <[email protected]>
| ><[email protected]>
| ><[email protected]>
| ><[email protected]>
| ><[email protected]>
| ><[email protected]>
| ><[email protected]>
| ><#[email protected]>
| >| Subject: Re: Multiuser environment
| >| Date: Thu, 14 Aug 2003 09:24:26 -0700
| >| Lines: 232
| >| Message-ID: <[email protected]>
| >| MIME-Version: 1.0
| >| Content-Type: text/plain;
| >| charset="iso-8859-1"
| >| Content-Transfer-Encoding: 7bit
| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| >| Thread-Index: AcNigIddylr0aEF5SySDrSYodBjkWQ==
| >| Newsgroups: microsoft.public.access.adp.sqlserver
| >| Path: cpmsftngxa06.phx.gbl
| >| Xref: cpmsftngxa06.phx.gbl
| microsoft.public.access.adp.sqlserver:13723
| >| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
| >| X-Tomcat-NG: microsoft.public.access.adp.sqlserver
| >|
| >| Hi Alick,
| >| I have had problems adding the code, do I need
| to
| >| set a reference first before I can use the Commandbar
| and
| >| CommandBarPopup?
| >|
| >| My system does not recognise these as types of objects.
| >| They are not available from intellisense when defining
| the
| >| variable and fails with a mesage about userdefined type
| >| not recognised.
| >|
| >| Thanks
| >| Chris
| >|
| >| >-----Original Message-----
| >| >Hi Chris,
| >| >
| >| >If you mean Record->Refresh menu is what you want, we
| can
| >| trigger the menu
| >| >command by code:
| >| >
| >| > Dim CBarMenu As CommandBar
| >| > Dim CBarCtl As CommandBarPopup
| >| >
| >| > Set CBarMenu = Application.CommandBars("Menu Bar")
| >| >
| >| > Set CBarCtl = CBarMenu.Controls("Record")
| >| >
| >| > CBarCtl.Controls("Refresh").Execute
| >| >
| >| > Hope it helps.
| >| >
| >| >
| >| >
| >| >
| >| >Sincerely,
| >| >
| >| >Alick Ye, MCSD
| >| >Microsoft Online Partner Support
| >| >
| >| >Get Secure! - www.microsoft.com/security
| >| >This posting is provided "as is" with no warranties
| and
| >| confers no rights.
| >| >
| >| >
| >| >--------------------
| >| >| X-Tomcat-NG: microsoft.public.access.adp.sqlserver
| >| >|
| >| >| Josh,
| >| >|
| >| >| Actually, your other post just gave me an idea, I
| >| wonder
| >| >| if I can clone the recordset, then write a separate
| ADO
| >| >| query to get the data on the current record, update
| the
| >| >| clone and reconnect it.
| >| >|
| >| >| Will try that tomorrow too.
| >| >|
| >| >| If anyone else has any ideas please post!
| >| >|
| >| >| Cheers
| >| >| Chris
| >| >|
| >| >|
| >| >| >-----Original Message-----
| >| >| >I completely missunderstood the question. sorry
| about
| >| >| that. the only way
| >| >| >that i can think of doing it is 1. the way Van
| >| explained
| >| >| or two (haven't
| >| >| >tried yet) create a me.requery or me.refresh on the
| >| >| fom_current.
| >| >| >
| >| >| >sorry about that post,duh :)
| >| >| >
| >| >| >| >| >| >> Hi Josh,
| >| >| >> Thanks for answering.
| >| >| >>
| >| >| >> I got a little lost with what you mean though,
| >| please
| >| >| can
| >| >| >> you explain further. Are you talking about ADO?
| >| >| >>
| >| >| >> I am using an Access 2000 bound form to a SQL2000
| >| >| backend.
| >| >| >> I have not opened any ADO connections in code.
| The
| >| >| refresh
| >| >| >> I am speaking about is not the refresh method of
| the
| >| ADO
| >| >| >> command object, but rather the refresh facility
| >| within
| >| >| >> access itself.
| >| >| >>
| >| >| >> Regards
| >| >| >> Chris
| >| >| >>
| >| >| >>
| >| >| >> >-----Original Message-----
| >| >| >> >Are you making sure that you are closing the
| >| >| >> recordset/command and
| >| >| >> >connection after an update?
| >| >| >> >
| >| >| >> >| >| >| >> >> Hi,
| >| >| >> >> Thanks for replying.
| >| >| >> >>
| >| >| >> >> I have tried this, but it did not work.
| >| >| >> >>
| >| >| >> >> I followed the instructions here:
| >| >| >> >>
| >| >| >> >> http://msdn.microsoft.com/library/default.asp?
| >| >| >> >> url=/library/en-
| >| >| >> >>
| >| >| >>
| >| >|
| >|
| us/off2000/html/achowChangeHowOftenDataIsUpdatedAutomatical
| >| >| >> >> lyS.asp
| >| >| >> >>
| >| >| >> >> but note at the bottom it says about how this
| >| only
| >| >| works
| >| >| >> >> if your database is shared on a network. I
| wonder
| >| if
| >| >| >> this
| >| >| >> >> relates to .adp files as well as .mdb, as .adp
| >| files
| >| >| >> don't
| >| >| >> >> get shared in a multiuser environment, but
| rather
| >| >| each
| >| >| >> >> user hets his/her own copy of the frontend.
| >| >| >> >>
| >| >| >> >>
| >| >| >> >> Regards
| >| >| >> >> Chris
| >| >| >> >>
| >| >| >> >>
| >| >| >> >> >-----Original Message-----
| >| >| >> >> >Try using the Menu
| Tools /Options ... /Advanced
| >| tab
| >| >| and
| >| >| >> >> set the Refresh
| >| >| >> >> >interval to a shorter duration.
| >| >| >> >> >
| >| >| >> >> >--
| >| >| >> >> >HTH
| >| >| >> >> >Van T. Dinh
| >| >| >> >> >MVP (Access)
| >| >| >> >> >
| >| >| >> >> >
| >| >| >> >> >
| >| >| >> >> >| >| >| >> >> >> Hi,
| >| >| >> >> >> I am using SQL2000 and Access2000 .adp
| >| file. My
| >| >| >> >> >> application will need to be distributed to
| >| several
| >| >| >> >> people
| >| >| >> >> >> in our organisation and they will need to
| >| update
| >| >| the
| >| >| >> >> data
| >| >| >> >> >> concurrently.
| >| >| >> >> >>
| >| >| >> >> >> I set up a simple test .adp file. And put a
| >| copy
| >| >| >> into 2
| >| >| >> >> >> directories named user1ADP and User2ADP.
| >| >| >> >> >> I logged onto the network as user1 on 1
| >| >| workstation
| >| >| >> and
| >| >| >> >> >> opened the user1ADP file. I logged onto a
| >| separate
| >| >| >> >> >> workstation as user2 and opened user2ADP
| file.
| >| >| >> >> >>
| >| >| >> >> >> At this point both users could see the test
| >| >| >> database. If
| >| >| >> >> >> user 1 made a change to a record the change
| was
| >| >| >> recorded
| >| >| >> >> >> in the SQL backend (looking in Enterprise
| >| >| manager).
| >| >| >> If
| >| >| >> >> >> user 2 made a change to the same data an
| error
| >| >| >> popped up
| >| >| >> >> >> saying that 2 users were trying to access
| the
| >| same
| >| >| >> data
| >| >| >> >> >> etc..
| >| >| >> >> >>
| >| >| >> >> >> OK, so far so good. However If user1 makes
| a
| >| >| change
| >| >| >> to a
| >| >| >> >> >> record, user2 continuse to see the data as
| it
| >| was
| >| >| >> when
| >| >| >> >> >> they opened their copy of the database
| because
| >| it
| >| >| is
| >| >| >> >> >> looking at the local cache rather than the
| SQL
| >| >| box.
| >| >| >> >> >> Hitting refresh solves this, but I can't
| have
| >| the
| >| >| >> users
| >| >| >> >> >> needing to do this manually, Is there a way
| to
| >| >| call
| >| >| >> this
| >| >| >> >> >> in the OnCurrent event, so that only the
| most
| >| >| recent
| >| >| >> >> data
| >| >| >> >> >> is displayed by other users?
| >| >| >> >> >>
| >| >| >> >> >>
| >| >| >> >> >> Thanks
| >| >| >> >> >> Chris
| >| >| >> >> >
| >| >| >> >> >
| >| >| >> >> >.
| >| >| >> >> >
| >| >| >> >
| >| >| >> >
| >| >| >> >.
| >| >| >> >
| >| >| >
| >| >| >
| >| >| >.
| >| >| >
| >| >|
| >| >
| >| >.
| >| >
| >|
| >
| >.
| >
|
 
C

Chris

Hi Danny,
Thanks for answering.
I still don't get how this solves the problem though.
Surely it needs to be an event driven process? If you use
a timer users will either see updated data, or not, based
on if an arbitary time had been reached.

Obviously the best situation would be if the SQL server
updated all access clients caches as soon as an update was
completed(I think this is what you were getting at?) but I
don't see how this is possible.

However what is almost as good from a user perspective,
would be if that users local cache updated before they
encountered the changed data. By using the OnCurrent event
when a user navigates to another record it will
immdediately be tested against the SQL server and updated
if it has been changed by another user. In fact the only
limitation of this is if the 2 users are on the same
record at the same time(I suppose you could use a timer
event to update this, is this what you meant?).

What I am searching for is a way to make this refresh
occur in code only for the current record(so as not to
have to bring all the dataset down the wire, and also not
kicking the user back to the first record).

Bound Access .adp forms use optimistic record locking so I
can't see how a user could block another users changes??
Why do you need to do anything in the after update event?
Also I am sure I have seen that the after update event
itself fires before the update to the SQL server in
an .adp!

Regards
Chris
 
A

Alick [MSFT]

Hi Chris,

Originally Access is designed to has the feature as Van mentioned
(Tools->Options->Advanced->Refresh Interval) that can do what you want,
however, it turns out there is a problem with Access 2000 adp, which is
explained in the article Q264975.

Q264975 - ACC2000: Refresh Interval Does Not Work in Access Project
http://support.microsoft.com/support/kb/articles/q264/9/75.asp

As workarounds, we can try:

1. Simulate the Records->Refresh menu command by code.
2. Try resync method that Guy mentioned (but note the problem in the
afterupdate event)

The methods are all triggered on the client side instead of Server side; I
don't think there is an easy method on the Server side that pushes data
onto all client sides once any update occurs. The way we usually use is to
refresh/retrieve data on the client side.

Please feel free to let me know if you have any concerns.


Sincerely,

Alick Ye, MCSD
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.




--------------------
| Content-Class: urn:content-classes:message
| From: "Chris" <[email protected]>
|
| Hi Danny,
| Thanks for answering.
| I still don't get how this solves the problem though.
| Surely it needs to be an event driven process? If you use
| a timer users will either see updated data, or not, based
| on if an arbitary time had been reached.
|
| Obviously the best situation would be if the SQL server
| updated all access clients caches as soon as an update was
| completed(I think this is what you were getting at?) but I
| don't see how this is possible.
|
| However what is almost as good from a user perspective,
| would be if that users local cache updated before they
| encountered the changed data. By using the OnCurrent event
| when a user navigates to another record it will
| immdediately be tested against the SQL server and updated
| if it has been changed by another user. In fact the only
| limitation of this is if the 2 users are on the same
| record at the same time(I suppose you could use a timer
| event to update this, is this what you meant?).
|
| What I am searching for is a way to make this refresh
| occur in code only for the current record(so as not to
| have to bring all the dataset down the wire, and also not
| kicking the user back to the first record).
|
| Bound Access .adp forms use optimistic record locking so I
| can't see how a user could block another users changes??
| Why do you need to do anything in the after update event?
| Also I am sure I have seen that the after update event
| itself fires before the update to the SQL server in
| an .adp!
|
| Regards
| Chris
|
|
|
| >-----Original Message-----
| >> I set up a simple test .adp file. And put a copy into 2
| >> directories named user1ADP and User2ADP.
| >> I logged onto the network as user1 on 1 workstation and
| >> opened the user1ADP file. I logged onto a separate
| >> workstation as user2 and opened user2ADP file.
| >>
| >> At this point both users could see the test database. If
| >> user 1 made a change to a record the change was recorded
| >> in the SQL backend (looking in Enterprise manager). If
| >> user 2 made a change to the same data an error popped up
| >> saying that 2 users were trying to access the same data
| >> etc..
| >>
| >> OK, so far so good. However If user1 makes a change to a
| >> record, user2 continuse to see the data as it was when
| >> they opened their copy of the database because it is
| >> looking at the local cache rather than the SQL box.
| >> Hitting refresh solves this, but I can't have the users
| >> needing to do this manually, Is there a way to call this
| >> in the OnCurrent event, so that only the most recent
| data
| >> is displayed by other users?
| >
| >What I have done is to program the timer event so that it
| on specific
| >intervals requery the database and thereby updates the
| form. When a user
| >updates a record, I have set his afterupdate so that it
| saves the record
| >immediately, even though he has not updated all the
| records he needs to.
| >That way this user cant block other users updates. As far
| as I know the
| >resync only works if the user himself is updating the
| records, not if other
| >users do!
| >
| >But after all, the problem seems to be that Access/mssql
| are not truly a
| >client/server environment. The server do not know its
| users and thereby cant
| >do a appropriate requery on its own!
| >
| >regards
| >Danny Nielsen
| >
| >
| >
| >.
| >
|
 
A

Alick [MSFT]

Hi Gary,

I am sorry to inform you that after testing it seems the issue remains in
Access 2002 project, I will inform the right person to modify the article
Q264975 to meet the real situation (applying to Access 2002 as well).
Thanks for bringing this issue out.

Sincerely,

Alick Ye, MCSD
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


--------------------
| Content-Class: urn:content-classes:message
| From: "Chris" <[email protected]>
| X-Tomcat-NG: microsoft.public.access.adp.sqlserver
|
| Thanks Alick,
| That bug report confirms my findings. I note
| however, that it only mentions Access version 2000, has
| this bug been fixed in 2002? I may be able to upgrade to
| 2002 if there is a good reason to do so. Will I be able to
| use >(Tools->Options->Advanced->Refresh Interval) in 2002?
| That would be the neatest solution to my problem, if the
| built-in functionality works.
|
| Guy's approach looks promising as a workaround in 2000 but
| the bug mentioned on this is a little worrying.
|
| Cheers
| Chris
|
| >-----Original Message-----
| >Hi Chris,
| >
| >Originally Access is designed to has the feature as Van
| mentioned
| >(Tools->Options->Advanced->Refresh Interval) that can do
| what you want,
| >however, it turns out there is a problem with Access 2000
| adp, which is
| >explained in the article Q264975.
| >
| >Q264975 - ACC2000: Refresh Interval Does Not Work in
| Access Project
| >http://support.microsoft.com/support/kb/articles/q264/9/75
| .asp
| >
| >As workarounds, we can try:
| >
| >1. Simulate the Records->Refresh menu command by code.
| >2. Try resync method that Guy mentioned (but note the
| problem in the
| >afterupdate event)
| >
| >The methods are all triggered on the client side instead
| of Server side; I
| >don't think there is an easy method on the Server side
| that pushes data
| >onto all client sides once any update occurs. The way we
| usually use is to
| >refresh/retrieve data on the client side.
| >
| >Please feel free to let me know if you have any concerns.
| >
| >
| >Sincerely,
| >
| >Alick Ye, MCSD
| >Microsoft Online Partner Support
| >
| >Get Secure! - www.microsoft.com/security
| >This posting is provided "as is" with no warranties and
| confers no rights.
| >
| >
| >
| >
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "Chris" <[email protected]>
| >|
| >| Hi Danny,
| >| Thanks for answering.
| >| I still don't get how this solves the problem though.
| >| Surely it needs to be an event driven process? If you
| use
| >| a timer users will either see updated data, or not,
| based
| >| on if an arbitary time had been reached.
| >|
| >| Obviously the best situation would be if the SQL server
| >| updated all access clients caches as soon as an update
| was
| >| completed(I think this is what you were getting at?)
| but I
| >| don't see how this is possible.
| >|
| >| However what is almost as good from a user perspective,
| >| would be if that users local cache updated before they
| >| encountered the changed data. By using the OnCurrent
| event
| >| when a user navigates to another record it will
| >| immdediately be tested against the SQL server and
| updated
| >| if it has been changed by another user. In fact the
| only
| >| limitation of this is if the 2 users are on the same
| >| record at the same time(I suppose you could use a timer
| >| event to update this, is this what you meant?).
| >|
| >| What I am searching for is a way to make this refresh
| >| occur in code only for the current record(so as not to
| >| have to bring all the dataset down the wire, and also
| not
| >| kicking the user back to the first record).
| >|
| >| Bound Access .adp forms use optimistic record locking
| so I
| >| can't see how a user could block another users
| changes??
| >| Why do you need to do anything in the after update
| event?
| >| Also I am sure I have seen that the after update event
| >| itself fires before the update to the SQL server in
| >| an .adp!
| >|
| >| Regards
| >| Chris
| >|
| >|
| >|
| >| >-----Original Message-----
| >| >> I set up a simple test .adp file. And put a copy
| into 2
| >| >> directories named user1ADP and User2ADP.
| >| >> I logged onto the network as user1 on 1 workstation
| and
| >| >> opened the user1ADP file. I logged onto a separate
| >| >> workstation as user2 and opened user2ADP file.
| >| >>
| >| >> At this point both users could see the test
| database. If
| >| >> user 1 made a change to a record the change was
| recorded
| >| >> in the SQL backend (looking in Enterprise manager).
| If
| >| >> user 2 made a change to the same data an error
| popped up
| >| >> saying that 2 users were trying to access the same
| data
| >| >> etc..
| >| >>
| >| >> OK, so far so good. However If user1 makes a change
| to a
| >| >> record, user2 continuse to see the data as it was
| when
| >| >> they opened their copy of the database because it is
| >| >> looking at the local cache rather than the SQL box.
| >| >> Hitting refresh solves this, but I can't have the
| users
| >| >> needing to do this manually, Is there a way to call
| this
| >| >> in the OnCurrent event, so that only the most recent
| >| data
| >| >> is displayed by other users?
| >| >
| >| >What I have done is to program the timer event so that
| it
| >| on specific
| >| >intervals requery the database and thereby updates the
| >| form. When a user
| >| >updates a record, I have set his afterupdate so that
| it
| >| saves the record
| >| >immediately, even though he has not updated all the
| >| records he needs to.
| >| >That way this user cant block other users updates. As
| far
| >| as I know the
| >| >resync only works if the user himself is updating the
| >| records, not if other
| >| >users do!
| >| >
| >| >But after all, the problem seems to be that
| Access/mssql
| >| are not truly a
| >| >client/server environment. The server do not know its
| >| users and thereby cant
| >| >do a appropriate requery on its own!
| >| >
| >| >regards
| >| >Danny Nielsen
| >| >
| >| >
| >| >
| >| >.
| >| >
| >|
| >
| >.
| >
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top