Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
viewdbf myfile.dbf | sort > list.txt
----------- ---- --- ---
-*-
*** Data File : POPIN.DBF ***
CLIENTDRG C 30
COMMENTS M 10
DRGSIZE C 2
DRGTITLE C 100
Field Name Type Len Dec
FLAG L 1
ISSUED L 1
Last update : 28/02/108 Record size : 153 No. records : 2730
MADEBY C 8
*** Data File : POPIN.DBF ***
Last update : 28/02/108 Record size : 153 No. records : 2730
Field Name Type Len Dec
----------- ---- --- ---
MADEBY C 8
CLIENTDRG C 30
DRGTITLE C 100
COMMENTS M 10
ISSUED L 1
DRGSIZE C 2
FLAG L 1
-*-
CREATE TABLE test (z c(3), y n(4), a d, b t) && note original field order
INSERT INTO test VALUES ("Hi", 12, DATE(), DATETIME())
LOCAL ARRAY aa[1]
LOCAL i, cCopyCmd, cOrigDBF
m.cOrigDBF=DBF()
m.cCopyCmd ="COPY FIELDS "
AFIELDS(aa)
ASORT(aa, 1, ALEN(aa,1), 0)
FOR m.i = 1 TO ALEN(aa,1)
m.cCopyCmd = m.cCopyCmd + aa[m.i, 1] + ","
ENDFOR
m.cCopyCmd = LEFT(m.cCopyCmd, LEN(m.cCopyCmd)-1)
&cCopyCmd to tblTemp
CLOSE TABLES ALL
ERASE (m.cOrigDBF)
RENAME tblTemp.dbf TO (m.cOrigDBF)
USE (m.cOrigDBF)
BROWSE NOWAIT
I simply find it much easier to design forms when the fields are in order and I am using a pick list to choose the correct field
when you have as many as 80 or so fields to choose from