Hi malware fighters,
Windows XP SP2, still the inevitable exeption crash of explorer.exe. The chair dance went wrong, two like to fight over one chair, and it topples. Something can be done through the registry, but also this can be elegantly fixed with the next program, save this as xFixTable.prg in your window’s system folder, and the chair dance may evolve better next round.
*// WKD date modified 10:44:40 03/31/2004
*// xFixTable.prg
*// This little program attempts to fix tables
*// by adding a field then removing the field
CLOSE ALL
nReturnValue=adir(aMyArrayTables,[*.dbf])
ON ERROR do nothing
nTotalArray = ALEN(aMyArrayTables,1)
FOR nCount = 1 TO nTotalArray
sTable = JUSTSTEM(aMyArrayTables[nCount,1])
IF INLIST(substr(sTable,1,1),[$],[!]) OR VAL(sTable) > 0 OR [.] $ sTable
LOOP
ENDIF
USE IN SELECT('&sTable.')
WAIT WINDOW [Currently fixing ] + sTable NOWAIT
USE &sTable. IN 0 ALIAS &sTable. EXCLUSIVE
ALTER TABLE &sTable. ADD COLUMN xAddToFix c(1)
ALTER TABLE &sTable. DROP COLUMN xAddToFix
USE IN SELECT('&sTable.')
ENDFOR
ON ERROR
**********************
Function l_message
**********************
LPARAMETERS sFile
messagebox([There was a problem opening ] + sFile,0,[Dbf Problem])
USE (lcTable) ALIAS oldTable EXCLUSIVE
COPY STRUCTURE TO newTable DATABASE myDatabase NAME newTable
USE newTable IN 0 EXCLUSIVE
SELECT newTable
FOR I = 1 TO Fcount()
lcField = Field(I)
REPLACE newTable.&lcField WITH oldTable.&lcField
ENDFOR
ZAP IN oldTable
SELECT oldTable
APPEND FROM newTable
REMOVE TABLE newTable DELETE
USE IN oldTable
PROCEDURE fixtable
LPARAMETERS tcTable
SET MESSAGE TO 'Fixing table ' + tcTable
USE (tcTable) ALIAS oldTable EXCLUSIVE
IF INDBC('newtable', 'TABLE')
DROP TABLE newtable
ENDIF
COPY STRUCTURE TO newTable DATABASE YRA NAME newTable
USE newTable IN 0 EXCLUSIVE
SELECT oldtable
SCAN FOR NOT EOF()
SELECT newTable
APPEND blank
FOR I = 1 TO Fcount()
lcField = Field(I)
REPLACE newTable.&lcField WITH oldTable.&lcField
ENDFOR
SELECT oldtable
ENDSCAN
SET SAFETY OFF
ZAP IN oldTable
SET SAFETY ON
SELECT oldTable
APPEND FROM newTable
REMOVE TABLE newTable DELETE
USE IN oldTable
SET MESSAGE to
Enjoy,
polonus