473,769 Members | 2,376 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
25 1898
MLH
In the absence of being able to put my finger right on the culprit,
I was going to roll the dice and see what came of it. Do you suspect
anything in particular? What approach would you recommend, if you
yourself were unsure where the problem lay?

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


Nov 13 '05 #11
MLH
That's a bummer.
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.


Nov 13 '05 #12
MLH
I'll give "b" a shot first. I've not experimented with
Application.Sav eAsText or LoadFromText methods. Where can
I read more about it in A97 HELP or on the forum?
xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxx

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.


Nov 13 '05 #13
MLH
David, that's an impressive tool. The SaveAsText and LoadFromText
tools, it seems, are largely undocumented - from at least one post
I've read on the forum.

After experimenting with them, they seem indispensable for debugging
a problem like the one I'm having. Would you suggest I process objects
one-at-a-time, writing them to text, then rebuilding them from text to
identify the problematic item?

I sure hope this works. It looks quite promising. I never knew it was
there. Thank-you for the heads-up.
Nov 13 '05 #14
MLH
Looking at a post by Tony Toews back in 2002, in which he gave an
example syntax as follows...

Application.Sav eAsText acForm,"MyForm" ,"c:\form.tx t
You can load the file into a new MDB.
Application.Loa dFromText acForm,"MyForm" ,"c:\from.tx t"

.... I'm wondering if all objects in an mdb can be written off to text
files in an automated fashion, using their object names preceeded by
leading text strings like "tbl" "qry" "frm" "rpt" "mac" "bas".
I believe this would prove to be quite useful. ==> Sort of a database
object documenter / ODL.

Anybody know of work that's been done along those lines?
Nov 13 '05 #15
MLH
I'm inclined to agree with you. The hit 'n miss nature of my
problem made it hard to troubleshoot. Today, for instance,
I opened the report a few times - no problem whatsoever.

Then, in the last 15 minutes, I opened the report twice.
The first time, A97 instantly closed - no warning, no nothing,
just disappeared and there I was, looking at the desktop.
The second time, I got the familiar "Access has encountered
an error and has gotta close..." thing.

When I restarted & reopened the app, the first thing I did
was use the SaveAsText and LoadFromText tools this way:

Application.Sav eAsText
acReport,"rptPe ndingOutboundCo rrespDetails"," c:\rptPendingOu tboundCorrespDe tails.txt

Application.Loa dFromText
acReport,"rptPe ndingOutboundCo rrespDetails"," C:\DB\TimNall\T owPakObjectText \rptPendingOutb oundCorrespDeta ils.txt"

I renamed rptPendingOutbo undCorrespDetai ls to
rptPendingOutbo undCorrespDetai ls_OLD in between the
SaveAsText and LoadFromText. First time running the newly
created report - perfect - no hint of an error. However, running
the "old" one immediately afterward, it ran fine too. The insidious
nature of this anomoly has been somewhat scary. So, I'm crossing
my fingers.

But, might I ask, is it somehow possible that the actual corruption
itself might be a disk read error that sometimes succeeds & sometimes
does not? Win XP probably has a robust DOS and could be working
real hard to read a bad spot, sometimes succeeding and sometimes not.
Nov 13 '05 #16
MLH
Two very nice solutions there, Bob. Can't tell you
how much I appreciate it.

Michael H.
Nov 13 '05 #18
MLH <CR**@NorthStat e.net> wrote in
news:41******** *************** *********@4ax.c om:
But, might I ask, is it somehow possible that the actual
corruption itself might be a disk read error that sometimes
succeeds & sometimes does not? Win XP probably has a robust DOS
and could be working real hard to read a bad spot, sometimes
succeeding and sometimes not.


If you compact your database, it will end up stored in completely
different sectors of your hard drive, so this is very, very unlikely
to be possible in the first place.

And even if it were, the likelihood that the read error would
produce data that couldn't be detected as corrupt until it's
processed by Access seems remarkably farfetched to me.

It really sounds like a Jet error.

Is the recordsource a stored query or a SQL string?

Try switching from one to the other.

ANd try setting the recordsource in the report's OnOpen event as
another way to test this kind of problem.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #19
MLH
Well, if it breaks again, I'll try this. But right now, its fixed.
I have not seen the problem again since rebuilding the
report as you suggested. I will be more assured the prob
is gone if, after a few days, it still seems to be gone.

Is the recordsource a stored query or a SQL string? Yes, the recordsource is a stored query.
Try switching from one to the other. (in a few)
ANd try setting the recordsource in the report's OnOpen event as
another way to test this kind of problem.

(again, in a few)(
Nov 13 '05 #20

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

Similar topics

0
1764
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
4774
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
2128
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
1864
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
1580
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
1552
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
4474
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
9586
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
9423
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,...
0
10210
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10043
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9861
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
6672
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
5298
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...
0
5446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3956
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

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.