Hi all,
i recently installed vfp 8.0 on my system and when i try
to open (use) zapped dbf files from vfp 6 i get the
following error: "Table 'C:\mytable.DBF' has become
corrupted. The table will need to be repaired before using
again."
In the help Microsoft says that it is required a third
party tool for repairing but with vfp 6 the file works
fine.
if i append a record from vfp 6 the file is accessible
from vfp 8.0 but if it is zapped, no.

I would like to know why this behaviour ???
Is something wrong on my machine???


Note: The behaviour is the same with both SET COMPATIBLE
commands (ON / OFF).

Re: Zapped tables in vfp 8.0 by Dan

Dan
Wed Sep 17 10:47:38 CDT 2003

They changed the way VFP8 validates the record count in the DBF header.

See the SET TABLEVALIDATE help topic for more information.

Dan

"v.aggelakos" <vaggelakos@mycosmos.gr> wrote in message
news:084801c37d31$a7bf0890$a001280a@phx.gbl...
> Hi all,
> i recently installed vfp 8.0 on my system and when i try
> to open (use) zapped dbf files from vfp 6 i get the
> following error: "Table 'C:\mytable.DBF' has become
> corrupted. The table will need to be repaired before using
> again."
> In the help Microsoft says that it is required a third
> party tool for repairing but with vfp 6 the file works
> fine.
> if i append a record from vfp 6 the file is accessible
> from vfp 8.0 but if it is zapped, no.
>
> I would like to know why this behaviour ???
> Is something wrong on my machine???
>
>
> Note: The behaviour is the same with both SET COMPATIBLE
> commands (ON / OFF).
>
>
>



Re: Zapped tables in vfp 8.0 by v

v
Thu Sep 18 03:34:33 CDT 2003

The problem is solved when i ZAPped/PACKed the files from
vfp 8.0 a couple of times.
But now (in vfp8.0), the same error message is appeared in
the following situation:
My app has opened about 100 files.
Before that point many macro substitutions have been done.
In the following code i try to append a new record. and
then i get an error that says that the file is corrupted.

Select tcostprf
Go Top
Do While NOT Eof()
Select ShapesView
****the error occurs in the next line
Append Blank
***********************
For FieldItem = 1 To FCount("ShapesView")
FName = Field(FieldItem)
FValue = "TCostPrf." + Alltrim(FName)
Replace &FName With &FValue
Next
Select TCostPrf
skip
enddo
When i issue the "append blank" the file (ShapesView) is
opened and i can browse their contents.
The error occurs even when i pause the execution (by the
debugger) in that point and issue the command ("Append
Blank") from command window.

The code works fine in vfp 6.0

Do you know something for that??

Thank you anyway for your time.



>-----Original Message-----
>How are you "zapping" the table with the VFP command ZAP
or some other way?
>
>This works correctly for me, in VFP6:
>
>create table c:\temp\testzap6 ( i1 i, c1 c(100) )
>insert into testzap6 values ( 1, "this is a test" )
>use
>use c:\temp\testzap6 excl
>zap
>use
>
>Switch to VFP8:
>
>use c:\temp\testzap6
>
>it opens just fine.
>
>--
>df - Microsoft MVP FoxPro
http://www.geocities.com/df_foxpro
>
>"v.aggelakos" <vaggelakos@mycosmos.gr> wrote in message
>news:084801c37d31$a7bf0890$a001280a@phx.gbl...
>> Hi all,
>> i recently installed vfp 8.0 on my system and when i try
>> to open (use) zapped dbf files from vfp 6 i get the
>> following error: "Table 'C:\mytable.DBF' has become
>> corrupted. The table will need to be repaired before
using
>> again."
>> In the help Microsoft says that it is required a third
>> party tool for repairing but with vfp 6 the file works
>> fine.
>> if i append a record from vfp 6 the file is accessible
>> from vfp 8.0 but if it is zapped, no.
>>
>> I would like to know why this behaviour ???
>> Is something wrong on my machine???
>>
>>
>> Note: The behaviour is the same with both SET COMPATIBLE
>> commands (ON / OFF).
>
>
>.
>

Re: Zapped tables in vfp 8.0 by Chip

Chip
Thu Sep 18 11:03:28 CDT 2003

I understood the poster, who refered you to the VFP 8 SET TABLEVALIDATE
command, to be saying that you may have had a corruption issue that VFP 6
was not detecting, but that VFP 8 was.

hth,

Chip


"v.aggelakos" <vaggelakos@mycosmos.gr> wrote in message
news:0bcf01c37dbf$afcdee00$a301280a@phx.gbl...
> The problem is solved when i ZAPped/PACKed the files from
> vfp 8.0 a couple of times.
> But now (in vfp8.0), the same error message is appeared in
> the following situation:
> My app has opened about 100 files.
> Before that point many macro substitutions have been done.
> In the following code i try to append a new record. and
> then i get an error that says that the file is corrupted.
>
> Select tcostprf
> Go Top
> Do While NOT Eof()
> Select ShapesView
> ****the error occurs in the next line
> Append Blank
> ***********************
> For FieldItem = 1 To FCount("ShapesView")
> FName = Field(FieldItem)
> FValue = "TCostPrf." + Alltrim(FName)
> Replace &FName With &FValue
> Next
> Select TCostPrf
> skip
> enddo
> When i issue the "append blank" the file (ShapesView) is
> opened and i can browse their contents.
> The error occurs even when i pause the execution (by the
> debugger) in that point and issue the command ("Append
> Blank") from command window.
>
> The code works fine in vfp 6.0
>
> Do you know something for that??
>
> Thank you anyway for your time.
>
>
>
> >-----Original Message-----
> >How are you "zapping" the table with the VFP command ZAP
> or some other way?
> >
> >This works correctly for me, in VFP6:
> >
> >create table c:\temp\testzap6 ( i1 i, c1 c(100) )
> >insert into testzap6 values ( 1, "this is a test" )
> >use
> >use c:\temp\testzap6 excl
> >zap
> >use
> >
> >Switch to VFP8:
> >
> >use c:\temp\testzap6
> >
> >it opens just fine.
> >
> >--
> >df - Microsoft MVP FoxPro
> http://www.geocities.com/df_foxpro
> >
> >"v.aggelakos" <vaggelakos@mycosmos.gr> wrote in message
> >news:084801c37d31$a7bf0890$a001280a@phx.gbl...
> >> Hi all,
> >> i recently installed vfp 8.0 on my system and when i try
> >> to open (use) zapped dbf files from vfp 6 i get the
> >> following error: "Table 'C:\mytable.DBF' has become
> >> corrupted. The table will need to be repaired before
> using
> >> again."
> >> In the help Microsoft says that it is required a third
> >> party tool for repairing but with vfp 6 the file works
> >> fine.
> >> if i append a record from vfp 6 the file is accessible
> >> from vfp 8.0 but if it is zapped, no.
> >>
> >> I would like to know why this behaviour ???
> >> Is something wrong on my machine???
> >>
> >>
> >> Note: The behaviour is the same with both SET COMPATIBLE
> >> commands (ON / OFF).
> >
> >
> >.
> >



Re: Zapped tables in vfp 8.0 by David

David
Mon Sep 22 19:29:25 CDT 2003

Well I'm not sure where your table is corrupting there's nothing in
particular that looks wrong with the code. Your code could easily be
de-macro expanded. For example I can reduce your 13 lines of code to 5:

select tcostprf
scan
scatter name oSource
insert into ShapesView from name oSource
endscan

besides being simpler it will run a lot faster too.

I'm also not quite sure why you don't just do it like this:

select ShapesView
append from tcostprf
--
df - Microsoft MVP FoxPro http://www.geocities.com/df_foxpro

"v.aggelakos" <vaggelakos@mycosmos.gr> wrote in message
news:0bcf01c37dbf$afcdee00$a301280a@phx.gbl...
> The problem is solved when i ZAPped/PACKed the files from
> vfp 8.0 a couple of times.
> But now (in vfp8.0), the same error message is appeared in
> the following situation:
> My app has opened about 100 files.
> Before that point many macro substitutions have been done.
> In the following code i try to append a new record. and
> then i get an error that says that the file is corrupted.
>
> Select tcostprf
> Go Top
> Do While NOT Eof()
> Select ShapesView
> ****the error occurs in the next line
> Append Blank
> ***********************
> For FieldItem = 1 To FCount("ShapesView")
> FName = Field(FieldItem)
> FValue = "TCostPrf." + Alltrim(FName)
> Replace &FName With &FValue
> Next
> Select TCostPrf
> skip
> enddo
> When i issue the "append blank" the file (ShapesView) is
> opened and i can browse their contents.
> The error occurs even when i pause the execution (by the
> debugger) in that point and issue the command ("Append
> Blank") from command window.
>
> The code works fine in vfp 6.0
>
> Do you know something for that??
>
> Thank you anyway for your time.