Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copying table from one dbc to another
Message
De
05/01/2005 04:46:56
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
05/01/2005 02:38:48
Randy Riegel
Zimish Contracting
Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
SAMBA Server
Database:
Visual FoxPro
Divers
Thread ID:
00974294
Message ID:
00974307
Vues:
22
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform