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!

Concatenating fields in a view - resulting field greater than 255

Status
Not open for further replies.

mbru

Programmer
Mar 12, 2001
8
0
0
US
I am attempting to concatenate 6 fields from a table into a single field in a view. A UDF formats the text from the 6 fields. I expected a memo field to result, but instead get a string too long error message.

The SELECT statement is something like this:

SELECT ;
MYFUNCTION(field1,field2,field3,field4,field5,field6) ;
FROM MyTable ;
...

where fields field1 to field6 are character fields 254 characters in length. The UDF returns a text string that is greater than 254 characters in length.

I've tried setting the view's NoDataOnLoad property to .F., then changing my resulting field's DataType to 'M' with DBSETPROP before requerying the view. I still get the same error message. Can such concatenation be done?
 
In the VFP help under System Capabilities it states that the 'Maximum size of character fields is 254'.

There are several alternatives or work arounds. I would create a temporary cursor with a memo field and populate it programmatically.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top