473,756 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

I wish to rebuild all A97 tables from scratch - whew! Prefer to automate task.

MLH
In an earlier post entitled...

"A97 closes down each time I open a particular report"

it has been suggested that I rebuild problematic table - one in which
some corruption has occurred. I don't know which table is the problem,
so I would like to rebuild them all in a new database. I'm sure most
of you would cringe at the thought of having to do this manually for
most of your applications.

So, I'm writing to ask if any of you have written code to print the
vital elements required to construct your own tables from within code.
Something to automate the process, if you know what I mean. Manually
building a table isn't such a big deal. But 51 of them? That's another
story altogether.

So many individual field properties to keep up with! Wow, there's lots
of room for oversights and outright mistakes. Would like to create a
list of STUFF for each table that I could parse & import into code to
allow me to recreate the tables automatically - inside a VBA class
module.

I'm afraid of simply EXPORTING any existing table (structure only) for
fear of the unknown - I simply don't know whether any corruption that
might be present in any of my existing tables would be transferred to
the copies created.
Nov 13 '05 #1
25 1895
MLH wrote:
In an earlier post entitled...

"A97 closes down each time I open a particular report"

it has been suggested that I rebuild problematic table - one in which
some corruption has occurred. I don't know which table is the problem,
so I would like to rebuild them all in a new database. I'm sure most
of you would cringe at the thought of having to do this manually for
most of your applications.

So, I'm writing to ask if any of you have written code to print the
vital elements required to construct your own tables from within code.
Something to automate the process, if you know what I mean. Manually
building a table isn't such a big deal. But 51 of them? That's another
story altogether.

So many individual field properties to keep up with! Wow, there's lots
of room for oversights and outright mistakes. Would like to create a
list of STUFF for each table that I could parse & import into code to
allow me to recreate the tables automatically - inside a VBA class
module.

I'm afraid of simply EXPORTING any existing table (structure only) for
fear of the unknown - I simply don't know whether any corruption that
might be present in any of my existing tables would be transferred to
the copies created.


Don't know. Maybe transfer the empty tables to a new mdb. If any keys
are Autonumber, change them to Long...and remember to change them back
to Autonumber after the update.

Then link to the tables in the old database. All of the linked tables
will have the same table name as the blank table...but with the number 1
at the end of it.

Then write some code to scan all the tables that end in 1 and write the
query code to append them into the blank table.

Then delete all tabledefs that end in 1.

Then change the Longs back to Autonumber.
Nov 13 '05 #2
MLH wrote:
In an earlier post entitled...

"A97 closes down each time I open a particular report"

it has been suggested that I rebuild problematic table - one in which
some corruption has occurred. I don't know which table is the problem,
so I would like to rebuild them all in a new database. I'm sure most
of you would cringe at the thought of having to do this manually for
most of your applications.


Sledge hammer approach IMO.

Just import all of the tables from the existing file into a new one. IME
corrupted tables will either refuse to import or will be fixed in the import
process. Alternatively you could import all of the tables using the
"Definition Only" option. If the corruption is merely *data* then you can
repopulate the new tables afterwards.

--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #3
I wrote an article for DBJ about using DDL to create tables.
http://www.databasejournal.com/featu...le.php/3460771

That's a lot of work, and I concluded by asking if anyone knew of a tool that
would reverse engineer an Access database into the requisite scripts to rebuild.
Someone provided this tool, which I played with and liked ...

http://www.synametrics.com/Synametri...rogName=WinSQL

They provide a free version called WinSQL Lite or you can purchase the
professional version.

If you just want to document your fields, there are lots of tools and free
code. The DataFast Utility at my site has such a documentor. Just follow
the link in my tag line and click on Downloads. Look for DataFast Utility.
--

Danny J. Lesandrini
dl*********@hot mail.com
http://amazecreations.com/datafast/

"MLH" <CR**@NorthStat e.net> wrote ...
In an earlier post entitled...

"A97 closes down each time I open a particular report"

it has been suggested that I rebuild problematic table - one in which
some corruption has occurred. I don't know which table is the problem,
so I would like to rebuild them all in a new database. I'm sure most
of you would cringe at the thought of having to do this manually for
most of your applications.

