Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Delete all rows in Access table
Message
De
10/08/2005 11:40:32
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01039854
Message ID:
01039884
Vues:
17
Yuri,

Thank you! It worked just like I wanted.

Bill

>oAcc.CurrentDB.execute("Delete * from "+cTable)
>
>>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)
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform