>I'm trying to copy a table to one dbc to another using the command:
>
>
>use mytable.dbf
>select mytable
>copy to "mytable2.dbf" database "test.dbc" with cdx
>
>
>Everything copys fine to the new database container but I lose the formating of the fields. Is there a special way to copy tables from one DBC to another? Or a utility to do it for me?
>
>Randy
Randy,
You could get/set them using dbgetprop()/dbsetprop() - most of them, readonly ones need alter table, create trigger etc commands. afields() also provides limited version of transformation.
Alternatively with gendbc generate programmatic version of your 'old' database, open 'new database, execute MakeTable_tablename part of generated code and then append from old. You might as well just 'steal' the dbsetprop()s from that code. This would be easiest in most cases.
Hacking old.dbc is another way but I don't suggest unless you know what you're doing.
Cetin