>>I do a Select-SQL to query data from different tables and put it in a cursor to show in a listbox. My problem is if one field is a Memo field and should be shown in the listbox it just writes out Memo instead of the first characters from the memo.
>>
>>I've tried to do like this with the select but it's not possible:
>>
>>select substr(memofield, 1, 30)....
>>
>>Is there any easy way to do a select-sql and show a memo-field in the listbox?
>>
>>Thanks in prior!
>>
>>/Mårten
>
>You can use Select Left(memofield,10)... I don't know what's happened with SUBSTR(), but it really generates error (bug?).
I believe this is an undocumented "feature". :-) If you SET TALSK OFF, I think you can use the SUBSTR() command in the SELECT but it returns a Memo field which then must be opened. SET TALK ON while using SUBSTR() in which the number of characters specified is longer than the string length generates an error. I think this goes all the way back to FP2.x
Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.