*.dannyg

Search for text in SQL database procs/functions

Jul
23

declare @searchString varchar(100)
Set @searchString = '%word_to_find%'
SELECT Distinct SO.Name
FROM sysobjects SO (NOLOCK)
INNER JOIN syscomments SC (NOLOCK)
on SO.Id = SC.ID
AND SC.Text LIKE @searchString
ORDER BY SO.Name

Technorati Tags: ,,

Step/Debug through VBScript

Jul
20

VBScript Array

Jul
20

Pretty neat script I wrote that allowing preserving an array by cloning it.

Function AddToArray(ArrayToClone, ValueToAdd)
Dim a, tempArray
    On Error Resume Next
    ReDim tempArray(UBound(ArrayToClone) + 1)
    If Err.Number = 0 Then
        For a = LBound(ArrayToClone) To UBound(ArrayToClone)
            tempArray(a) = ArrayToClone(a)       
        Next
    ElseIf Err.Number = 13 Then       
        Err.Clear
        ReDim tempArray(0)
    Else
        WScript.Echo Err.Number
    End If
    tempArray(UBound(tempArray)) = ValueToAdd       
    AddToArray = tempArray
End Function

Technorati Tags: ,

Sharepoint Solution Installer

Jul
20

Quickly Install WSP

Jul
20

stsadm -o addsolution -filename helpdesk.wsp

stsadm -o deploysolution -name helpdesk.wsp -allowgacdeployment -immediate

stsadm -o execadmsvcjobs

Technorati Tags: ,