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

How to store more than 400 characters in a field? 3

Status
Not open for further replies.

Mandy_crw

Programmer
Jul 23, 2020
578
0
16
PH
Hi everyone… in one of my fields in my table, i found out that its only 254 characters its allowed… but what i need in my project is more than 400… may i ask suggestion from you what to do? Thanks…
 
Ok Chriss... I'll just add another field... Thanks...
 
Mandy, this is exactly what memo fields were invented for. A memo field can contain up to 16 million characters. And the great thing about it is that it is variable length: there is no space wasted with padding, as there is with ordinary character fields.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
But you do get bloat with memo fields, because they don't reuse space, IIRC if you save a memo twice - even with the same contents - it allocates new blocks
to the .fpt file.

Character fields (of 240 chars or less) can be indexed, a memo field cannot be (directly).

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.

There is no place like G28 X0 Y0 Z0
 
I didn't just straight go for recommending memo, because always needing something like 400-500 chars you're actually good with 2 chars instead of 1 memo. It's CSV friendly, too.
If more than 400 is meant as unbound and often also means more than 508, then surely memo is simpler. Memo also is simpler from the point of view of binding it to an editbox and not need handling of splitting a value ranging from 254 to 508 length into two fields.

So yes, there are pros and cons, I mentioned both.

Chriss
 
Yes Mike... I'll try both and see which is best....Thanks you everyone....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top