Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pack Database with OLEDB ?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00581175
Message ID:
00584543
Views:
42
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform