MyTable.DBF (No MEMO info required) Numero Title AddDate 1 My first tile 05/05/2005 11:11:11 2 My second tile 05/05/2005 11:11:11 3 My third tile 06/05/2005 12:11:11 4 My fourth tile 06/05/2005 13:11:11 5 My fifth tile 06/05/2005 14:11:11In the same folder where you have MyTable.DBF you create a subfolder of the same name, and you use it to store the files with a naming convention, for example: MemoName_PK
Function getMemo(tcPath, tcMemoName, tnPK) lcMemoFile = addbs(tcPath) + tcMemoName + '_' + transform(tnPK) if file(lcMemoFile) lcMemo = filetostr(lcMemoFile) else lcMemo = '' endif return lcMemo endfuncNow, lets say you need to put all the information together, you do something like:
lcPath = forceext(dbf('myTable'), '') && For the sub-folder has the same name as the table Select myTable.*, cast(getMemo(lcPath, 'Notes', myTable.PK) as M) as Notes from myTable into cursor C_MyTableYou are not limited to one Memo per table, you can have as many as you need.