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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Memo file maximum size for one record

Status
Not open for further replies.

keepingbusy

Programmer
Apr 9, 2000
1,470
GB

Hi

I have been using a memo field to paste in information from a text file which later extracts that information into another table. This is no problem but today we are getting an error message:

File c:\foldername\mytable.fpt is too large

We have tried to reduce the size of the text file to about 1.2mb but this still generates the error.

Any suggestions please?

Thank you

Lee
 
This error is generated when any file is larger than 2 GB. Is your FPT file so large?
Try PACK MEMO
 

JanBucek

The table only has one record that's used each time the process runs and as mentioned:
We have tried to reduce the size of the text file to about 1.2mb but this still generates the error.
Strange one this....

Lee

 
Lee


Try deleting the dbf and fpt file.

May be
copy structure to t_1
copy to t_2

then delete both original files

check disk space

use t_1
append from t_2


Nasib



 
Lee,

I agree that this is almost certainly a 2 GB problem.

The fact that you only store one record at a time does not alter that conclusion. You need to do a periodic PACK MEMO to reduce the size of the FPT and reclaim wasted space.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 

Nasib

Thank you for your post

Mike

So are you saying that even if the memo field is replaced with "" each time the process runs, you still need to PACK MEMO?

This isn't a problem but if this is the case I didn't realise that unused space was left behind so to speak even though the memo field was empty prior to being populated.

Your thoughts or observations....

Thank you
Lee
 
Lee,

So are you saying that even if the memo field is replaced with "" each time the process runs, you still need to PACK MEMO?

Yes, that's exactly what I'm saying.

You don't need to do the PACK MEMO every time. But each time you replace the memo field, the memo file will grow. So, sooner or later, you will need to pack it.

You can confirm that by monitoring the file size.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
I have been using a memo field to paste in information from a text file which later extracts that information into another table.
Why this 2 step? I am sure there is a reason, but why not a table to table transfer?
Yes you do have to pack the Memo... especially if you are doing this in-and-out step.
Though, can't remember for sure, I thought this was fixed in later versions of VFP (6+). Have you tried this in your copy of VFP9?
A thought: Did this particulat text file insert too many carriage returns? This could be a factor for the bloat.
 
imaginecorp
Why this 2 step? I am sure there is a reason, but why not a table to table transfer?
This is how it works:
Code:
USE CSVWEB EXCLUSIVE
REPLACE txtdata WITH "" && txtdata is a memo field
PACK MEMO
USE

DO FORM PASTEWEB  && Form used to paste in text

* COPY IN THE TEXT FROM THE SOURCE FILE

USE CSVWEB SHARED
GO 1
COPY MEMO txtdata TO tracklist.txt

USE RWLIST EXCL  && Table used to sort the text
ZAP

APPEND FROM tracklist.txt DELIMITED WITH TAB

* Process starts here...
Everything appears to be running ok now as a PACK MEMO command is issued at the start of this PRG

Thanks again guys

Lee

Windows XP
Visual FoxPro Version 6 & 9
 
Think I spoke too soon. Just ran another test and I'm getting the same error message that the fpt is too large.

I would be grateful for any suggestions about this behaviour.

Thank you

Lee


Windows XP
Visual FoxPro Version 6 & 9
 
Mike

Since your post, I changed part of the code further on within the process and added:
Code:
SELECT DISTINCT UPC FROM newtracklisting INTO TABLE tracklisting
I've tried multiple text files with the information required and this appears to be working. I've also tried larger files and these are also working.

Whether it was something to do with the previous coding I don't know but problem solved.

My thanks to everyone who posted on this thread.

Lee

Windows XP
Visual FoxPro Version 6 & 9
 
Lee:
I am glad you have it solved.
Though, Why the 2 step?
Why not an:
APPEND MEMO MemoFieldName FROM FileName [OVERWRITE]
 
Imaginecorp

APPEND MEMO MemoFieldName FROM FileName [OVERWRITE]

The information pasted into the first memo field is converted, here is part of the code:
Code:
USE CSVWEB
GO 1
COPY MEMO WEBDATA TO tracklist.txt
USE RWLIST EXCL
ZAP
APPEND FROM tracklist.txt DELIMITED WITH TAB
DELETE FOR EMPTY(COLUMN1)
PACK
* More code.....
What happens is the raw data is pasted into a field on a form and it is converted from the example below into a table with several fields such as UPC, track01, track02, track03 etc. When the process is complete, all the tracks are then copied into a memo field which is later converted into a CSV file for uploading to website via phpmyadmin.

Before the data is converted it looks like this:
Code:
UPC - 0805527000928  

1 - You Were Different in My Dreams  

2 - Perfect Beauty  

3 - Consume  
 
4 - Extinction  
 
5 - Art of Insanity  
 
6 - Laying Stars to Sleep  
 
7 - True in Friendship  
 
8 - Last Dance  
 
9 - Whispers in the Wind  
 
10 - Setting Sun  
 
11 - To Fathom Eternity  
 
12 - Utopia  
END  
 
UPC - 0746105032729  
 
1 - Lost in the Moment  
 
2 - Failure in Drowning  
 
3 - Broken Silence  
 
4 - Unwinding  
 
5 - Silence of Sorrow  
 
6 - Wandering  
 
7 - Nashville  
 
8 - Relive the Curse  
 
9 - Face Plastered in Black  
 
10 - Untold Truth  
 
11 - Your Hand This Vice  
END
Each track is put into a field together with the UPC number.

Hope that makes sense and thanks again all.

Lee

Windows XP
Visual FoxPro Version 6 & 9
 
AAH; Now it makes sense. Like I said, I am sure there was a reason... What are the above? Books?
"You Were Different in My Dreams" I can just picture the cover...
 
Imaginecorp,

What are the above? Books?

Surely not. They are articles about computer programming. I mean ... just look at the titles:

Code:
Relive the Curse  

Silence of Sorrow

Extinction

Lost in the Moment

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
You two should be a double act!

They are actually CD titles but have to admit I have no idea who they are or where they are from.

It's the old case of "You supply me with the piano and I'll play the tunes"

Thanks again

Lee


Windows XP
Visual FoxPro Version 6 & 9
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top