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 |
|
rubs_65
Posting Yak Master
144 Posts |
Posted - 2005-09-27 : 15:45:14
|
| Hi,In our maintenance script, I added an Activex script and now when trying to save the job getting error:Error 14277: The command script does not destroy all the objects that it creates. Revise the command script. The job was not savedWhat can be the possible issue?Thanks--HarvinderFollowing is the script I am trying to add and this works from commandprompt:dim myConndim myRecordsetdim ifilenameset myConn = CreateObject("ADODB.Connection") set myRecordset = CreateObject("ADODB.Recordset") myConn.Open "driver={SQL Server};server=testserver;uid=nm;pwd=nm;database=test"mySQLCmdText = "Select top 1 'file' = filename from t_backup_table order by id desc"myRecordset.Open mySQLCmdText, myConnset Flds = myRecordset.Fieldsset ifilename = Flds("file")Set objShell = CreateObject("WScript.Shell") Set objScriptExec = objShell.Exec("C:\harv\backup\Scripts\pkzipc.exe-add -lev=9 c:\backupscript\" & ifilename & ".zip c:\backupscript\" & ifilename &".bak") |
|
|
|
|
|