| Author |
Copy files across databases
|
|
| Alan Fitch 2005-10-11, 7:27 am |
| I need to transfer files from a workstation where the path to the files is referenced by an alias to a server where the path is again referenced by an alias. The following gives an error message - not allowed across differnt databases -
copy table ":fsa1:fsa.dbf" to ":ctc2data:fsa.dbf"
I have tried using the copy function in an UpdateSet()
dsource = new database()
dsource.databasename = "fsa1"
dsource.active = true
ddestination = new database()
ddestination.databasename = "ctc2data"
ddestination.active = true
qsource = new query()
qsource.sql = "Select * from fsa.dbf"
qsource.database = dsource
qsource.active = true
u = new updateset()
u.source = qsource.rowset
u.destination = ":ctc2data:fsa.dbf"
u.copy()
This copies the data and memo table but not the index table.
Am I doing something wrong or is there a better way?
Alan
| |
| Todd Kreuter 2005-10-11, 7:27 am |
| Alan Fitch wrote:
>
> I need to transfer files from a workstation where the path to the files is referenced by an alias to a server where the path is again referenced by an alias. The following gives an error message - not allowed across differnt databases -
>
> copy table ":fsa1:fsa.dbf" to ":ctc2data:fsa.dbf"
Get the path of the destination database using BDEAlias.cc then
dsource = new database()
dsource.databasename = "fsa1"
dsource.active = true
dSource.copyTable("fsa.dbf", cFile)
Where cFile is the path and file name of the destination.
--
Todd Kreuter [dBVIPS]
| |
| Alan Fitch 2005-10-11, 7:27 am |
|
>
> Get the path of the destination database using BDEAlias.cc then
>
> dsource = new database()
> dsource.databasename = "fsa1"
> dsource.active = true
>
> dSource.copyTable("fsa.dbf", cFile)
>
> Where cFile is the path and file name of the destination.
>
Thanks Todd, problem solved.
Alan
|
|
|
|