General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Hi Vladimir.
>1 I included database 3 files dbc dbt dbx with different names , than real database , but really same content in project, made them being frozen in exe
>and tryed to make copy ( copy file command) these frozen files outside on the disk.
>Programm said , there is no such file.
For some types of files, VFP keeps the original source path in the EXE. So, if you use COPY FILE MYDBC.DBC TO MYNEWDBC.DBC, where MYDBC.DBC is the file included in the EXE, VFP actually looks for the file in the original source directory on the user's system. Since that directory likely doesn't exist, they get this error.
What I do instead is to put these files into a memo field in a table that's included in the EXE, then copy them from the memo to a file on disk at runtime. Here's an example:
loading files into table (development time):
APPEND MEMO (fieldname) FROM (filename) OVERWRITE
copying files to disk (runtime):
COPY MEMO (fieldname) TO (filename)
>2 I did same frosen database files, opened them like read
>tables-use mydb.dbconly
>and made copy to *.db*. It worked and did me 3 files with right extension
>, but, when I tryed to open them like database, I observed message-it is not database container
When VFP copies the records to a new table, that table doesn't have the correct byte in its header that marks it as a DBC. Check the VFP help file for details on what byte it is and what the value should be (I don't have my docs handy right now).
That said, there may be other issues that will cause this scheme to fail. If there are deleted records in the DBC, they won't be copied to the new table so the RECNO() values won't match the OBJECTID values. Be sure to PACK DATABASE before doing this.
Doug
Previous
Next
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