I have developed a POS application with one DBC and about 100 tables which is used on small networks. I find my customers have to (should) frequently (2 or more time per day) re-index the tables to prevent corrupt data. Part of the re-index routine rebuilds the DBC by the following code snipet:

Remove table MyTable
Free table MyTable
Add table MyTable

Periodically, tables lose their link, etc to the DBC, requiring the above code. Is there a better way to rebuild the DBC? Am I approaching the problem incorrectly?

TIA

Re: Rebuild DBC by Eric

Eric
Wed Jun 30 06:19:35 CDT 2004

Hello, Cowboy!
You wrote on Wed, 30 Jun 2004 03:54:01 -0700:

C> I find my customers have to (should) frequently (2 or more time per day)
C> re-index the tables to prevent corrupt data.

Why? There must be a reason your tables get corrupted. I suggest you fix
that problem first, rather then reindexing the tables all the time. My
largest VFP database has hundreds of millions of records and it's tables
haven't been reindexed in two years.

If your customers are running virus scanners, make sure they exclude the
dbf/fpt/cdx files from the scan. Make sure the hard disks are OK. Hook their
servers to a UPS and use good quality network adapters.
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Re: Rebuild DBC by Rick

Rick
Wed Jun 30 07:53:17 CDT 2004

Cowboy,
I agree with Eric - it shouldn't be happening that frequently. Consider =
looking into the Stonefield Database Toolkit =
(http://www.stonefield.com/), some of us wouldn't deploy a "real" =
application without it. I've also used a hacked GENDBC.PRG to recreate a =
DBC "live", although depending on exactly what you want to do, in it's =
original format, it may work for you.

Rick

"Cowboy" <Cowboy@discussions.microsoft.com> wrote in message =
news:040619C1-ECD8-4641-886F-3619B7841F3E@microsoft.com...
> I have developed a POS application with one DBC and about 100 tables =
which is used on small networks. I find my customers have to (should) =
frequently (2 or more time per day) re-index the tables to prevent =
corrupt data. Part of the re-index routine rebuilds the DBC by the =
following code snipet:
>=20
> Remove table MyTable
> Free table MyTable
> Add table MyTable
>=20
> Periodically, tables lose their link, etc to the DBC, requiring the =
above code. Is there a better way to rebuild the DBC? Am I approaching =
the problem incorrectly?
>=20
> TIA

Re: Rebuild DBC by Leemi

Leemi
Wed Jun 30 09:04:09 CDT 2004

Hi Cowboy:

Eric is correct; you need to determine the root cause instead of rebuilding
the files on a constant basis. If the environment is stable, then you
should not need to repair the table all the time.

Along with Eric's suggestions, you might want look at these points:

1. Make sure you lave the latest service packs installed on all operating
systems.
2. Make sure you have the most recent SP for your version of VFP. (VFP
6-SP5, VFP 7.0 SP1, VFP 8-SP1).
3. Remove or disable all terminate and stay resident programs.

I also found these articles on possible causes of corruption:

264867 INFO: Possible Causes of Data Corruption in Visual FoxPro
http://support.microsoft.com/?id=264867

193952 HOWTO: Troubleshoot to Resolve Suspected Corruption
http://support.microsoft.com/?id=193952


I hope this helps.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP9 Public Beta Now Available!! --*
Download the VFP9 beta here: http://msdn.microsoft.com/vfoxpro/

*-- VFP8 HAS ARRIVED!! --*
Read about all the new features of VFP8 here:
http://www.universalthread.com/VisualFoxPro/News/VFP8Release.asp
Purchase VFP8 here:
http://shop.microsoft.com/Referral/Productinfo.asp?siteID=11518

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retired Sept. 30th, 2003


>Hello, Cowboy!
>You wrote on Wed, 30 Jun 2004 03:54:01 -0700:

> C> I find my customers have to (should) frequently (2 or more time per
day)
> C> re-index the tables to prevent corrupt data.

>Why? There must be a reason your tables get corrupted. I suggest you fix
>that problem first, rather then reindexing the tables all the time. My
>largest VFP database has hundreds of millions of records and it's tables
>haven't been reindexed in two years.

>If your customers are running virus scanners, make sure they exclude the
>dbf/fpt/cdx files from the scan. Make sure the hard disks are OK. Hook
their
>servers to a UPS and use good quality network adapters.
>--
>Eric den Doop
>www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8


Re: Rebuild DBC by Ook

Ook
Wed Jun 30 10:39:22 CDT 2004

> Am I approaching the problem incorrectly?

Yes. Find out what is causing the problem. Is there a workstation that keeps
crashing? Does the user keep hitting the reset button? Is there a network
problem? Power problem? Find out what is causing the problem in the first
place. Reindexing schemes won't stop this from happening. Stonefield won't
fix it or stop it from happening.

Get a good database repair tool, like Abri's Recover (Stonefield is not a
database repair tool, BTW). I bundle it with all of my applicaitons, and
have it run once a day. Since I've done that, I've not had any serious data
issues at all.



"Cowboy" <Cowboy@discussions.microsoft.com> wrote in message
news:040619C1-ECD8-4641-886F-3619B7841F3E@microsoft.com...
> I have developed a POS application with one DBC and about 100 tables which
is used on small networks. I find my customers have to (should) frequently
(2 or more time per day) re-index the tables to prevent corrupt data. Part
of the re-index routine rebuilds the DBC by the following code snipet:
>
> Remove table MyTable
> Free table MyTable
> Add table MyTable
>
> Periodically, tables lose their link, etc to the DBC, requiring the above
code. Is there a better way to rebuild the DBC? Am I approaching the
problem incorrectly?
>
> TIA



