Delete file by previous date with VBScript

VBScript (“Microsoft Visual Basic Scripting Edition”) Script delete file by previous date with VBScript Set shell = CreateObject(“WScript.Shell”) ‘Set for call batch file shell.CurrentDirectory = “c:\Testscript” ‘Location batch file Set fso = CreateObject(“Scripting.FileSystemObject”) startFolder = “d:\FileBackup” ‘Folder to start deleting (subfolders…
Read more »Clear Log File MS SQL Server

Open Object Explorer, Right on database name and click Properties. And then click options and select Simple for Recovery model option. And right click on database name and click Tasks -> Shrink -> Files File type option and…
Read more »Insert signgle quote into MS SQL Server

INSERT INTO TABLE1 (NUMBER1,TEXT1) VALUES (1,’This’s my sample’) ==> INSERT INTO TABLE1 (NUMBER1,TEXT1) VALUES (1,’This”s my sample’)
Read more »Function pwFormatDate not working in Crystal Report

u2lcapw.dll file missing from the “c:\windows\crystal” Download file this link
Read more »Check directory exists path with VB.NET

Imports namespace System.IO as first. If Directory.Exists(Directory Path) = False Then MsgBox(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)) End If
Read more »Enter only number on Text box with VB.Net

If Char.IsDigit(e.KeyChar) Or Asc(e.KeyChar) = 8 Then e.Handled = False Else e.Handled = True End If
Read more »Set number date to text date with Crystal report.

local stringvar From_Day; local stringvar To_Day; local stringvar MMM; local stringvar YYYY; From_Day := totext(day(pwformatdate(tonumber(“20211101”))),00); To_Day := totext(day(pwformatdate(tonumber(“20211116”))),00);; MMM := totext(pwformatdate(tonumber(“20211116″)),”MMM”);; YYYY := totext(pwformatdate(tonumber(“20211116″)),”yyyy”);; UCASE(MMM) + ” ” + totext(tonumber(From_Day),”00″) +”-“+ totext(tonumber(To_Day),”00”) + “, ” & YYYY;…
Read more »How To Show Month First With VB.Net?

Function show month first for VB.Net Public Function Public Function MonthFirst(ByVal pDate As Object) As Object On Error GoTo MonthFirst_Err MonthFirst = DateSerial(Year(pDate), Month(pDate), 1) MonthFirst_Exit: Exit Function MonthFirst_Err: MonthFirst = DateSerial(Year(Now), Month(Now), 1) Resume MonthFirst_Exit End Function…
Read more »How to show end of month with VB.Net?

Function show end of month for VB.Net Public Function MonthEnd(ByVal pDate As Object) As Object On Error GoTo MonthEnd_Err Dim dd As Integer dd = DateAndTime.Day((DateSerial(Year(pDate), Month(pDate), 28).AddDays(4))) MonthEnd = DateSerial(Year(pDate), Month(pDate), 28).AddDays(4).AddDays(-dd) MonthEnd_Exit: Exit Function MonthEnd_Err: MonthEnd…
Read more »How to setup MS SQL Server backup daily?

Log in and using SQL Server Management Studio. In the object explorer, Select where you want to manage SQL Server Agent Service. Right click on SQL Server Agent and then select start. Select Management and right click Maintenance…
Read more »