question

RansfordGraham-7940 avatar image
0 Votes"
RansfordGraham-7940 asked CarrinWu-MSFT commented

Memo field is not Evaluating in Listbox

SQL Server/Visual FoxPro Application

How do I get the comments field to evaluate as a string in the routine below:

lnMarketid = 0

lnReturn = SQLEXEC(oGv.pnConnhandle, 'EXEC MCRevenue.Sundries.RetrieveMarketRevenueBankTransactionsSP ?lnMarketid','bankingtransactions')
IF lnReturn = -1
=odbcerror() && Log the error
RETURN .F.
ENDIF

The 'comments' field in the table is 255 characters

ThisForm.lstSelection.RowSource = "bankingtransactions.market,bank,branchname,transactiondate,transactionamount,datelodged,marketid,routerid,lodgementid,comments"

'comments' is the memo field which evaluates to "memo" - I want to translate memo to a string

lcComments = ThisForm.lstSelection.List(lnCnt,10) && evaluates to "memo"
IF TYPE( lcComments ) = "M" && but here the Type is not "M" (memo) so it jumps out of the routine
lnLines = ALINES( laLines, lcComments, 1 )
lcComments = ""
FOR lnLCount = 1 TO lnLines
lcComments = lcComments + laLines[ lnLCount ] + CHR(13) + CHR(10)
NEXT
ENDIF

sql-server-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @RansfordGraham-7940, we didn't get a reply from you. Are there any answers help you? If yes, could you please accept the answer? If not, please let us know. It will benefit for all community members who have a similar issue. Thank you for your contribution!

0 Votes 0 ·
CarrinWu-MSFT avatar image
0 Votes"
CarrinWu-MSFT answered

Hi @RansfordGraham-7940,

Welcome to Microsoft Q&A!

You question is related to Visual FoxPro, and FoxPro Forum has migrated to Microsoft Q&A. You can find all products that supported on Q&A forum from this link, and here is Tag List. But it seems that FoxPro tag still not be created, please refer to this link. I suggest you that please post your question in here.


Best regards,
Carrin


If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

NaomiNNN avatar image
0 Votes"
NaomiNNN answered

Instead of using fields as the source type for the dropdown, can you use select statement and use cast(myMemo as char(254)) as Comments as part of the select.

Also, if you want to get help with Visual FoxPro question I suggest to use www.LevelExtreme.com forum where you can still find active VFP developers.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.