So, I'm writing to ask if any of you have written code to print the
vital elements required to construct your own tables from within code.
Something to automate the process, if you know what I mean. Manually
building a table isn't such a big deal. But 51 of them? That's another
story altogether.

So many individual field properties to keep up with! Wow, there's lots
of room for oversights and outright mistakes. Would like to create a
list of STUFF for each table that I could parse & import into code to
allow me to recreate the tables automatically - inside a VBA class
module.

I'm afraid of simply EXPORTING any existing table (structure only) for
fear of the unknown - I simply don't know whether any corruption that
might be present in any of my existing tables would be transferred to
the copies created.

Nov 13 '05 #4
MLH <CR**@NorthStat e.net> wrote in
news:to******** *************** *********@4ax.c om:
In an earlier post entitled...

"A97 closes down each time I open a particular report"

it has been suggested that I rebuild problematic table - one in
which some corruption has occurred


I think that's bad advice.

I strongly doubt that the table is to blame for a report crashing.

Much more likely:

1. something wrong with the report's recordsource. If it's a stored
query, try recreating it by pasting the SQL into a new query, saving
it, then executing and saving it again.

2. something corrupt in the report's VBA module. This can be
addressed one of two ways:

a. the easy, but incomplete way: copy the module into Notepad,
then change the report's HasModule property to FALSE. Then save
it, compact the front end, then open the report, go to the code
window for it and past your module back in. Compile it and save
the report and see if the problem goes away.

b. the complete way: use Application.Sav eAsText to write the
report definition out to a text file, then use
Application.Loa dFromText to rebuild it.

It could also be that the problem is *data-specific* -- it could be
that a particular record, or records with particular types of data
in them are waht is causing the report to crash. That would likely
be a Jet error that is somehow not bubbling up to Access's error
handler.

And if the problem is in any of the areas outlined above, rebuilding
the tables won't have any effect whatsoever. That's the *last* thing
I'd investigate, after doing all of the above.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #5
Salad <oi*@vinegar.co m> wrote in
news:MV******** ********@newsre ad3.news.pas.ea rthlink.net:
Then change the Longs back to Autonumber.


Er, you *can't* do that. Once an Autonumber is changed to Long, it's
neer going to be an Autonumber again.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #6
"Rick Brandt" <ri*********@ho tmail.com> wrote in
news:zj******** *******@newssvr 13.news.prodigy .com:
MLH wrote:
In an earlier post entitled...

"A97 closes down each time I open a particular report"

it has been suggested that I rebuild problematic table - one in
which some corruption has occurred. I don't know which table is
the problem, so I would like to rebuild them all in a new
database. I'm sure most of you would cringe at the thought of
having to do this manually for most of your applications.


Sledge hammer approach IMO.

Just import all of the tables from the existing file into a new
one. IME corrupted tables will either refuse to import or will be
fixed in the import process. Alternatively you could import all
of the tables using the "Definition Only" option. If the
corruption is merely *data* then you can repopulate the new tables
afterwards.


Well, that's not necessarily true. Certain kinds of corruption can
be imported along with the data tables. The only certain way to
avoid carrying that corruption along into the new MDB is to rebuild
the tables from scratch.

But I think table corruption is extremely unlikely as the cause of a
report crashing.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #7
"Danny J. Lesandrini" <dl*********@ho tmail.com> wrote in
news:xc******** ************@co mcast.com:
I wrote an article for DBJ about using DDL to create tables.
http://www.databasejournal.com/featu...cle.php/346077
1


But is it not the case that Jet DDL cannot create all the
Access-specific properties?

You'd have to use DAO, and walk the propoerties collection of each
field, and my memory of attempting this is that for some reason,
this doesn't actually work.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #8
MLH
Thx, Salad. As always, very intuitive and resourceful.
I tend to like Danny Lesandrini's suggestion of an "air
product" that doesn't seem to exist, but like Danny, I
wish it did. In the absence of that, I think I'll give Rick
Brandt's suggestion a try. Did you read it? He pointed
out that IHE, corrupted tables were fixed during trans-
port. I didn't know Access was designed that way. But
hey, if it is, that may be my remedy.

Anyone else have substance to add to the notion that
MS Access fixes broken tables during import/export. It
would be quite helpful.
Nov 13 '05 #9
MLH
And its an awfully heavy sledgehammer too.

