On Thu, 04 Feb 2010, smu johnson wrote: Hi,
> 1) We're having a problem with our Harbour compiles not understanding the > .DBT standard, when new .DBF files are created. I think it is assuming that > when we create Memo fields on a new .DBF table, to assume we want the .FPT > standard. However, our old DOS code stuff uses .DBT. Is there a flag to > switch this? See rddInfo() function and RDDI_* macros in dbinfo.ch. I.e. you can set DBT as default MEMO driver in DBFCDX RDD by: rddInfo( RDDI_MEMOTYPE, DB_MEMO_DBT, "DBFCDX" ) or SMT in DBFNTX by: rddInfo( RDDI_MEMOTYPE, DB_MEMO_SMT, "DBFNTX" ) You can also create your own RDD using HBUSRRDD lib with prefered memo type. In /src/rdd/usrrdd/rdds/dbtcdx.prg is simple code which creates new DBTCDX RDD which inherits from DBFCDX but uses DBT as default memo type. The memo type is important only for new files (dbCreate()). When existing DBF file is open Harbour automatically recognize type of memo using information from DBF header and enable valid memo driver. Of course if program which created DBF file set valid memo type signature. > 2) On the topic of .DBT and .FPT files, since Harbour is so nice and > modern, we are wondering which standard we should use. We used the .DBT > stuff cause that's all there was "back in the day", and wondering if we > should switch to something else. Any you want. DBT allows to store only strings and uses 512 bytes blocks. FPT allows to store also other data types (numbers, dates, arrays, ...) and user can set block size (default is 64 bytes) so it's more flexible and creates smaller files. It also contains garbage collector which allow to reuse freed regions. SMT is SIX3 format which have most of FPT features. All formats are recognized by Harbour. In fact it even recognize different implementations of FPT formats which can be controlled by: rddInfo( RDDI_MEMOVERSION, DB_MEMOEXT_* [, <cRDD>] ) best regards, Przemek _______________________________________________ Harbour mailing list (attachment size limit: 40KB) [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
