' tb-screen: 80x25
' tb-tempdir
' Verzeichniswechsel und Pfadaliase duerfen Datenbanken nicht verwechseln.
TYPE R
    Nr AS INTEGER
END TYPE
DIM r AS R
MKDIR "a"
MKDIR "b"
CHDIR "a"
OPEN "db" FOR ISAM R "R" AS #1
r.Nr = 1
INSERT #1, r
CLOSE
CHDIR "../b"
OPEN "db" FOR ISAM R "R" AS #1
PRINT "B neu="; LTRIM$(STR$(LOF(1)))
r.Nr = 2
INSERT #1, r
CLOSE
CHDIR "../a"
OPEN "db" FOR ISAM R "R" AS #1
PRINT "A="; LTRIM$(STR$(LOF(1)))
BEGINTRANS
r.Nr = 3
INSERT #1, r
OPEN "./db" FOR ISAM R "R" AS #2
PRINT "Alias="; LTRIM$(STR$(LOF(2)))
s% = SAVEPOINT
DELETETABLE "../a/db", "R"
PRINT "frei="; LTRIM$(STR$(FREEFILE))
ROLLBACK s%
OPEN "db" FOR ISAM R "R" AS #1
PRINT "restauriert="; LTRIM$(STR$(LOF(1)))
ROLLBACK ALL
PRINT "A rollback="; LTRIM$(STR$(LOF(1)))
CLOSE
CHDIR "../b"
OPEN "db" FOR ISAM R "R" AS #1
MOVEFIRST #1
RETRIEVE #1, r
PRINT "B Nr="; LTRIM$(STR$(r.Nr))
CLOSE
CHDIR ".."
