Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pack Database with OLEDB ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00581175
Message ID:
00584543
Vues:
45
Steve,

>I can't use any VFP code in this current project, so I can't create a VFP COM object. I have to use VBScript only. I just have to look up the OLEDB commands to use the "table" exclusively and then pack it. Hmmm..

We still aren't connecting here...

I am not saying to use VFP code. No VFP code. Anywhere. I got that. Don't use VFP code.

I am saying to fire up a COM instance of the VFP runtime from VBScript. VBScript. No VFP code anywhere in sight. VBScript should be able to fire up and manipulate any COM object. The VFP runtime can be accessed in such a way. Here is some VFP code (I am just using VFP code as a sample...you will have to convert this code to VBScript to use it in your scenario...):

oVFP = CREATEOBJECT('VisualFoxpro.Application.6')
oVFP.DoCmd('OPEN DATABASE insert-full-path-to-DBC EXCLUSIVE')
oVFP.DoCmd('PACK DATABASE')
RELEASE oVFP

If you convert this code to VBScript and fire up VFP as a COM object in this way, you should be able to pack the database.

Do you see what I mean? No VFP code, just VBScript to fire up the VFP runtime and have it do the packing... If VBScript cannot manipulate a COM object in this way, then forget what I have been saying, but VBScript should be able to do stuff like this, no?

JoeK
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform