Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LLamada a una DLL.
Message
From
16/10/2002 13:52:51
 
 
To
16/10/2002 13:03:49
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00707276
Message ID:
00711864
Views:
14
I have tested this and it works on my machine from VFP7 SP1 on W2k SP3 (had to change it from the example VB code I had):
dbE = Createobject("DAO.DBEngine.36")

strAccessDir = "C:\program files\microsoft office\office\samples\"
strOldDBName = strAccessDir + "Northwind.mdb"
strNewDBName = strAccessDir + "New Northwind 1.mdb"
   
dbE.CompactDatabase(strOldDBName,strNewDBName)
Hope this helps. Remember to adjust the directory path and file name accordingly.

Here is a good link,

http://www.oreilly.de/catalog/progacdao/chapter/ch02.html

but the examples are in VB and you will have to change the syntax to VFP. Are there any examples of this maybe in the Office Automation with VFP book from Hentzenwerk? I don't have my book at work, so I cannot look.

Tracy

>in the program i have:
>myobject = createobject("DAO.DBENGINE.36")
>after of this instantiation can i access to the metod compactdatabase, for compact an access database.
>I need this for an OLAP program.
>Thanks
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform