General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Thank you very much Olaf. Exactly what I was loking for. This will lead to the next question wuich I will write separately and direct to you :)
Thanks,
Alex
>>Any suggestions?
>
>oFS=createobject("Scripting.Filesystemobject")
>oFS.Copyfile()
>
>Or do some slight modifications of gendbc.prg to make it work on an open database:
>
>-change CLOSE DATABASE in line 256 to SET DATABASE TO
>-comment out line 289 COMPILE DATABASE (the database objectcode should be up to date anyway
> and we want a copy, nothing changed or recompiled)
>-change line 290 to USE (m.g_cFullDatabase) AGAIN
>-change line 305 OPEN DATABASE ... EXCLUSIVE, instead of reopening it we do...
> SET DATABASE TO (m.g_cFullDatabase)
> ...as we haven't closed the database in line 256.
>
>Maybe I've overseen something, but I did these steps on a fresh and original version of gendbc.prg of VFP9. The general idea is to keep the database open and to not make anything which needs exclusive access.
>Now that the script does not need exclusive access to the databse it copies, you can modify it as needed. You eg don't want to copy views or whatever.
>
>Then DO gendbc.prg WITH "createdbc.prg" and then CD DestinationDirectory and DO createdbc.prg
>
>Now you will have th DBC/DCT/DCX files right, you may erase all DBFs and CDX or append data to them instead of copying the DBFs of the DBC.
>
>Bye, Olaf.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only