473,587 Members | 2,548 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Manipulating TableDefs

Hi all,

Does anyone have any idea why creating a table link across a network should
be so slow? My front end app follows these steps when opening:

* Retrieve all linked tables in the current database as a recordset from the
MSysObjects table.
* For each record:
Check the existance of the mdb file that the table resides in.
If the mdb file exists, check the table exists by opening the target
mdb's MSysObjects table with the table name as a criteria.

I was originally doing this by looping through the TableDefs collection, but
that was even slower. It works just fine if there is only one user accessing
the back end database(es) - it takes a few seconds under these
circumstances, but more than one results in nearly 3-4 minutes to check 100
tables. The front ends reside on Windows 2000 Pro boxes, the back end on a
Windows 2003 Server machine. The recordsets are all using DAO in Access
2002.

Any ideas would be much appreciated.

--
Shane Suebsahakarn
----
Head of IT
PAN Telecom
Tel: +44 (0) 870 757 7001
Nov 13 '05 #1
2 2405
Several possiblities

1. File access
It takes time to open the mdb over the network, and possibly the mdw, and
create the ldb. If most of the TableDefs are from one or two mdb's, consider
opening the database directly and holding it open until the routine is
finished:
Dim dbFile1 As DAO.Database
Set dbFile1 = OpenDatabase(\\ MyServer\MyPath \MyFile.mdb)
Although you do not actually use this object, just holding it open will
speed the access dramatically. (You may need a Collection of these objects.)

2. Length of path string
It it much faster to access if the path in the Connect string is less than
128 characters.

3. Parse the server out of the path
Windows waits for a long time for a server to respond when it is not
available. Once you know that it is off line, you can avoid further lengthy
delays by not asking for it again in any further tables that access that
machine.

4. Settings.
Uncheck the the Name AutoCorrect boxes (Tools | Options | General), and set
SubdatasheetNam e to [None] (Properties box in table design). In different
settings these also slow things down dramatically.

More suggestions:
http://www.granite.ab.ca/access/performancefaq.htm

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Shane Suebsahakarn" <sh***@REMOVETH ISgcicom.net> wrote in message
news:cg******** **@hercules.bti nternet.com...

Does anyone have any idea why creating a table link across a network
should
be so slow? My front end app follows these steps when opening:

* Retrieve all linked tables in the current database as a recordset from
the
MSysObjects table.
* For each record:
Check the existance of the mdb file that the table resides in.
If the mdb file exists, check the table exists by opening the target
mdb's MSysObjects table with the table name as a criteria.

I was originally doing this by looping through the TableDefs collection,
but
that was even slower. It works just fine if there is only one user
accessing
the back end database(es) - it takes a few seconds under these
circumstances, but more than one results in nearly 3-4 minutes to check
100
tables. The front ends reside on Windows 2000 Pro boxes, the back end on a
Windows 2003 Server machine. The recordsets are all using DAO in Access
2002.

Any ideas would be much appreciated.

--
Shane Suebsahakarn
----
Head of IT
PAN Telecom
Tel: +44 (0) 870 757 7001

Nov 13 '05 #2
Hi Allen, thanks for the response.

The first tip sounds like a good possibility. I'm thinking that it could be
some kind of issue with NT security, since a copy running on a peer-to-peer
seems to run much faster. The slowdown only happens for the second and
subsequent user as well, so I suspect it could be something to do with
accessing the ldb file.

One of the first things I did in attempting to speed it up was to go through
pretty much everything on the performance faq :)

--
Shane Suebsahakarn
----
Head of IT
PAN Telecom
Tel: +44 (0) 870 757 7001

"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message
news:41******** *************** @per-qv1-newsreader-01.iinet.net.au ...
Several possiblities

1. File access
It takes time to open the mdb over the network, and possibly the mdw, and
create the ldb. If most of the TableDefs are from one or two mdb's, consider opening the database directly and holding it open until the routine is
finished:
Dim dbFile1 As DAO.Database
Set dbFile1 = OpenDatabase(\\ MyServer\MyPath \MyFile.mdb)
Although you do not actually use this object, just holding it open will
speed the access dramatically. (You may need a Collection of these objects.)
2. Length of path string
It it much faster to access if the path in the Connect string is less than
128 characters.

3. Parse the server out of the path
Windows waits for a long time for a server to respond when it is not
available. Once you know that it is off line, you can avoid further lengthy delays by not asking for it again in any further tables that access that
machine.

4. Settings.
Uncheck the the Name AutoCorrect boxes (Tools | Options | General), and set SubdatasheetNam e to [None] (Properties box in table design). In different
settings these also slow things down dramatically.

More suggestions:
http://www.granite.ab.ca/access/performancefaq.htm

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Shane Suebsahakarn" <sh***@REMOVETH ISgcicom.net> wrote in message
news:cg******** **@hercules.bti nternet.com...

Does anyone have any idea why creating a table link across a network
should
be so slow? My front end app follows these steps when opening:

* Retrieve all linked tables in the current database as a recordset from
the
MSysObjects table.
* For each record:
Check the existance of the mdb file that the table resides in.
If the mdb file exists, check the table exists by opening the target
mdb's MSysObjects table with the table name as a criteria.

I was originally doing this by looping through the TableDefs collection,
but
that was even slower. It works just fine if there is only one user
accessing
the back end database(es) - it takes a few seconds under these
circumstances, but more than one results in nearly 3-4 minutes to check
100
tables. The front ends reside on Windows 2000 Pro boxes, the back end on a Windows 2003 Server machine. The recordsets are all using DAO in Access
2002.

Any ideas would be much appreciated.

--
Shane Suebsahakarn
----
Head of IT
PAN Telecom
Tel: +44 (0) 870 757 7001


Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
22934
by: Michael J. Astrauskas | last post by:
Does anyone have a function for manipulating GET variables in a URL? I want to be able to modify some parameters without affecting others. An example of what I'm looking for: Let's say the current url is: www.mine.com/home.php?name=joe&page=7&theme=blue I want to be able to run a function like: $newurl = change_get($_SERVER,"page","6");...
12
562
by: agent349 | last post by:
Hi, I'm fairly new to c++. I need user input in the form of dollar amounts, ie: "$10.00". I'd like to remove the dollar sign "$" then store the rest in a variable. How do I go about removing the dollar sign? Thanks in advance!
10
3264
by: Kristian Nybo | last post by:
Hi, I'm writing a simple image file exporter as part of a school project. To implement my image format of choice I need to work with big-endian bytes, where 'byte' of course means '8 bits', not 'sizeof(char)'. It seems that I could use bitset<8> to represent a byte in my code --- if you have a better suggestion, I welcome it --- but that...
1
4438
by: Todd Matson | last post by:
I am trying to diagnose a rather insidious problem. Yesterday, I tried to install the .NET Framework 1.1. That installation failed. No big deal -- I can live without it. Now, however, none of my MS Access applications work. I've researched the problem and found that whenever the DAO TableDefs.Append method is executed in code, I get...
2
2375
by: BUX | last post by:
I have to look in Index property of myTable, but Set myTableDef = myDB.TableDefs(myTable) is so slow .... Do you now any other fast way? thank you
2
2324
by: Santa | last post by:
Hello: I am trying to manipulating the data from the pointer (the below program) in the function "test1", Is there any best way of changing the data from that pointer (I am changing by assigning the address "&p2->x" to a poiner and then changing. Looklike this is not perfect, can somebody correct me. My programn is below. Thanks,...
0
1405
by: srabani | last post by:
Hi Everybody, I am srabani I am new to this site. I am working on VBA DAO and come accross with a code For Each tbl In CurrentDb.TableDefs If InStr(1, tbl.Connect, "DSN=Speakers_Bureau;") > 0 Then q1 = tbl.name
2
2202
by: timmg | last post by:
The following code works well except I can't think of an elegant way of checking for the existance of the named field prior to creating it. Suggestions? Public Sub pNewField() 'Add a new field to every table in the collection Dim strSQL As String Dim db As Database, tdf As TableDef, intI As Integer Set db = CurrentDb
0
7920
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7849
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8215
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8220
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5718
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2358
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1454
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1189
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.