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

Home Posts Topics Members FAQ

Set myTableDef = myDB.TableDefs( myTable) is so slow ....

BUX
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
Nov 13 '05 #1
2 2375
The TableDefs() collection is not slow to deal with, so there are probably
other factors here.

Examples:

- How did you set myDB? CurrentDb() creates an instance each time it is
called, and flushes all collections, so a single call to myDB instead of
multiple calls makes a huge difference.

- Attached tables? Try an OpenDatabase() directly on the back end until your
code completes. You don't actually use this Database variable, but the file
open, and so yields much faster results.

- Name AutoCorrect can cause lots of problems as all names are passed
through it first.

- How long is the path name in the Connect property of the TableDef? Believe
it or not, that makes a major difference also.

For several other general suggestions on performance in Access, see:
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.

"BUX" <No****@NoSpam. it> wrote in message
news:i3******** *************** *********@4ax.c om...
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

Nov 13 '05 #2
BUX


Thank you veru much for yours exhaustive answer.
On Thu, 22 Sep 2005 20:03:37 +0800, "Allen Browne"
<Al*********@Se eSig.Invalid> wrote:
The TableDefs() collection is not slow to deal with, so there are probably
other factors here.

Examples:

- How did you set myDB? CurrentDb() creates an instance each time it is
called, and flushes all collections, so a single call to myDB instead of
multiple calls makes a huge difference.

- Attached tables? Try an OpenDatabase() directly on the back end until your
code completes. You don't actually use this Database variable, but the file
open, and so yields much faster results.

- Name AutoCorrect can cause lots of problems as all names are passed
through it first.

- How long is the path name in the Connect property of the TableDef? Believe
it or not, that makes a major difference also.

For several other general suggestions on performance in Access, see:
http://www.granite.ab.ca/access/performancefaq.htm


Nov 13 '05 #3

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

Similar topics

6
6897
by: Ljoha | last post by:
I need to create report where will be shown total quantity of all rows for every hour in some data range. I have a table where I have column in DATETIME format. I have problem to create sql query where I have to get result of the all counts for every hour of the date range. Something like that: from starting hour to final hour = total row...
2
5149
by: panda | last post by:
Dear ALL, I was trying to connect to a remote AIX DB2 database from a Windows 2000 machine in two ways: 1) Use DB2 client in Windows to connect to the cataloged DB I typed "db2 connect to mydb user myuser using mypassword" in the DB2 command line. The connection is nearly instant.
2
2406
by: Shane Suebsahakarn | last post by:
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...
2
4479
by: MLH | last post by:
I copied the following code right out of MS Access 2.0 HELP under Index Property Setting example... Sub Button0_Click () Dim MyDB As Database, MyTable As Recordset Set MyDB = DBEngine.Workspaces(0).Databases(0) Set MyTable = MyDB.OpenRecordset("tblOrders", DB_OPEN_TABLE) MyTable.Index = "PrimaryKey" MyTable.Seek "=", 10050 MyTable.Close
7
26942
by: ddsvi78 | last post by:
I am a complete idiot when it comes to access. Now that said, I work for a computer security company and one of our customers came to us with an access problem. They had been running fine for a long time. Then about a month ago there main server that hosted all the .mdb files crashed. So they restored everything to a new server (I believe...
21
4673
by: lesperancer | last post by:
I've got an access97 reporting mdb that pulls data (77,000 rows) from a sql server table into a local table to run reports if the local table is part of the reporting MDB, the insert statement (16 fields) takes less than 30secs, but because of db-bloat, I moved the local table to a 2nd MDB and per postings, this 2nd MDB is copied into a...
13
4505
by: Arno R | last post by:
Hi all, I am deploying an A2k app to users with different versions of Access. Using Access 2000 the relinking on startup (on deploying a new frontend or when backend has changed) is very fast. It takes about 4-5 seconds to relink some 50 tables. (I am relinking, not refreshing) Using Access 2003 the relinking is very slow compared with...
1
1403
by: Fixnthings | last post by:
Hi all, I am new to this thread. My dilema is.... I am going to put my website up. However, my DB I need to upload for my shopin cart is in MSAccess and I want to have my website platform in LINUX, sooooo my question is can I convert MSAccess to MySQL and if so, how? And if not, does this mean I have to input one by one 350,000 products,...
0
790
by: jnd001 | last post by:
Hello, I am trying to interface serial data logging to msaccess database. Following macro-module-code works fine. Function GetCPSData() Dim ChannelNumber As Variant Dim MyData As String ChannelNumber = DDEInitiate("CPSPLUS", "DRIVER") MyData = DDERequest(ChannelNumber, "COM1_VALUE")
0
7923
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
7852
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
8216
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
8349
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
5719
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
5395
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2364
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
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1192
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.