Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP 6 - limit to COPY TO command. 1

Status
Not open for further replies.

button71

Programmer
Nov 8, 2006
69
AU
I have an application that copies an original user table to provide a backup if the user wants to reverse any changes made in my app.

I have many users using this code for some 3 years.

Suddenly I have a user who gets a C0000005 error when using the COPY TO (backup file name).

I have his tables and confirm in the debugger that it happens at that line.

The only difference is that his original table has many stored images in Memo files - this is outside my control and the usual method is to just add a link to an external image file.

Are there any restrictions to COPY TO or is there another way to create the copy?

Many thanks

William
 
Are there any restrictions to COPY TO or is there another way to create the copy?

Is the fpt file unusually big?

What happens if you pack the table before copying?

Can you COPY STRUCTURE to a new table and then APPEND from the original?

You could try using the COPY FILE command to copy dbf, cdx, and fpt files but that can be more difficult with multiple users.

Geoff Franklin
 
In answer to the original question, yes. There is a file size limit of 2 gig. If your FPT (memo) file is that big even though your table isn't, it won't work.

You may need to get rid of some bloat before you can continue to work with it, as in what Geoff was alluding to.



-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Thanks everyone,

The fpt file size is 620,000Kb.

COPY TO routine to 'crash'.

These other methods above don't crash - just don't do the work.

I may have to dele records in the pesky table to see if I can find out which is causing the problem.

The table works in the original application and in my application (without making a backup).

I'll keep you posted.

Regards

William

 
1. are you able to copy the table on OS level - I mean in COPY in DOSbox or any manager - Explorer, TotalCommander for example?
2. have you tried another way to copy it in program - API CopyFile,WSH CopyFile ...?
 
Thanks Jan,

I have some more information.

1 Yes - an OS copy works.

2 I'll look for APICopyfile and WSH Copyfile information and try those.

3 When making a Report using that file with images - I get error Picture too big,corrupt, or in wrong format.

4 Looking in the original app I get the information that the image nnnnnnnn.jpg

is
159 bytes
Format 0x0x0
Tagged image file with a vector image saved as DXF

the other app works fine with this except that it appears unable to show the image.

I have asked the user about these type of images which are held in a Memo field.

Regards

Willaim
 
Jan,

Thanks for your tip - I used APICopyFile and it worked perfectly - after all those hours <sigh>

Regards

William
 
The problem is solved.

There was a 'bad' image file in the original table.

Obviously VFP copy type commands didn't like it and gave a C000005.

As it happens when the user was informed, he tried to view the bad image in the original application and got a C000005 there also.

Pity he didn't do that first - <sigh> another weekend passes!

But I have more knowledge now.

Regards

William
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top