Click here to Skip to main content
15,885,920 members

S Douglas - Professional Profile



Summary

    Blog RSS
2
Author
3,549
Authority
5,057
Debator
12
Enquirer
661
Organiser
3,011
Participant
0
Editor
Just another hack, who manages to take care of issues that would otherwise go unsolved. Smile | :)

 

Reputation

Weekly Data. Recent events may not appear immediately. For information on Reputation please see the FAQ.

Privileges

Members need to achieve at least one of the given member levels in the given reputation categories in order to perform a given action. For example, to store personal files in your account area you will need to achieve Platinum level in either the Author or Authority category. The "If Owner" column means that owners of an item automatically have the privilege. The member types column lists member types who gain the privilege regardless of their reputation level.

ActionAuthorAuthorityDebatorEditorEnquirerOrganiserParticipantIf OwnerMember Types
Have no restrictions on voting frequencysilversilversilversilver
Bypass spam checks when posting contentsilversilversilversilversilversilvergoldSubEditor, Mentor, Protector, Editor
Store personal files in your account areaplatinumplatinumSubEditor, Editor
Have live hyperlinks in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Have the ability to include a biography in your profilebronzebronzebronzebronzebronzebronzesilverSubEditor, Protector, Editor
Edit a Question in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Edit an Answer in Q&AsilversilversilversilverYesSubEditor, Protector, Editor
Delete a Question in Q&AYesSubEditor, Protector, Editor
Delete an Answer in Q&AYesSubEditor, Protector, Editor
Report an ArticlesilversilversilversilverSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending ArticlegoldgoldgoldgoldSubEditor, Mentor, Protector, Editor
Edit other members' articlesSubEditor, Protector, Editor
Create an article without requiring moderationplatinumSubEditor, Mentor, Protector, Editor
Approve/Disapprove a pending QuestionProtector
Approve/Disapprove a pending AnswerProtector
Report a forum messagesilversilverbronzeProtector, Editor
Approve/Disapprove a pending Forum MessageProtector
Have the ability to send direct emails to members in the forumsProtector
Create a new tagsilversilversilversilver
Modify a tagsilversilversilversilver

Actions with a green tick can be performed by this member.


 
GeneralSQL Server Errors Pin
S Douglas27-Oct-10 4:40
professionalS Douglas27-Oct-10 4:40 
GeneralRe: SQL Server Errors Pin
S Douglas6-Jul-11 11:16
professionalS Douglas6-Jul-11 11:16 
GeneralSSAS - Processing Error Pin
S Douglas22-Oct-10 20:58
professionalS Douglas22-Oct-10 20:58 
GeneralRandom bits of SQL Pin
S Douglas24-Sep-10 4:12
professionalS Douglas24-Sep-10 4:12 
GeneralRandom bits of SQL Pin
S Douglas24-Sep-10 4:10
professionalS Douglas24-Sep-10 4:10 
GeneralRandom bits of SQL [modified] Pin
S Douglas23-Sep-10 11:52
professionalS Douglas23-Sep-10 11:52 
GeneralTSQL Case statement Pin
S Douglas23-Sep-10 11:26
professionalS Douglas23-Sep-10 11:26 
General(6 years, 2 months) Pin
S Douglas9-May-10 21:03
professionalS Douglas9-May-10 21:03 
GeneralSSAS Backups Followup Pin
S Douglas1-Jul-09 18:23
professionalS Douglas1-Jul-09 18:23 
GeneralCatch up.... [modified] Pin
S Douglas29-Jun-09 8:26
professionalS Douglas29-Jun-09 8:26 
GeneralSSAS Backups Pin
S Douglas27-Apr-09 4:07
professionalS Douglas27-Apr-09 4:07 
GeneralRandom Junk Pin
S Douglas25-Apr-09 21:17
professionalS Douglas25-Apr-09 21:17 
GeneralSSAS Best practices Pin
S Douglas24-Apr-09 3:57
professionalS Douglas24-Apr-09 3:57 
GeneralSSRS... Pin
S Douglas20-Apr-09 10:44
professionalS Douglas20-Apr-09 10:44 
GeneralSSAS... Pin
S Douglas2-Apr-09 17:59
professionalS Douglas2-Apr-09 17:59 
GeneralSSAS from the trenches Cont... Pin
S Douglas11-Mar-09 18:33
professionalS Douglas11-Mar-09 18:33 
GeneralSSAS from the trenches (Cont...) Pin
S Douglas11-Mar-09 18:07
professionalS Douglas11-Mar-09 18:07 
GeneralSSAS from the trenches Pin
S Douglas11-Mar-09 17:52
professionalS Douglas11-Mar-09 17:52 
GeneralCode formatting Pin
S Douglas23-Jan-09 19:18
professionalS Douglas23-Jan-09 19:18 
GeneralRe: Code formatting Pin
S Douglas21-Feb-09 9:16
professionalS Douglas21-Feb-09 9:16 
GeneralRe: Code formatting Pin
S Douglas21-Feb-09 9:20
professionalS Douglas21-Feb-09 9:20 
GeneralWhats happening Pin
S Douglas21-Feb-09 13:13
professionalS Douglas21-Feb-09 13:13 
GeneralHEHE Pin
S Douglas21-Feb-09 13:15
professionalS Douglas21-Feb-09 13:15 
GeneralMap printer, vbscript Pin
S Douglas23-Jan-09 19:11
professionalS Douglas23-Jan-09 19:11 
GeneralDelete files, vbscript Pin
S Douglas23-Jan-09 19:07
professionalS Douglas23-Jan-09 19:07 
Here's another script that's no longer used. Again, posting it for someone else to use

VB.NET
Option Explicit
'**************************************************************'
'*** Del.Logs by Stephan Douglas 						***'
'*** Contact stephan@sentinalsoftware.com 				***' 
'*** No warranties express or implied use at your own risk		***' 
'*** You are free to use as you see fit 					***'
'**************************************************************'

' Requirements as defined by Krishna K 11.12.2008
' 1: Delete xml files in 'C:\SLMMSG\log\ImportExport\' older than a give number of day, from server 
' 2: Need to keep one weeks worth of logs (approx)
' 3: Based on date created

Call Main()

'****************************************************'
'*** Script Main, all work stems from main ***'
'****************************************************'
Sub Main()
'On error Resume Next
Dim sPath, sSelect, dDate, sResults, dFileDate
Dim objWMIService, objChild, objFile
Dim objFSO

	sPath = GetIniValue("Path")

	if (Len(sPath)) < 1 Then
		iCounter = 0
		Exit Sub
	End if	
	Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
	
	dDate = DatePart("yyyy", DateAdd("d", GetIniValue("NumDays"), Date))
	
	If DatePart("m", DateAdd("d", GetIniValue("NumDays"), Date)) < 10 Then 
		dDate = dDate & "0" & DatePart("m", DateAdd("d", GetIniValue("NumDays"), Date))
	Else
		dDate = dDate & DatePart("m", DateAdd("d", GetIniValue("NumDays"), Date))
	End If

	If DatePart("d", DateAdd("d", GetIniValue("NumDays"), Date)) < 10 Then 
		dDate = dDate & "0" & DatePart("d", DateAdd("d", GetIniValue("NumDays"), Date))
	Else
		dDate = dDate & DatePart("d", DateAdd("d", GetIniValue("NumDays"), Date))
	End If
	
	dDate = dDate & "000000.000000+000"
	sSelect = "Select * from CIM_DataFile where Path= '" & sPath & "' and CreationDate <= '" & dDate & "'"

	Set objFSO = CreateObject("Scripting.FileSystemObject")
	
	Set objChild = objWMIService.ExecQuery(sSelect)
	if not IsNull(objChild) then
		For Each objFile in objChild
			Call objFSO.Delete(objFile.Name, true)
		Next
	End If
	
	Set objFSO = Nothing
	Set objChild = Nothing
	Set objWMIService = Nothing
	Set objFile = Nothing

'*** Error Handling ***'
If Err.Number <> 0 Then
	'Call LogIt ("Error- Main - " & Err.Number & " " & Err.Description, 2)
End If
End Sub

'***************************************************************************'
'*** Get Value From INI File *** SFD 01/04/2006
'***************************************************************************'
Function GetIniValue(sID)
On Error Resume Next
Dim objFSO
Dim objTextFile
Dim sValue
Dim sKey, sFileName

Set objFSO = CreateObject("Scripting.FileSystemObject")
	'*** Make sure the ini file exists ***'
	sFileName = GetScriptName(".ini")
        If (objFSO.FileExists(sFileName) = False) Then
				msgbox "No configuration file defined!" 
                GetIniValue = vbNullString
				set objFSO = Nothing
                Exit Function
        End If
	
	'*** Open a handle to the ini file ***'
        Set objTextFile = objFSO.OpenTextFile(sFileName)
	
	'*** Parse the ini file ***'
        Do While Not objTextFile.AtEndOfStream
                sValue = objTextFile.ReadLine()
               If InStr(sValue, "=") Then
					sKey = Split(sValue, "=")
					If sKey(0) = sID Then
							GetIniValue = sKey(1)
					End If
				End If
        Loop
        
        objTextFile.Close
        
Set objTextFile = Nothing
set objFSO = Nothing

'*** Error Handling ***'
If Err.Number <> 0 Then
	'Call LogIt ("Error- Get Ini Value - " & Err.Number & " " & Err.Description, 2)
End If
End Function

'***************************************************************************'
'*** Return Script Name with user selected File Extension *** SFD 03/02/2008
'***************************************************************************'
Function GetScriptName(sExt)
On Error Resume Next
	
	GetScriptName = Replace(Wscript.ScriptName, ".vbs", sExt)

'*** Error Handling ***'
If Err.Number <> 0 Then
	'Call LogIt ("Error- Get Script Name - " & Err.Number & " " & Err.Description)
End If
End Function



Common sense is admitting there is cause and effect and that you can exert some control over what you understand.


General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.