473,396 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

App Crashes on Compact & Repair

A2003 on Win XP Pro.

A number of very stable apps I have are lately sometimes crashes when
I do a compact & repair, especially when I hold the shift key to do
so.

When this starts happening, I usually turn off or restart my
computer. Sometimes this stops the crashing, sometimes it doesn't.
I'm really not sure why this is happening, I've never experienced it
before.

I first noticed this about a month ago.

Does this sound like anything that might be related to some of the
recent XP updates?
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto

Aug 11 '08 #1
9 3295
Does the vba code compile? Are there any "impossible" queries? (Ones that
won't run because they're missing tables, fields etc.) Does the vba code
have precompiler directives?

Have you tried a decompile?

Chris
Microsoft MVP
Timmy! wrote:
>A2003 on Win XP Pro.

A number of very stable apps I have are lately sometimes crashes when
I do a compact & repair, especially when I hold the shift key to do
so.

When this starts happening, I usually turn off or restart my
computer. Sometimes this stops the crashing, sometimes it doesn't.
I'm really not sure why this is happening, I've never experienced it
before.

I first noticed this about a month ago.

Does this sound like anything that might be related to some of the
recent XP updates?
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200808/1

Aug 11 '08 #2
On Aug 11, 2:27 pm, "Chris O'C via AccessMonster.com" <u29189@uwe>
wrote:
Does the vba code compile? Are there any "impossible" queries? (Ones that
won't run because they're missing tables, fields etc.) Does the vba code
have precompiler directives?

Have you tried a decompile?
Thanks for replying, Chris.

Yes, compile produces no errors. Not sure what an impossible query is
- all my querydefs would be pass through queries (to Oracle)

I'm not sure what precompiler directives are?

Decompile doesn't help, in fact, I first noticed this during decompile
- after decompiling and closing the app then opening (holding shift)
and then compacting (while holding shift). But it happens outside of
decompile processes as well.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Aug 11 '08 #3
Do you have any local tables with memo fields? If so one of your memos may
be corrupted which can crash a compact & repair. You can find the record by
opening the table and scrolling down until you see "ERROR" in the memo
field. Do not enter this record, use a query to delete the record then try
compact & repair.

If no memo fields, try importing into a new database file.

"Timmy!" <tm******@mun.cawrote in message
news:21**********************************@m73g2000 hsh.googlegroups.com...
A2003 on Win XP Pro.

A number of very stable apps I have are lately sometimes crashes when
I do a compact & repair, especially when I hold the shift key to do
so.

When this starts happening, I usually turn off or restart my
computer. Sometimes this stops the crashing, sometimes it doesn't.
I'm really not sure why this is happening, I've never experienced it
before.

I first noticed this about a month ago.

Does this sound like anything that might be related to some of the
recent XP updates?
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto

Aug 11 '08 #4
An impossible query is one where Jet can't execute the query and therefore
can't compile it on its first run. This would usually happen when a file
holding a linked table gets moved. Table doesn't exist in current db so a
query naming that table is impossible to execute. Jet renames things when in
design view like Expr1, Expr2 etc. Jet can't compile the query so you might
have trouble compacting the db.

Pass through queries aren't going to be compiled by Jet so I don't think
that's your problem.

Might be time to start fresh by creating a new db file, turning off track
name autocorrect, importing everything into it, then compiling and compacting.
Chris
Microsoft MVP
Timmy! wrote:
>On Aug 11, 2:27 pm, "Chris O'C via AccessMonster.com" <u29189@uwe>
wrote:
>Does the vba code compile? Are there any "impossible" queries? (Ones that
won't run because they're missing tables, fields etc.) Does the vba code
have precompiler directives?

Have you tried a decompile?

Thanks for replying, Chris.

Yes, compile produces no errors. Not sure what an impossible query is
- all my querydefs would be pass through queries (to Oracle)

I'm not sure what precompiler directives are?

Decompile doesn't help, in fact, I first noticed this during decompile
- after decompiling and closing the app then opening (holding shift)
and then compacting (while holding shift). But it happens outside of
decompile processes as well.
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200808/1

Aug 11 '08 #5
And precompiler directives are #if, #else, #end if in vba code to
conditionally compile blocks of code. If you don't know what they are, and
you're the only one who ever worked on the db, you won't have any of these in
your code.

Chris
Microsoft MVP
Chris O'C wrote:
>An impossible query is one where Jet can't execute the query and therefore
can't compile it on its first run. This would usually happen when a file
holding a linked table gets moved. Table doesn't exist in current db so a
query naming that table is impossible to execute. Jet renames things when in
design view like Expr1, Expr2 etc. Jet can't compile the query so you might
have trouble compacting the db.

Pass through queries aren't going to be compiled by Jet so I don't think
that's your problem.

Might be time to start fresh by creating a new db file, turning off track
name autocorrect, importing everything into it, then compiling and compacting.

Chris
Microsoft MVP
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200808/1

Aug 11 '08 #6
On Aug 11, 4:10 pm, "Chris O'C via AccessMonster.com" <u29189@uwe>
wrote:
Might be time to start fresh by creating a new db file, turning off track
name autocorrect, importing everything into it, then compiling and compacting.
Thanks again Chris and to Ron.

Yes, I always try to make sure I turn off what Allen Browne, I think,
referred to as "autocorrupt" when I first saw his posts about a few
years ago. 8)

And I did create a blank database, autocorrupt off. imported
everything and still the behaviour persisted.