Re: Rebuild DBC by Rick

Rick
Wed Jun 30 12:56:45 CDT 2004

Ook,
While SDT can't repair a database, table, index or view after the fact, =
if you use SDT to start with, it can repair many of the 'normal' =
problems. It keeps meta data on all the files and can repair and =
recreate them using this data. It's kind of like Norton Utilities =
Unerase - while you might be able to recover some files that were =
deleted before you install it, if it is already installed, you'll =
usually have no problems recovering them.

Rick

"Ook" <usenet@nospam.emberts.com> wrote in message =
news:ejprqhrXEHA.3516@TK2MSFTNGP09.phx.gbl...
> > Am I approaching the problem incorrectly?
>=20
> Yes. Find out what is causing the problem. Is there a workstation that =
keeps
> crashing? Does the user keep hitting the reset button? Is there a =
network
> problem? Power problem? Find out what is causing the problem in the =
first
> place. Reindexing schemes won't stop this from happening. Stonefield =
won't
> fix it or stop it from happening.
>=20
> Get a good database repair tool, like Abri's Recover (Stonefield is =
not a
> database repair tool, BTW). I bundle it with all of my applicaitons, =
and
> have it run once a day. Since I've done that, I've not had any serious =
data
> issues at all.
>=20
>=20
>=20
> "Cowboy" <Cowboy@discussions.microsoft.com> wrote in message
> news:040619C1-ECD8-4641-886F-3619B7841F3E@microsoft.com...
> > I have developed a POS application with one DBC and about 100 tables =
which
> is used on small networks. I find my customers have to (should) =
frequently
> (2 or more time per day) re-index the tables to prevent corrupt data. =
Part
> of the re-index routine rebuilds the DBC by the following code snipet:
> >
> > Remove table MyTable
> > Free table MyTable
> > Add table MyTable
> >
> > Periodically, tables lose their link, etc to the DBC, requiring the =
above
> code. Is there a better way to rebuild the DBC? Am I approaching the
> problem incorrectly?
> >
> > TIA
>=20
>

Re: Rebuild DBC by Paul

Paul
Wed Jun 30 18:00:44 CDT 2004

=?Utf-8?B?Q293Ym95?= <Cowboy@discussions.microsoft.com> wrote in
news:040619C1-ECD8-4641-886F-3619B7841F3E@microsoft.com:

>
> Remove table MyTable
> Free table MyTable
> Add table MyTable
>

You should not have to do that. The DBC has the table fields
and indexing rules info but not individual record fields index info.
If you suspect the DBC is being corrupt, just keep a good copy of
it and use it to replace the bad one when it happens. I assume
no table structure or indexes, rules, etc. have changed for the table.

-----------------------------------------------------------------
Paul Lee ........... Abri Technologies ......... http://abri.com/
'Recover' - top rated FoxPro file repair utility.
-----------------------------------------------------------------

Re: Rebuild DBC by Ook

Ook
Thu Jul 01 18:56:31 CDT 2004

It's table repair abilities are limited, and it is not a good substitution
for a good repair utility. That is why I use Abri's most excellent Recover
utility.

"Rick Bean" <rgbean@unrealmelange-inc.com> wrote in message
news:u38DdusXEHA.3156@TK2MSFTNGP12.phx.gbl...
Ook,
While SDT can't repair a database, table, index or view after the fact, if
you use SDT to start with, it can repair many of the 'normal' problems. It
keeps meta data on all the files and can repair and recreate them using this
data. It's kind of like Norton Utilities Unerase - while you might be able
to recover some files that were deleted before you install it, if it is
already installed, you'll usually have no problems recovering them.

Rick

"Ook" <usenet@nospam.emberts.com> wrote in message
news:ejprqhrXEHA.3516@TK2MSFTNGP09.phx.gbl...
> > Am I approaching the problem incorrectly?
>
> Yes. Find out what is causing the problem. Is there a workstation that
keeps
> crashing? Does the user keep hitting the reset button? Is there a network
> problem? Power problem? Find out what is causing the problem in the first
> place. Reindexing schemes won't stop this from happening. Stonefield won't
> fix it or stop it from happening.
>
> Get a good database repair tool, like Abri's Recover (Stonefield is not a
> database repair tool, BTW). I bundle it with all of my applicaitons, and
> have it run once a day. Since I've done that, I've not had any serious
data
> issues at all.
>
>
>
> "Cowboy" <Cowboy@discussions.microsoft.com> wrote in message
> news:040619C1-ECD8-4641-886F-3619B7841F3E@microsoft.com...
> > I have developed a POS application with one DBC and about 100 tables
which
> is used on small networks. I find my customers have to (should)
frequently
> (2 or more time per day) re-index the tables to prevent corrupt data.
Part
> of the re-index routine rebuilds the DBC by the following code snipet:
> >
> > Remove table MyTable
> > Free table MyTable
> > Add table MyTable
> >
> > Periodically, tables lose their link, etc to the DBC, requiring the
above
> code. Is there a better way to rebuild the DBC? Am I approaching the
> problem incorrectly?
> >
> > TIA
>
>