Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting free tables to DBC
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01000246
Message ID:
01000257
Views:
15
Try:
cd path_where_dbfs_are
CREATE DATABASE MyData

numb_of_dbfs = ADIR(allDBF, "*.DBF")
FOR i = 1 TO m.numb_of_dbfs
    dbf_name = JUSTSTEM(allDBF[i,1])
    USE (dbf_name)
    IF EMPTY(CURSORGETPROP("DataBase", dbf_name)) && To see if this table is FREE
       SET DATABASE TO MyData
       ADD TABLE (dbf_name)
    ENDIF
    USE IN SELECT(dbf_name)
NEXT
CLOSE DATABASE ALL
(not tested)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform