>>>>I am using a small .dll for creating .ZIP files ( BigSpeed DLL). No matter what I try I can't seem to make it include my database container files (mydatabase.d??). I am running the code from within my application but I issue CLOSE DATABASES ALL before calling code to add files to the .ZIP. But no matter what I do, the container files are never in the .ZIP.
>>>>
>>>>What could it be that I am missing?
>>>>
>>>>Thank you in advance.
>>>
>>>Did you tried this and your Project is opened?
>>
>>I actually compiled the application and the project was not open. That is, I ran it from the .exe.
>Hmm,
>any other Private Datasession opened?
>
>WHat happens if you have:
>
>CLOSE DATASBASE ALL
>flError = .f.
>TRY
> OPEN DATABASE YOURDATA EXCLUSIVE
>CATCH
> flError = .t.
>ENDTRY
>IF flError
> lcStr = [DataBases opened in:]
> lnSessions = ASESSIONS(laSesessions)
> FOR lnFor = 1 TO lnSessions
> SET DATASESSION TO laSesessions[lnFor]
> lnDB = ADATABASES(laDB)
> lcStr = lcStr + CHR(13)+[Session # ]+TRANSFORM(lnFor)
> FOR lnFor1 = 1 TO lnDB
> lcStr = lcStr + CHR(13)+laDB[lnFor1]
> NEXT
> NEXT
> STRTOFILE(lcStr,[Test.TXT])
> MODI FILE Test.TXT
>ENDIF
>
>not tested
You know, I did another test. Instead of adding my database container to the .zip I simply put a code to copy the file to another name. (e.g. copy file MyDatabase.dbc to MyTestDatabase.dbc). And I get error "File is in use.". So, even though I can open the database exclusive, the file is being held by something. That's why I can't add the file to the .zip. I just need to find out what holds the file.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham