Viewing 6 posts - 1 through 6 (of 6 total)
thanks patrick, i've done that and heres my code:
Dim oBackup As New SQLDMO.Backup
Dim oSQLServer As New SQLServer
oSQLServer.Connect "WENDY", "sa", ""
oBackup.Action = SQLDMOBackup_Files
oBackup.Database = "Jantzen"
oBackup.DatabaseFiles = "Jantzen_Data"
' Example illustrates backup implemented...
October 16, 2001 at 8:51 pm
if you use the backup file generated by the application i've coded, yes it's corrupted.. but if i do it manually, and then restore again, theres no problem.
October 16, 2001 at 1:48 am
i tried changing the restore code to include this:
oRestore.DatabaseFiles = "Jantzen_Data"
------------------------------------------
Dim oRestore As New SQLDMO.Restore
Dim oSQLServer As New SQLServer
oSQLServer.Connect "WENDY", "sa", ""
oRestore.Action = SQLDMORestore_Files
oRestore.Database = "Jantzen"
oRestore.DatabaseFiles = "Jantzen_Data"
oRestore.ReplaceDatabase = True
oRestore.Files...
October 12, 2001 at 11:03 pm
btw, jantzenbackup.bak is a file i manually created using backup of sql server.
October 12, 2001 at 9:36 pm
yup! tried it.. same error..
i changed
oRestore.Files = Text1.Text
to
oRestore.Files = "d:\jantzenbackup.bak"
October 12, 2001 at 9:33 pm
text1.text contains the filename of the backup file to restore from.
yep. this is to hide complexity from the user.
October 12, 2001 at 1:23 am
Viewing 6 posts - 1 through 6 (of 6 total)