#include "dbinfo.ch" PROC Main() * Test .prg for MemoFExtn() function SetMode( 25, 80 ) CLS ? "Memo File extension :", MemoFExtn() // NIL ? REPL( "-", 80 ) cTfName := "MFInTst1" aStruct := { { "FLD1", "C", 10, 0 } } DBCREATE( cTfName, aStruct ) USE ( cTfName ) ? "Memo File extension :", ">" + MemoFExtn() + "<" // >< ? REPL( "-", 80 ) cTfName := "MFInTst2" aStruct := { { "FLD1", "M", 10, 0 } } DBCREATE( cTfName, aStruct ) USE ( cTfName ) ? "Memo File extension :", MemoFExtn() // .dbt ? REPL( "-", 80 ) cTfName := "MFInTst3" aStruct := { { "FLD1", "M", 10, 0 } } DBCREATE( cTfName, aStruct, "DBFFPT" ) USE ( cTfName ) ? "Memo File extension :", MemoFExtn() // .fpt ? REPL( "-", 80 ) ? WAIT "EOF MemoFExtn.prg" RETURN // MemoFExtn.Main() /* Function MemoFExtn() -> Memo File Extension of current table Return : If current work area is empty : NIL elseIf current table not include MEMO field : "" else .dbt / or .fpt depending RDD used in creation of current table. Required : #include "dbinfo.ch" Aug 2012 */ FUNCTION MemoFExtn() // Memo file extension LOCAL xRetVal IF !EMPTY( ALIAS() ) IF DBINFO( DBI_MEMOHANDLE ) < 0 xRetVal := "" ELSE xRetVal := DBINFO( DBI_MEMOEXT ) ENDIF ENDIF !EMPTY( ALIAS() ) RETURN xRetVal // MemoFExtn()