THIS FUNCTION HAS CHANGED IN FILEFLEX 3.0
FileFlex no longer requires DBOpenSession be called in most host environments (in particular Director). Instead, FileFlex checks automatically to see if gDBFileFlexCore has been initialized, and, if so, assumes FileFlex to have been initialized. Users will still need to execute a DBCloseSession, but repeated DBCloseSession calls will not crash the system. It should be noted that DBOpenSession will still remain part of the FF API because some host environments may not return an empty byte for unitialized globals.
Here's how FileFlex uses DBOpenSession in non-automatic host environments: Before calling any FileFlex functions, you must notify FileFlex that you intend to use its routines. To do this, put a DBOpenSession call into the handler called most immediately after your project is opened (in Director, this would be the startMovie handler).