Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 4 of 4 total |
Backup Date & Time.. |
Sun, Aug 4 2019 11:45 PM | Permanent Link |
Ian Branch | Hi Team,
I have been using the following without issue for some time. {sql} DBSBackup.Execute('BACKUP DATABASE "DBiWorkflow" AS "DBiWorkflow-Manual Backup-' + Engine.DateToSQLStr(Date)+ '" TO STORE "Backups" COMPRESSION 9 INCLUDE CATALOG'); {sql} I want to now include the time. I tried the following but it gives and error.. {sql} DBSBackup.Execute('BACKUP DATABASE "DBiWorkflow" AS "DBiWorkflow-Manual Backup-' + Engine.DateToSQLStr(Date)+ ' ' + Engine.TimeToSQLStr(Date)+'" TO STORE "Backups" COMPRESSION 9 INCLUDE CATALOG'); {sql} Thoughts suggestions if you would be so kind. Ian |
Mon, Aug 5 2019 3:14 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ian
1. Please include the error - it helps 2. I think it will be the time format - it includes : which is not allowed in file names 3. It won't do what you want anyway - have a look at the Date function in Delphi - the time portion will always be 00:00 - use Now instead Roy Lambert |
Tue, Aug 6 2019 3:02 AM | Permanent Link |
Ian Branch | Hi Roy,
This worked.. {sql} DBSBackup.Execute('BACKUP DATABASE "DBiWorkflow" AS "DBiWorkflow-Manual Backup-' + FormatDateTime('yyyy-mm-dd @ HHnn', now) + '" TO STORE "Backups" COMPRESSION 9 INCLUDE CATALOG'); {sql} Turned out the issue was the ':' being inserted into the Time. The .tmp file was being created OK but wouldn't convert to .Bkp. All sorted. Thanks for the pointer/suggestion. Regards, Ian |
Tue, Aug 6 2019 4:48 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ian
>Turned out the issue was the ':' being inserted into the Time. The .tmp file was being created OK but wouldn't convert to .Bkp. Weird - I would have expected the .tmp file to object as well - good old Windows Roy |
This web page was last updated on Tuesday, May 7, 2024 at 02:40 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |