*Welcome to the FileFlex Test Bench. This sample Director movie is designed for FileFlex developers to tinker with the various workings of FileFlex. It's important to note two things: 1) this Test Bench is not a supported part of FileFlex and is provided simply as a tool for you to get to learn some of the key functions, and 2) there is absolutely no error checking done, so it's certainly possible you could accidentally zorch your FileFlex session, the Director session, or the fate of mankind if you execute the various operations out of order. Rather that putting in exhaustive error handling, we wanted a simple interface that gave you access to FileFlex' routines without anything getting in your way. The price of this freedom is you should have read the manual and think before you click. DBOpenSession() and DBCloseSession() are necessary for the initialization of the FileFlex system. *DBUse and DBSelect in this section are used to open and choose the database. Make sure you specify a database in the entry field before calling this routine. DBClose and DBCloseAll will close the database file but NOT the FileFlex session. Be sure to call DBCloseSession to clear FileFlex out of memory. *DBListFields is a very useful function because it helps you see the structure of the FileFlex database. It also helps you verify that the data file is opened and the structure is being read properly. Press [clear] to clear out the field. The first line contains the number of fields defined in the database. *This module tests the following routines: DBTop() DBBottom() DBGo() DBCount() DBCurrRecNum() DBGetCurrRecVal()* DBDeleteRecs() DBRecordDeleted() DBRecallRecs() DBPack() Tests the logical container transfer parameters. Doesn't test the bulk field moves. *This is a very complex set of scripts. First, it builds an input template for the first sixteen fields of the data file. Then it allows for new records to be created and new data to be saved out. To create a new record, simply edit the field text and click "Save as New Record". *First, enter the name of the memo field you'll be testing into the Memo Name field. Then click DBGetMemo. The script will recall the memo of the current record. To recall another record, go to the earlier screen and navigate to the record you desire. DBWriteMemo will update the mem field contents back to the database. Warning: It's probably best to make sure you don't switch records between reading the record and writing it. There's no error checking here. *First, enter the name of the memo field you'll be testing into the Memo Name field. Then enter a search string. Remember that DBFindMemo will search for a string...that means words or parts of words. Then click DBFindMemo to begin the search. The script will update the memo field contents back to the database. Warning: DBFindMemo bypasses the DBSkip mechanism for speed. That means it searches for data in physical record order. It also doesn't reset the pointer to the top of the database. So, to move to the next record, do a DBGo(DBCurrRecNum()+1). *Use this to test the DBLocate sequential searching capabilities of FileFlex. As your database gets larger, DBLocate will become less and less practical. Remember to reset DBLocate before you leave this card or the results will be unpredictable. *Use this to create a named index file that you can then search and browse using the DBSeek functions. *Use this routine to find and open an existing index file. DBSelectIndex makes the specified ID current DBCloseIndex closes the specified index file. DBCheckIndex is used to confirm that the index file is valid. If you've got a large index file, DBCheckIndex will take a looooooong time. NOTE: This routine and some of the following presuppose that you're using only one open index file. *Use this to test DBSeek. Note that for the purpose of flexibility, the padString functionality has not been implemented. As a result, while the index expression will move you to the right spot in the database, the result code will most probably not indicate an exact match. *DBCreate is FileFlex' way of generating new database files. You can also use other database tools as long as you use XBase compatibility mode and create .DBF files.