Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete all rows in Access table
Message
De
10/08/2005 10:06:07
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Delete all rows in Access table
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01039854
Message ID:
01039854
Vues:
64
I am having some problems getting the syntax correct working with Access. I need to open an Access table, delete all of the records in it and then add all new records from my VFP cursor. I have no problems adding the new records but I cannot seem to get the syntax right for removing all of the rows in the table. Below is a code snippet.

Thanks,
Bill
cMDB="F:\mwc_new1\fpdb\mwclist.mdb"

oAcc=CREATEOBJECT("Access.Application")
oAcc.OpenCurrentDatabase(cMDB)
cStatus=""
oMDB=oAcc.CurrentDB
oDB = oAcc.DBEngine
cTable="mwcStones"
oRS=oMDB.OpenRecordSet(cTable)

*% Need help here *%
omdb.Execute("DELETE mwstones.*")

* Code to add new records
* snip.....

oRS.UPDATE
oRS.CLOSE
oAcc.QUIT(1)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform