473,761 Members | 2,440 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Advice on when to compact a back-end file

I'm writing code to backup the back-end file from my front-end. The code will
automatically run the routine when the main app is closed and when certain
critieria are met.

The question is: What are those criteria??

I've seen a number of posts and experienced it myself that compacting can
occassionally cause corruption. So I don't want to compact unnecessarily.
My thinking is as follows:

1) When the back-end file is compacted from the front end, write the "after-
compact" file size of the backend file to a table.

2) Then when the app is closed in future sessions, run code that compares the
current back-end file size with the file size of the back-end file the last
time it was compacted. If the current size is XX% greater than the last-
compact size, compact the back-end file.

If this seems like a reasonable approach, what should the value of XX be?

Comments, suggestions on this approach.

Thanks.

--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200611/1

Nov 12 '06 #1
6 1448
On Sun, 12 Nov 2006 04:44:09 GMT, "rdemyan via AccessMonster.c om"
<u6836@uwewrote :

Compacting doesn't cause corruption, it reveals it.

A good backup schedule will allow the user to revert back to a "before
corruption" version should the need arise.

-Tom.

>I'm writing code to backup the back-end file from my front-end. The code will
automaticall y run the routine when the main app is closed and when certain
critieria are met.

The question is: What are those criteria??

I've seen a number of posts and experienced it myself that compacting can
occassionall y cause corruption. So I don't want to compact unnecessarily.
My thinking is as follows:

1) When the back-end file is compacted from the front end, write the "after-
compact" file size of the backend file to a table.

2) Then when the app is closed in future sessions, run code that compares the
current back-end file size with the file size of the back-end file the last
time it was compacted. If the current size is XX% greater than the last-
compact size, compact the back-end file.

If this seems like a reasonable approach, what should the value of XX be?

Comments, suggestions on this approach.

Thanks.
Nov 12 '06 #2
Thanks,

I'm still not going to compact the back-end files every time a user closes my
app. Instead, I'll stick with my plan and look for an increase in size of
either 10 or 20%, probably 20%.

Tom van Stiphout wrote:
>Compacting doesn't cause corruption, it reveals it.

A good backup schedule will allow the user to revert back to a "before
corruption" version should the need arise.

-Tom.
>>I'm writing code to backup the back-end file from my front-end. The code will
automatical ly run the routine when the main app is closed and when certain
[quoted text clipped - 19 lines]
>>
Thanks.
--
Message posted via AccessMonster.c om
http://www.accessmonster.com/Uwe/For...ccess/200611/1

Nov 12 '06 #3
rdemyan via AccessMonster.c om wrote:
<snips>
I've seen a number of posts and experienced it myself that compacting can
occassionally cause corruption.
I've seen the posts but I've never seen the corruption. IMO if this
actually ever did happen it's likely the reason was database suicide
prompted by embarassment upon being required to face up to
self-ugliness. I suppose someone will post a link to a compiled
error-free mdb which corrupts on compact to show me up as wrong. YYSSW!

<snips>
If this seems like a reasonable approach, what should the value of XX be?
It seems unreasonable to me; regardless I suppose XX should be zero or
more than zero or less than zero, somewhere in that range. If you're
worried about corruption why not just make a copy of the damn thing
before you compact, or do the compact to a new db, and then rename the
old and the new?
Comments, suggestions on this approach.
It's posts like this that contribute to the considerable body of Access
superstition that is alive and well and slopping back and forth like
bilge water in CDMA.

Nov 13 '06 #4
And here I had thought you had forgotten about me :).

Nobody is responding to my post on a custom "Please wait" message that I'm
trying to display when closing my app. Would appreciate it if you would take
a look at it. Thanks.

Lyle Fairfield wrote:
><snips>
>I've seen a number of posts and experienced it myself that compacting can
occassionall y cause corruption.

I've seen the posts but I've never seen the corruption. IMO if this
actually ever did happen it's likely the reason was database suicide
prompted by embarassment upon being required to face up to
self-ugliness. I suppose someone will post a link to a compiled
error-free mdb which corrupts on compact to show me up as wrong. YYSSW!

<snips>
>If this seems like a reasonable approach, what should the value of XX be?

It seems unreasonable to me; regardless I suppose XX should be zero or
more than zero or less than zero, somewhere in that range. If you're
worried about corruption why not just make a copy of the damn thing
before you compact, or do the compact to a new db, and then rename the
old and the new?
>Comments, suggestions on this approach.

It's posts like this that contribute to the considerable body of Access
superstition that is alive and well and slopping back and forth like
bilge water in CDMA.
--
Message posted via http://www.accessmonster.com

Nov 13 '06 #5
Lyle Fairfield wrote:
rdemyan via AccessMonster.c om wrote:
<snips>
I've seen a number of posts and experienced it myself that compacting can
occassionally cause corruption.

I've seen the posts but I've never seen the corruption.
I haven't seen that happen since Access 95.
It's posts like this that contribute to the considerable body of Access
superstition that is alive and well and slopping back and forth like
bilge water in CDMA.
Improbability is not reason enough to doubt rdemyan's experience :-).
I compact to a separate file, then compact back over the original file.
I back up both copies to a separate machine on the network and one to
DVD and both to my local machine. Call me superstitious if you'd like.

James A. Fortune
CD********@Fort uneJames.com

I lived in Spain for a month when I was 19. While in Madrid a young
man asked in English if I could help him solve a math problem. He was
staying at a hotel built around the 15th century. When we arrived at
his room he pulled out a Calculus book and showed me where he was
having trouble. I helped him, then asked, "How did you know I knew
Calculus?" He replied, "You looked like you know Calculus."

Nov 13 '06 #6

"rdemyan via AccessMonster.c om" <u6836@uwewro te in message
news:693b44a16c 4e6@uwe...
And here I had thought you had forgotten about me :).

Nobody is responding to my post on a custom "Please wait" message that I'm
trying to display when closing my app. Would appreciate it if you would
take
a look at it. Thanks.
Lyle, if you search the newsgroup to find rdemyan's post, which he/she did
not identify by link, or by subject, or by date and time, in order to "take
a look at it," please post back here and let us know. :-)

rdemyan, if you want help, you need to make it easy (repeat _easy_, repeat
_EASY_) for people to help you. There are thousands, multiples of ten
thousands, of archived posts for this newsgroup that can be searched at
http://groups.google.com but most of us aren't reading and responding there.
Referring to "my post on a custom... message" doesn't make it easy. For good
suggestions on effective use of newsgroups, see the FAQ at
http://www.mvps.org/access/netiquette.htm.

Larry Linson

Nov 13 '06 #7

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

Similar topics

4
1830
by: Paul Miller | last post by:
Some background first - we have some software that embeds a Python interpreter into a host application. Scripts are loaded dynamically and used. But we want to support the ability to edit scripts while the app is running. This means we have to "unload" the script and cause a reload. Normal module reloading tricks don't work because if you try to reimport a script that imports another script, and if the nested script is changed, it might...
16
2460
by: Michael Rozdoba | last post by:
I'm far from a CSS expert, but what I see of it I really like & I love keeping content & style separate. I also hate the way table layout produces convoluted bulky code. However when asked why one should use CSS rather than tables, particularly when tables work & browser support of CSS can be dodgy, especially in IE, I usually fail to come up with a concise & convincing argument :/ I've been having this long running discussion with a...
3
2778
by: Deacon | last post by:
Dear all, I am using DB2 for AIX, I have the following problem when migrating my DB from DB2 v7.2 to v8.1 I orginally have a table with a CLOB field with logged and not compact properties. We I use db2look to obtain the structure, the following is the output: CREATE TABLE "TEST"."TEST1" (
13
5076
by: James Franklin | last post by:
Hi, I have a number of databases in A2K, written on different machines with different installations of Office. I have found that compacting a database while it is open regularly fails, seemingly at random. This is especially annoying as I usually set the Compact on Close setting in Tools/Options to true. Has anyone else experienced this and is there a fix? Thanks for any help,
4
2082
by: Wayne | last post by:
Does "Compact On Close" do a "Compact and Repair" or just a compact. Is a compact necessary (or at least a good idea) on a regular basis, say weekly, for a database that has several hundred records per week added to it? TIA.
3
1866
by: Adam | last post by:
I've posted about this previously, but failed to receive a satisfactory response, so have included a code sample: I am trying to receive messages from an HTML viewer control in compact.net (c#), but cannot use message window as the control's parent window, as this is invisible and so the html is not viewable! I have a code sample showing the problem at www.tenwisevirgins.com/Example.zip
1
3077
by: Daniel Passwater via DotNetMonster.com | last post by:
I'm a newbie. So please be patient. I'm working on a C# app in compact framework for a PDA. It connects to a device and extracts and updates data. I need to double check with the user before I continue with the update. I would normally use a MessageBox with an OkCancelButton. However, the compact framework doesn't support but one overload: MessageBox(string). I need to send confirmation (bool) back to the form and act accordingly with the...
13
3113
by: Alan Silver | last post by:
Hello, MSDN (amongst other places) is full of helpful advice on ways to do data access, but they all seem geared to wards enterprise applications. Maybe I'm in a minority, but I don't have those sorts of clients. Mine are all small businesses whose sites will never reach those sorts of scales. I deal with businesses whose sites get maybe a few hundred visitors per day (some not even that much) and get no more than ten orders per day....
0
1263
by: sameer | last post by:
hey! guys i have a barcode scanner Symbol MC 9060 running windows CE .net with compact 1.1 framework installed on it. My application is done in Visual studio 2003, winforms with vb.net 2003 and uses webservices to connect to a remote webserver over the internet. Now the clinet is upgrading from a symbol MC9060 to MC9090 which runs windows mobile 5.0 premium(non-WAN) or Phone eidtion(WAN) with compact framwork 2.0. so here are couple...
232
13330
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first set of examples, after decoding the HTML FORM contents, merely verifies the text within a field to make sure it is a valid representation of an integer, without any junk thrown in, i.e. it must satisfy the regular expression: ^ *?+ *$ If the...
0
9522
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
10111
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
9948
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...
1
9902
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
8770
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...
1
7327
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6603
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
5215
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...
3
3446
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.