Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Importing Access tables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00430572
Message ID:
00430597
Vues:
14
Sure.

Set up an ODBC connection in windows to the access database.

Then in FoxPro:
local lnHandle, lcSQL, lnRetu

lnHandle = sqlconnect() && Pick your connection from the dialog 
lcSQL = "select * from accesstable blah blah blah"
lnRetu = sqlexec(lnHandle,lcSQL,xCursor)
if allt(alias()) == "XCURSOR" AND lnRetu = 1
    copy structure to mytable.dbf
    *!* Make sure the field names are not more than 10 characters
    use mytable.dbf
    select xcursor
    scan
        scatter to memvar memo
        insert into mytable from memvar 
        select xcursor
    endscan
else
    return lnRetu
endif
Basically, dat it.

HTH
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform