Home > Archive > Programming with dBASE > November 2005 > copy table structure to another directory









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author copy table structure to another directory
Moses Hanna

2005-11-09, 7:23 am

Hi
I am in D:\Acct26. I have a table called journal.dbf
I want to copy the structure of this table to D:\Ledger\Data\Moses
Hanna
the new table in the new directory should be "JRNL2006"
I coded the following:
_app.currentyear = "2006"
newdirectory = " D:\Ledger\data\Moses
Hanna"
use journal
destinationtable = newdirectory + "\JRNL" + _app.currentyear
copy structure to &destinationtable with production
use
if the new directory is " D:\Ledger\Data\Moses
Hanna" - the table is copied
if the new directory is " D:\Ledger\Data\Moses
Hanna" I get error message -
objecting at the space after Moses
I know something got to do with quotations, but how to code it. Please show
me
Thanks
Moses


Roland Wingerter

2005-11-09, 7:23 am

Moses Hanna wrote

> I am in D:\Acct26. I have a table called journal.dbf
> I want to copy the structure of this table to D:\Ledger\Data\Moses
Hanna
> the new table in the new directory should be "JRNL2006"
> I coded the following:
> _app.currentyear = "2006"
> newdirectory = " D:\Ledger\data\Moses
Hanna"
> use journal
> destinationtable = newdirectory + "\JRNL" + _app.currentyear
> copy structure to &destinationtable with production
> use
> if the new directory is " D:\Ledger\Data\Moses
Hanna" - the table is copied
> if the new directory is " D:\Ledger\Data\Moses
Hanna" I get error
> message - objecting at the space after Moses
> I know something got to do with quotations, but how to code it. Please
> show

-------
Try

copy structure to "&destinationtable" with production

Roland


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com