Just import all of the tables from the existing file into a new one. IME
corrupted tables will either refuse to import or will be fixed in the import
process. Alternatively you could import all of the tables using the
"Definition Only" option. If the corruption is merely *data* then you can
repopulate the new tables afterwards.


I certainly have nothing to lose by trying. I'll do just that and
cross my fingers. Any thoughts on Danny Lesandrini's comments?
I would love to get my hands on a nice add-in that methodically
analyzed all database objects manually created, wrote DDL scripts (or
ODL scripts - object definition language) and rebuilt database objects
from scratch upon running the script. Ever heard of anything like
that? I know how much coding goes into partially rebuilding or
restructuring a form to fit in an environment running a different
screen resolution. Its no cakewalk.
Nov 13 '05 #10

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

Similar topics

0
1762
by: Roman Schicht | last post by:
I have an 9i RAC on W2K-Advanced Server with 2 Nodes. The 2nd Node has to be reinstalled from scratch for a problem with Windows. What must be done (before and) after ReInstallation, that the RAC will be the same as before?? Thanks for every Advice.. KR
2
2606
by: Beyonder | last post by:
I have five tables in my database, there are actually NO common fields between them, not even a KEY or ID or anything like that, except for the "body" of a blob field. and that text is not identical, just a portion of that text is identical. each table has 5 fields, all different except the blob, which is called "message", so normally I use something like: select * from table1 where message like '%apple%';
1
4772
by: xo55ox | last post by:
Hi, I want to find out what is a good way to identify indexes that need rebuilding. I tried to run DBCC showcontig and identify them based on the scan density %. And according to a Microsoft Tech Net - All About SQL Server Indexes discussion, the expert stated that based on the Density (below 20%), I can pick out those indexes associated to the table and run DBCC INDEXDEFRAG. But instead, I ran DBCC DBREINDEX to rebuild all indexes...
2
2126
by: aleatory | last post by:
Hi Access masters, Sorry for asking a very simple question, but how could I locate source tables which have been linked into the Access database? The following is an ASCII- based screen shot: | +=============================================== | | db1: Database | +-----------------------------------------------
4
1863
by: ortaias | last post by:
A couple of my forms may be corrupted. I am using ACCESS2000. I have noticed that on a couple of forms, my computer's CPU usage hits 100% and stays there. Running the compacting/repair tool only provided temporary relief. These forms have been checked for "bad" code, but none was observed, also these forms previously did not seem to eat-up the CPU usage. I am assuming that the best strategy to solve this problem would be to rebuild...
7
1578
by: Eugene | last post by:
Hi all, I have the following table Name Date Wish Valid Name is person's name, date defaults to getdate() and is never assigned directly (datetime field), Wish is some message, and Valid is bit, 1 indicates if the wish is the latest, and therefore valid. All previous wishes are kept in database, and are "invalidated" by setting
1
4337
by: Johnny Jörgensen | last post by:
Can anybody please clarify to me what the difference between Build and Rebuild is in Visual Studio 2005? Cheers, Johnny J.
1
1551
by: digitalox | last post by:
All efforts to rebuild indexes fails. Not with an error, but they still show high fragmentation. The environment: SQL Server 2005 in 2000 compatibility mode non-clustered indexes on tables that have clustered indexes with unique constraint Tried so far: Rebuild, reorganize, manual drop and recreate, setting the db in 2005 mode This only seems to happen on the tables that also have the clustered index with a unique contraint ( which...
1
7178
by: dsdevonsomer | last post by:
Hello all, I am new to managing indexes on large tables and need some help. Hopefully, I am not repeating question here. I searched as much as I can, but not finding relatively best answer.. Here is my scenario. I have 2 tables with more than 4 mil rows (1 - 2.8 Mil, 2 2.1 mil). Of these tables, there are about 25 ( select ) queries run to help generate reports every week.
18
4473
by: afromanam | last post by:
Whew.. OK, running access 2003 in win xpsp2 and access 2007 in win vista. This is the question... We have a db, split in front end (FE.mdb) and backend (BE.mdb) FE has tons of linked tables from BE.
0
9455
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9271
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9838
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9708
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8709
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6534
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5140
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3805
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
2
3354
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.