did HMG Syntax now work with CLICK and "your" Source
---
i have add new Function GetDBFInfo()
we do have "Data Path" and we got Tbl_cros.TXT but it only say which DBF is used ... not it's Structure.
now i scan "Data Path" for DBF and "try" to open it an get DBSTRUCT() which just take some Seconds.
"try" mean FOPEN() to read Header of DBF.
Code: Select all
nHandle := FOPEN( cDbf )
FSEEK( nHandle, 0, 0 )
FREAD( nHandle, @cBuffer, 1 )
FCLOSE( nHandle )
nType := ASC( cBuffer )
Code: Select all
DO CASE
CASE nType = 3
USE (cDBF) VIA "DBFNTX"
CASE nType = 7
// MSGInfo( VAR2CHAR( aType ), "Warning DBF Type" )
USE (cDBF) VIA "DBFNTX"
CASE nType = 48 .OR. nType = 49
USE (cDBF) VIA "DBFCDX"
CASE nType = 131
USE (cDBF) VIA "DBFNTX"
CASE nType = 245
// using Cl*pper Comix/SixDrive
USE (cDBF) VIA "DBFCDX"
OTHERWISE
// MsgInfo("no supportet" )
ENDCASE
i do have more Type but i don't know if i need it under harbour / HMG
so here CLICK.EXE v0.22 (packed with UPX)FUNCTION _DbfFileType( nType, cDbf )
CASE nType = 2 // 02h FoxBASE
CASE nType = 3 // 03h FoxBASE+/Dbase III plus, no memo
CASE nType = 4 //* 04h
CASE nType = 5 //* 05h
CASE nType = 7 //* 07h
CASE nType = 48 // 30h Visual FoxPro
CASE nType = 49 // 31h Visual FoxPro, autoincrement enabled
CASE nType = 67 // 43h dBASE IV SQL table files, no memo
CASE nType = 99 // ???
CASE nType = 123 //* 7Bh
CASE nType = 131 // 83h FoxBASE+/dBASE III PLUS, with memo
CASE nType = 135 //* 87h
CASE nType = 139 // 8Bh
CASE nType = 142 //* 8Eh
CASE nType = 179 //* B3h
CASE nType = 203 // 0xCB dBASE IV SQL table files, with memo
CASE nType = 229 //* E5h HiPer-Six format with SMT memo file
CASE nType = 245 // F5h FoxPro 2.x (or earlier) with memo
CASE nType = 251 // FBh FoxBASE
Source will follow soon