ninel
Active member
I have the following code:
This is not working. I am getting the following error:
"Public member 'oSQLServer' on type 'BackupClass' not found."
Does anyone know how to accomplish this?
Thanks,
Ninel
VB.NET:
Dim oSQLServer As New SQLDMO.SQLServer
Dim oBackup As New SQLDMO.Backup
Dim oRestore As New SQLDMO.Restore
Dim BACKUPFILE As String
Dim DATABASE As String
BACKUPFILE = "C:\VoicenetSQL\project\tampa\Politic\" & ProjectFolder & "\VoiceNet_TemplateBackup.bkp"
DATABASE = "VoiceNet_at0000"
With oBackup
.Files = BACKUPFILE
.Database = DATABASE
.BackupSetName = "VoiceNet"
.BackupSetDescription = "Backup from VB.NET application"
.oSQLServer.Connect("NINEL-D246655F1", "timecontroluser", "timecontroluser")
.SQLBackup(oSQLServer)
End With
oSQLServer.DisConnect()
"Public member 'oSQLServer' on type 'BackupClass' not found."
Does anyone know how to accomplish this?
Thanks,
Ninel