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 |
ninel
Posting Yak Master
141 Posts |
Posted - 2006-08-04 : 16:33:57
|
I have the following code:Dim oSQLServer As New SQLDMO.SQLServerDim oBackup As New SQLDMO.BackupDim oRestore As New SQLDMO.RestoreDim BACKUPFILE As StringDim DATABASE As StringBACKUPFILE = "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() 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 |
|
dfiala
Posting Yak Master
116 Posts |
Posted - 2006-08-04 : 16:43:41
|
This oSQLServer.Connect("NINEL-D246655F1", "timecontroluser", "timecontroluser")is probablySQLServer.Connect("NINEL-D246655F1", "timecontroluser", "timecontroluser")Dean FialaVery Practical Software, IncNow with Blogging...http://www.vpsw.com/blogbabyMicrosoft MVP |
 |
|
ninel
Posting Yak Master
141 Posts |
Posted - 2006-08-07 : 10:26:42
|
I changed my code to reflect your post:With oBackup .Files = BACKUPFILE .Database = DATABASE .BackupSetName = "VoiceNet" .BackupSetDescription = "Backup from VB.NET application" .SQLServer.Connect("NINEL-D246655F1", "timecontroluser", "timecontroluser") .SQLBackup(oSQLServer) End With I'm still getting the error : "Public member 'SQLServer' on type 'BackupClass' not found"Any ideas what I'm doing wrong?Thanks,Ninel |
 |
|
ninel
Posting Yak Master
141 Posts |
Posted - 2006-08-07 : 10:33:05
|
Thank you for your help, but I figured out the issue.I needed to move the following code out of the With statement. oSQLServer.Connect("NINEL-D246655F1", "timecontroluser", "timecontroluser") |
 |
|
|
|
|
|
|