Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Multiuser / Networking / October 2006

Tip: Looking for answers? Try searching our database.

Linked Table Basic Questions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sjw - 01 Oct 2006 21:10 GMT
I’ve developed a database using 2000 Access.  I have a FE for local computers
and two BE mdbs (one for data and one for reference material) on the network.
I’ve linked the tables to the FE with the New Table Wizard.

When the FE opens I declare a DAO.database in a global module as well as
several global DAO.recordsets that are used throughout the secession.  Though
global, I set these recordsets only to local tables on the FE except when
adding, editing or deleting records.  When FE opens, all data in local tables
is deleted and then filled from the networked BE.

I haven’t distributed the database to the masses yet and I’m concerned about
the “LDB locking which a persistent recordset connection” issue and network
performance.

Is there a problem leaving the linked tables “connected” for long periods of
time?

Should I build the table links using code and after the local tables are
filled then break the links?

Should I declare 2 DAO databases (public dbBE, dbFE) when the FE starts, One
for BE connections and one for the FE.  Then use the dbBE only when changing
data on the network?

Is there a way to close the LDB on error or on time out?

Thanks,
sjw
Larry Linson - 03 Oct 2006 02:59 GMT
I'm having a little trouble getting through all your "how I am doing this"
to determine _what_ you are trying to accomplish with the DAO.database,
DAO.Recordsets, and the local Tables you describe. It almost reads as if you
are starting out by trying to jump through the hoops to which some have to
resort to stretch the life/use of their split database while making the
changes to move to client-server.

But, without any great deal of "jumping through hoops," we have reliable
reports of successful split Access - Jet databases with 30-70 concurrent
users.  If all conditions are "near perfect," we have reliable reports of
100+ concurrent users. If all or almost all the users are read-only, then
the number can be even higher.

Could you clarify some things for us? Specifically: (1) Are you creating
local data on the user's machine to be used by that user's FE and then, at
some later time, trying to merge in that user's updates?  Or, are you
copying data locally to be used for display and reference, but actually
doing any updates to the linked tables in the Back End?

(2) And, I am not sure what you mean by "set these Recordsets only to local
tables".

(3) How many _concurrently logged-in_ (not total) users do you anticipate?

(4) And could you explain exactly what is the issue that has you concerned?
AFAIK, there's no universally-defined "LDB locking which a persistent
recordset connection" issue.

A persistent Recordset connection is used to enhance performance -- so the
overhead to create a new connection need not be incurred for every I/O.

(5) If everyone is off updating their own copy of the database, copied down
to local tables as you describe, how would you plan to coordinate those
updates?  That sounds as if you have in mind some "homegrown" replication
scheme. Believe me, you will be better off working through any issues with a
multiuser FE - BE database than attempting to use replication (replication
is not, I contend, "for the faint of heart"). And, I am reasonably sure that
using Access replication will be more successful than most homegrown
replication schemes.

If you have a stable network and power environment, long periods of "linked
tables" should not be a problem.  Only if a user has an update or edit
operation in progress when there is a dropped connection or if the user
powers down the Front End machine mid-operation would you be likely to
suffer database corruption in the Back End.

The LDB (sometimes called the Lock Data Base) is handled by Access/Jet (or
the Access runtime). You neither Open nor Close it -- that is handled
automatically for you.

As a final comment: just about the best information on multi-user split
databases that I know about is at MVP Tony Toews' site,
http://www.granite.ab.ca/accsmstr.htm -- on performance and on avoiding
corruption.  Another site with good information is MVP Jeff Conrad's
http://home.bendbroadband.com/conradsystems/accessjunkie.html.

I look forward to seeing your clarifications.

 Larry Linson
 Microsoft Access MVP

> I've developed a database using 2000 Access.  I have a FE for local
> computers
[quoted text clipped - 33 lines]
> Thanks,
> sjw
sjw - 03 Oct 2006 21:19 GMT
Larry,

Thanks for the reply and links to further reading.  I’ll check them out
after I post this.
I embedded replys to your questions below.

> I'm having a little trouble getting through all your "how I am doing this"
> to determine _what_ you are trying to accomplish with the DAO.database,
[quoted text clipped - 14 lines]
> copying data locally to be used for display and reference, but actually
> doing any updates to the linked tables in the Back End?

I have 200 to 250 total users of the database (actually, right now there is
just one, me.  So far I’m running the database on a standalone machine but
have always planed to split FE and BE over the network).  I anticipate no
more than 10 concurrent users, most likely no more than 1 or 2 who are
changing data, the rest just viewing.  80% of the time new data is added (and
edited) from one location in our meeting room.

> (2) And, I am not sure what you mean by "set these Recordsets only to local
> tables".

(2) I have many recordsets that are used by many different forms so I refer
to them as global. The underlying tables for these are on the local users
machine.  I’m trying to minimize the data transfer across the network.  When
necessary to add, edit or delete a record on the BE, I’m using DoCmd.RunSQL
"sql stuff".

> (3) How many _concurrently logged-in_ (not total) users do you anticipate?

(3) Ten at the most.

> (4) And could you explain exactly what is the issue that has you concerned?
> AFAIK, there's no universally-defined "LDB locking which a persistent
> recordset connection" issue.
>
> A persistent Recordset connection is used to enhance performance -- so the
> overhead to create a new connection need not be incurred for every I/O.

(4) I read about it here at this newsgroup access.multiuser.  I also tested
the situation where I placed the BE on the network and opened a record for
editing on my computer.  (I have Access 2002 and the database is 2000
version.  The other users will have 2002 runtime.)  I then logged into a
second computer and attempted to delete the record I was editing from my
computer.  This caused the second computer to go haywire.  It couldn’t shut
it down using any software command.  I had to kill its power source and it
left the LDB file on the network.  
Our IS department has reluctantly given me MS access (and network space) but
they made it clear that they do not and will not provide me or my users any
help. Thus, I very concened about network issues. The database is set to
record locking.  I intend to use pessimistic locking and somehow block the
second user from even attempting to change a record that is being edited,
thus eliminating one cause of the lingering LDB and the scary computer lockup
I saw.

[1] I’m not sure how to do this.

[2] Does I/O stand for "input / ouput to linked tables"?

> (5) If everyone is off updating their own copy of the database, copied down
> to local tables as you describe, how would you plan to coordinate those
[quoted text clipped - 14 lines]
> the Access runtime). You neither Open nor Close it -- that is handled
> automatically for you.

(5) I’m not familiar with the term “replication” and have no intention of
making a home grown version.  Data input usually occurs during a one hour
session 3 times a day, Monday through Thursday.  Each session we typically
add 10 to 20 new records.  It is not critical (but would be nice) that other
users see the added or changed data real time.

[3] What is database corruption in the Back End?  

[4] How do I know if I have it?  

I don’t quit understand the declaration and setting of databases and
recordsets.  I have a module that is not connected to any form that I refer
to as global module (GM).

[5] Is this the right terminology?  

Example of what I have:

Option Explicit
Option Compare Database

'... *** GM Module ***

Public db As dao.Database '...Used while this program is running.
Public rstMembers As dao.Recordset '...Member information.
Public rstProfile As dao.Recordset '...Scenarios setup
Public rstArea As dao.Recordset '...Area critiqued
Public rstStandards As dao.Recordset '...Description of the standards
Public rstCycle As dao.Recordset '...Information for each cycle

The startup form is frmBackGround and remains open until the users closes
the program.

'... *** frmBackGround Module ***

Option Explicit
Option Compare Database
'...~

Private Sub Form_Open(Cancel As Integer)
   '...Refreshes local tables and sets initial information.
On Error GoTo ErrorHandler

   Set db = CurrentDb()
   OPDLogIn  
   DoCmd.Maximize
       '...This is a hidden form use to exit the program if idle time > 10
min.
   DoCmd.OpenForm "frmDetectIdleTime", , , , , acHidden
       ‘…Copy data from network to local tables
   UpdateLocalTables
       '...Creates global recordsets
   Init_RecordSets
       '...Fills arays with initial values
   Init_GlobalArrays

    “more stuff”

End Sub

Public Sub Init_RecordSets()
   '...Creates local recordsets.
On Error GoTo ErrorHandler
       
   Set rstMembers = db.OpenRecordset("tbl_L_Members", dbOpenSnapshot)
   Set rstStandards = db.OpenRecordset("tbl_L_StandardsTemp", dbOpenSnapshot)
   Set rstMethods = db.OpenRecordset("tbl_L_MethodsTemp", dbOpenSnapshot)
   Set rstCycles = db.OpenRecordset("tbl_L_Cycle", dbOpenSnapshot)
   Set rstProfile = db.OpenRecordset("tbl_L_Profile", dbOpenSnapshot)
   
ErrorHandlerExit:
  Exit Sub

ErrorHandler:
  MsgBox "Error No: " & Err.Number & "; Description: " & _
     Err.Description
  Resume ErrorHandlerExit

End Sub

Private Sub Form_Close()
   OPDLogOut
   Set db = Nothing
   Set rstMembers = Nothing
   Set rstProfile = Nothing
   Set rstStandards = Nothing
   Set rstMethods = Nothing
   Set rstCycles = Nothing
   'DoCmd.Quit ‘…Enable before distribution
End Sub

[6] Is there any speed advantage (or other reason) to declaring a second db
when I need to add or edit data on the BE, declaring and setting recordsets
to this new db?
Example:

Dim newdb as dao.database
Dim newrst as dao.recordset
Set newdb = CurrentDb()
Set newrst = newdb.OpenRecordset("sometable", dbOpenSnapshot)

[7] Is it necessary to set the recordsets to nothing if I’m setting the db
to nothing?

[8] Should I close the recordsets before setting them to nothing?

[9] Should I link / unlink the tables on the BE only when I need to get data
from them or put data into them?  Specifically, would this minimize the issue
with the LDB?

Thanks for the help,
sjw

> As a final comment: just about the best information on multi-user split
> databases that I know about is at MVP Tony Toews' site,
[quoted text clipped - 6 lines]
>   Larry Linson
>   Microsoft Access MVP
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.