hi guys,
im having a bit of trouble.
i have this script from a friend
'delete all stored procedures
strSQL = "Declare @prc varchar(150) "
strSQL = strSQL & "While (Select Count(*) from sysobjects where name Like '" & strSPPrefix & "%' and xtype = 'P') > 0 "
strSQL = strSQL & "Begin "
strSQL = strSQL & "Set @prc = (Select 1 [name] from sysobjects where name LIKE '" & strSPPrefix & "%' and xtype='P') "
strSQL = strSQL & "Set @prc = 'Drop Procedure ' + @prc "
strSQL = strSQL & " Exec(@prc) "
strSQL = strSQL & "END "
its ment to delete all the stored Procedures with a set begining.
but it hangs all the time, i think its going into a continuos loop. the prefix im checking for exists. can anyone sheed any light on this?
im having a bit of trouble.
i have this script from a friend
'delete all stored procedures
strSQL = "Declare @prc varchar(150) "
strSQL = strSQL & "While (Select Count(*) from sysobjects where name Like '" & strSPPrefix & "%' and xtype = 'P') > 0 "
strSQL = strSQL & "Begin "
strSQL = strSQL & "Set @prc = (Select 1 [name] from sysobjects where name LIKE '" & strSPPrefix & "%' and xtype='P') "
strSQL = strSQL & "Set @prc = 'Drop Procedure ' + @prc "
strSQL = strSQL & " Exec(@prc) "
strSQL = strSQL & "END "
its ment to delete all the stored Procedures with a set begining.
but it hangs all the time, i think its going into a continuos loop. the prefix im checking for exists. can anyone sheed any light on this?