Hi
I need to programatically duplicate a CS database. There are 150 odd tables in the database with several of them having in excess of 1 million records so I thought the best option would be to backup, & then restore under a different name. Finally I could then go into the duplicate database and make any necessary adjustments.
I use HBackup to backup the required database & then use
HRestoreBackup(DataConnection,iBackupId,"OldDBaseName","NewDbaseName",PROG_Process)
to restore it. According to my reading of the Help file this syntax should restore the database as NewDBaseName. However what it actually does is create a folder called NewDbaseName and then restores OldDbaseName under it.
I can set a connection as DataConnection..Database = NewDbaseName\OldDbaseName and this works for HRead etc, however I cannot run any queries on it as the database name is not a valid HFSQL name because of the backslash.
All I really want/need it to do is duplicate it at the same level,as the help suggests it should. Any ideas or alternative suggestions would be greatly appreciated.
Thanks
David