Sometimes I do have local Jet tables and some of these do have memo
fields, but usually whenever they are used (often, for example, to
list choices a person has made from a combo box and display the
choices alphabetically), I run an execute "delete * from tbl_Jet_Sort"
sort of thing. I must keep Ron's suggestion in mind for future
occurrences in other apps. Though for the app where I am experiencing
problems, there were no local Jet tables.

Happily, for the app where this was happening, it seems to have gone
away again and I'm not 100% sure why. One thing I did do was go into
the module where I keep all my constants (things like various ODBC
connect strings for different DSNs for PTQ construction or standard
PTQ query names I don't want all over my code in case I want to change
them and so on). In this app, all my constants were defined as per
the following example (the constant refers to the name of an Oracle
view - the equivalent of a querydef - frequently used):

Public Const cAssets as string = "tma.V_PERMIT_ASSETS"

I got rid of the "as string" on all of them:

Public Const cAssets = "tma.V_PERMIT_ASSETS"

and suddenly the app was compacting properly.

cAssets is used in situations like setting up the SQL of a PTQ the VBA
is about to create. For example:

dim strS as string

strS = "select p_tag_no, p_tag_description from " & cAssets

I have no idea if including definition of the constant as a string was
the cause, as sometimes, in other cases where this occurs, the
behaviour goes away and I'm not sure why. Does anyone think this
might be it?
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Aug 11 '08 #7
"Timmy!" <tm******@mun.cawrote in
news:21**********************************@a1g2000h sb.googlegroups.com
:
I have no idea if including definition of the constant as a string
was the cause, as sometimes, in other cases where this occurs, the
behaviour goes away and I'm not sure why. Does anyone think this
might be it?
No, but it likely caused problematic code to be discarded, because
any code that used the constant would have to be completely
recompiled.

It sounds to me like you didn't really import properly. You should
only import into a new MDB from a decompiled and compacted source,
because otherwise, some of the corrupted code could be carried over
through the import.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Aug 12 '08 #8
On Aug 11, 10:03 pm, "David W. Fenton" <XXXuse...@dfenton.com.invalid>
wrote:
It sounds to me like you didn't really import properly. You should
only import into a new MDB from a decompiled and compacted source,
because otherwise, some of the corrupted code could be carried over
through the import.
Thanks David,

Unfortunately, that wouldn't help, because I'd be unable to compact
after decompile.

And while I thought the afore mentioned removal of "as string" worked,
it didn't. I was curious and opened the corrupted mdb, or the one
that had the "as string" in the constant declarations and compacted
it. It crashed. Then the reconstructed mdb with the as string
removed started crashing too.

I'm very careful and try very hard to be consistent with my code. But
this was an mdb that had been reconstructed for me from an mde
(original mdb code was lost in an unfortunate incident). The
reconstruction used some code with dbengine in it, which I never ever
use. It was on a form that I didn't recognize, was not referenced
anywhere else in the application, so I ditched the form. It's
behaving now.
--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto
Aug 12 '08 #9
"Timmy!" <tm******@mun.cawrote in
news:cf**********************************@e39g2000 hsf.googlegroups.co
m:
On Aug 11, 10:03 pm, "David W. Fenton"
<XXXuse...@dfenton.com.invalidwrote:
>It sounds to me like you didn't really import properly. You
should only import into a new MDB from a decompiled and compacted
source, because otherwise, some of the corrupted code could be
carried over through the import.

Unfortunately, that wouldn't help, because I'd be unable to
compact after decompile.
Then you need to us Application.SaveAsText/.LoadFromText to recreate
the app.

[]
I'm very careful and try very hard to be consistent with my code.
But this was an mdb that had been reconstructed for me from an mde
(original mdb code was lost in an unfortunate incident). The
reconstruction used some code with dbengine in it, which I never
ever use. It was on a form that I didn't recognize, was not
referenced anywhere else in the application, so I ditched the
form. It's behaving now.
Again, I don't use of the DBEngine object would by itself be a
source of instability, as it's one of the most basic components of
Access.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Aug 12 '08 #10

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

Similar topics

2
by: Ray | last post by:
Stop me if you've heard this, but I am running Access 2002 and all of a sudden, if I design a particular form (it's been working fine for ages), Access crashes rather than open it in design view. ...
5
by: Lauren Wilson | last post by:
Hi folks, Somewhere, I recently saw an article header titled: "How to compact and Repair a back-end Access db from the front-end using VBA" or words to that effect. Now that I need it, I...
6
by: GaryDave | last post by:
My school registration database has not been quite right after a recent compact and repair (done while I was away). Though most of the many forms and subforms are working normally, one form in...
2
by: ApexData | last post by:
Hello I have finally completed an application and am preparing to install it on a network of 10 users. The application will be split FE/BE. The application has its own login, which controls...
2
by: Ron | last post by:
Hi All, Using WinXP pro/Access 2000. I have a database that's been used for about 5 months. Transferred lots of data from a dos based program, then the users have been using it for that 5...
9
by: Ron | last post by:
New discovery. If I take a perfectly good database, and "compact/repair" on it with Access 2000 (seems to be at multiple sites--I've tried it with my system here, at another office on an...
3
by: mnjkahn via AccessMonster.com | last post by:
I'm running Access 2003, modifying a query that has over 45 fields. When I right click on the field name in Query Design View, and then click Build, Access crashes before the Build window...
2
by: bradhs | last post by:
Hello, Microsfot Access 2003 crashes constantly and randomly on Vista. I cant Compact and Repair, import into a new ADP file, etc... It crashes while opening a form, moving objects around in a...
4
by: Bob Alston | last post by:
For those of you that have replicated databases, how often to you compact and repair them? Also what mathod do you use if you do this on an automated way? How do you make sure that the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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,...
0
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...
0
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...

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.