Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-07-23 : 00:34:43
|
| Vindana writes "dear SQL TEAM, I was trying to write a backup/restore program for our comapany. I know there are hundreds of examples for SQL DMO backup/restore processes. But my problem is that when long file names with SPACES the backup method fails, Of course giving errors.I am using SQL 2000 running on windows 2000 server. My machine is Windows ME. and using VB 6 with SP5EG.----------------------------------------------------------------Public Sub DmoBackupPro(DmoServer As sqldmo.SQLServer, DataBase As String) Dim DmoBackup As New sqldmo.Backup On Error GoTo ErrLog DmoBackup.DataBase = DataBase DmoBackup.Files = """" & DmoServer.Registry.SQLDataRoot & "\" & DataBase & ".BAK" & """" ' Backup the database. DmoBackup.SQLBackup DmoServer 'Here it fails Set DmoServer = Nothing Set DmoBackup = Nothing Set fsoBKP = Nothing Exit SubErrLog: MsgBox Err.Description & " Process May not be Complete", vbCritical, "Message" On Error GoTo 0 End Sub---------------------------------------------------------------************here the DmoServer.Registry.SQLDataRoot will return C:\program files\microsoft SQl server\MSQL$LIVEwhen I replaced the string with something like "C:\test" It works.So please Help me.Thanks.Vindana" |
|
|
|
|
|