Tuesday, May 8, 2012

Difference between Delete and Truncate and count

Difference between Delete and Truncate
if we use truncate table then we can reuse storage. all memory is free for other operation not wait for any cleanup operation in truncate while in delete the memory is not available for further use.

Difference between count() and count(*)
In count(*) include duplicate null values while in count() not include null value

Wednesday, May 2, 2012

QTP-How to create and delete folder on path

vb script create 5 folders test1 test2 test3 test4 test5

set fso=createobject("scripting.filesystemobject")
for i=1 to 5
fso.createfolder "C:\test" &i
next

vb script to delete folder test1,test2, test3,test4 and test5
dim vfso
set vfso=createobject("scripting.filesystemobject")
for i=1 to 5
vfso.deletefolder "C:\test" &i
next

Thursday, April 19, 2012

VB Script -Programs

  1. *
    **
    ***
    Please write a code to get output like above diagram.
for i=1 to 3 step 1
  for j=1 to i step 1
    vstr=vstr&"*"
  next
   vstr=vstr&vbnewline
next
msgbox vstr
  1. sunday is sunday
    monday
    tuesday
    wendesday
    sunday
    thursday
    friday
    saturday
    sunday
    sunday

    how to count no of sunday in the text file from vb?
Set fso=createobject("scripting.filesystemobject")
Set forread=fso.OpenTextFile("path\test.txt",1)
text=forread.ReadAll
coun=ubound(split(text,"sunday"))
msgbox coun

3. int a=4857 i need output as 7584.without using any inbuild function?
var=4857 For i=1 to len(var) x=var mod 10 num=num&x var=var/10 var=fix(var) Next msgbox num

Wednesday, February 29, 2012

This month No New Update

Dear Readers,

This month no new updates from myside, due to some new role have to play in my life with my lovely daughter.