Sunday, August 24, 2008

Lock and Unlock folder

To lock folder

Create a text file on the same path where your folder resides and write (e.g. if u want to lock folder on d:\ then create these files on d:\)

ren lockfolderName lockfolderName.{21EC2020-3AEA-1069-A2DD-08002B30309D}

then save this file with extension ".bat"

To unlock folder

Create a text file on the same path where your folder resides and write
ren lockfolderName.{21EC2020-3AEA-1069-A2DD-08002B30309D} lockfolderName
then save this file with extension ".bat"

Monday, June 2, 2008

Stored Procedure to Search Value in Database

set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go



ALTER PROC [dbo].[SearchAllTables]
(
@SearchStr nvarchar(100)
)
AS
BEGIN



CREATE TABLE #Results (ColumnName nvarchar(370), ColumnValue nvarchar(3630))

SET NOCOUNT ON

DECLARE @TableName nvarchar(256), @ColumnName nvarchar(128), @SearchStr2 nvarchar(110)
SET @TableName = ''
SET @SearchStr2 = QUOTENAME('' + @SearchStr + '','''')

WHILE @TableName IS NOT NULL
BEGIN
SET @ColumnName = ''
SET @TableName =
(
SELECT MIN(QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME))
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
AND QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME) > @TableName
AND OBJECTPROPERTY(
OBJECT_ID(
QUOTENAME(TABLE_SCHEMA) + '.' + QUOTENAME(TABLE_NAME)
), 'IsMSShipped'
) = 0
)

WHILE (@TableName IS NOT NULL) AND (@ColumnName IS NOT NULL)
BEGIN
SET @ColumnName =
(
SELECT MIN(QUOTENAME(COLUMN_NAME))
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = PARSENAME(@TableName, 2)
AND TABLE_NAME = PARSENAME(@TableName, 1)
AND DATA_TYPE IN ('char', 'varchar', 'nchar', 'nvarchar')
AND QUOTENAME(COLUMN_NAME) > @ColumnName
)

IF @ColumnName IS NOT NULL
BEGIN
INSERT INTO #Results
EXEC
(
'SELECT distinct ''' + @TableName + '.' + @ColumnName + ''', LEFT(' + @ColumnName + ', 3630)
FROM ' + @TableName + ' (NOLOCK) ' +
' WHERE ' + @ColumnName + ' LIKE ' + @SearchStr2
)
END
END
END

SELECT ColumnName, ColumnValue FROM #Results
END

Monday, May 19, 2008

Fix for Invalid Viewstate error

http://community.discountasp.net/default.aspx?f=24&m=10014&g=10785

Thursday, April 10, 2008

Sharepoing Installation steps

http://www.codeproject.com/KB/sharepoint/MOSS_2007__Installation.aspx

Monday, March 17, 2008

CSV Problem

http://msdn2.microsoft.com/en-us/library/ms974559.aspx

Monday, March 3, 2008

create Virtual Directory using C#

http://www.vbforums.com/showthread.php?t=347207

Code to create Virtual Directory using C#

  1. Private Sub CreateVirtualDir(ByVal WebSite As String, ByVal AppName As String, ByVal Path As String)
  2. Dim IISSchema As New System.DirectoryServices.DirectoryEntry("IIS://" & WebSite & "/Schema/AppIsolated")
  3. Dim CanCreate As Boolean = Not IISSchema.Properties("Syntax").Value.ToString.ToUpper() = "BOOLEAN"
  4. IISSchema.Dispose()
  5. If CanCreate Then
  6. Dim PathCreated As Boolean
  7. Try
  8. Dim IISAdmin As New System.DirectoryServices.DirectoryEntry("IIS://" & WebSite & "/W3SVC/1/Root")
  9. 'make sure folder exists
  10. If Not System.IO.Directory.Exists(Path) Then
  11. System.IO.Directory.CreateDirectory(Path)
  12. PathCreated = True
  13. End If
  14. 'If the virtual directory already exists then delete it
  15. For Each VD As System.DirectoryServices.DirectoryEntry In IISAdmin.Children
  16. If VD.Name = AppName Then
  17. IISAdmin.Invoke("Delete", New String() {VD.SchemaClassName, AppName})
  18. IISAdmin.CommitChanges()
  19. Exit For
  20. End If
  21. Next VD
  22. 'Create and setup new virtual directory
  23. Dim VDir As System.DirectoryServices.DirectoryEntry = IISAdmin.Children.Add(AppName, "IIsWebVirtualDir")
  24. VDir.Properties("Path").Item(0) = Path
  25. VDir.Properties("AppFriendlyName").Item(0) = AppName
  26. VDir.Properties("EnableDirBrowsing").Item(0) = False
  27. VDir.Properties("AccessRead").Item(0) = True
  28. VDir.Properties("AccessExecute").Item(0) = True
  29. VDir.Properties("AccessWrite").Item(0) = False
  30. VDir.Properties("AccessScript").Item(0) = True
  31. VDir.Properties("AuthNTLM").Item(0) = True
  32. VDir.Properties("EnableDefaultDoc").Item(0) = True
  33. VDir.Properties("DefaultDoc").Item(0) = "default.htm,default.aspx,default.asp"
  34. VDir.Properties("AspEnableParentPaths").Item(0) = True
  35. VDir.CommitChanges()
  36. 'the following are acceptable params
  37. 'INPROC = 0
  38. 'OUTPROC = 1
  39. 'POOLED = 2
  40. VDir.Invoke("AppCreate", 1)
  41. Catch Ex As Exception
  42. If PathCreated Then
  43. System.IO.Directory.Delete(Path)
  44. End If
  45. Throw Ex
  46. End Try
  47. End If
  48. End Sub

Tuesday, February 26, 2008

Microsoft .Net Collection

http://www.microsoft.com/belux/msdn/fr/community/columns/jtielens/collections1.mspx

Monday, February 25, 2008

Friday, February 22, 2008

For C# related queries:
http://www.java2s.com/Code/CSharp/CatalogCSharp.htm
For Windows Update:
http://update.microsoft.com/windowsupdate/v6/default.aspx

For registering request to government
http://darpg-grievance.nic.in/

--Link to get books online:- http://www.ebooksportal.org/

---Sort Using DAO http://search.technet.microsoft.com/search/default.aspx?siteId=1&tab=0&query=sort+property+of+DAO

To Add Sample Data Bases in SQL server 2005.

http://www.microsoft.com/downloads/details.aspx?familyid=E719ECF7-9F46-4312-AF89-6AD8702E4E6E&displaylang=en

For Microsoft CRM Online Support and Links

http://www.workopia.com/Links.htm


To download E Books:

http://www.toebook.com/5-dfbe74899836f260.htm

http://novian.web.ugm.ac.id

For Images Wallpapers

http://www.friendskingdom.com/


For downloading .Net Framework.

http://msdn2.microsoft.com/en-us/netframework/aa569263.aspx


For Online Microsoft Product Information

http://channel9.msdn.com/


For Online Books

ftp://ftp.uar.net/pub/e-books/

To watch movies online:

http://mydigitalshare.com/modules/myvideos/viewcat.php?cid=1&min=50&orderby=titleA&show=50

http://www.mufttv.com

http://movieforumz.com
http://www.irani-chai.com/movies-online/english-movies/the-matrix-revolutions-english-movie-2003.html
http://www.irani-chai.com/movies-online/telugu-movies/boys-telugu-movie-2003.html
http://bollybuz.blogspot.com/2007/09/download-saawariya-movies-songs-music.html

To Get Free WebSiteTemplate
http://www.freewebsitetemplates.com/template5.php

http://www.freelayouts.com/websites/html-templates?order=reviewed_on+desc
http://www.mastertemplates.com/download/free-template-087.htm

For Microsoft Certifications Dumps


www.mcsebraindumps.com

www.braindumps.net

www.esnips.com

www.4shared.com

www.esnips.com

www.Actualtest.com

www.testking.com



http://www.btebook.com/

http://www.toebook.com/%7B38130391-2838-4E55-B465-150EE7C2234C%7D.htm for Sharepoint

http://www.zmag.dk/showmag.php?mid=wppfp--- Microsoft Dynamics CRM book

http://www.workopia.com/Links.htm#Books--- Microsoft Dynamics CRM book


http://www.datadirect.com/developer/net/useful_links/index.ssp

Javascript link

http://www.walterzorn.com/dragdrop/dragdrop_e.htm#download