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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 activex script giving error while creating job

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 saved

What can be the possible issue?

Thanks
--Harvinder

Following is the script I am trying to add and this works from command
prompt:
dim myConn
dim myRecordset
dim ifilename
set 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, myConn
set Flds = myRecordset.Fields
set 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")


   

- Advertisement -