If u win u need not explain... But if u lose u should not be there to explain - Arjun Jadeja


Welcome to the .Net Emperor`s Blog

If you are a .Net developer and looking for the solutions of issues related to Asp .Net or Sql Server then this is the right place you have come to. You can search and find posts related to SEO(Search Engine Optimization), Internet Tips and Tricks, Download Free Stuffs, Yahoo, Google Updates and ASP.NET scripts, controls, tips and tutorials you look for during your daily development work. In this blog I post the articles for some very useful tips and tricks which will help you develop an application faster with minimal code.

You will find very useful and informative posts on this blog. I would like to say, if any post has helped you in your development work or you find a post which can help you in future then please leave a comment with your details.

Enjoy .Net development work and sharing the knowledge . As it is said, “Knowledge is the currency for the 21st Century”.



Hello Guys,

After Long time I am back with something new for you, Recently one of my client has asked to make code which will generate vCard.

Those who don`t know what is the vCard please read this paragraph it will gives you an idea what is the vCard.

Read More...

Hello Friends,

Recently I have got one task where one of my client asked me to find out duplicate records from on table with the combination.

So below is the query which I have wrote which will gives total no of count how many combination are same in the one table.

Please check this sql query which will save your lots of time.

SELECT YourColumn1,YourColumn2,YourColumn3, COUNT(*) TotalCount
FROM YourTable
GROUP BY YourColumn1,YourColumn2,YourColumn3
HAVING COUNT(*) > 1
ORDER BY COUNT(*) DESC

If you have any kind of question or suggestion please write on comment for this article.

Thanks for your support.

Read More...

Hello Guys,

If you want to delete all the Views and Functions from the Sql Server please run below queries,

Delete All the Views


declare @procName varchar(500)
declare cur cursor
for select [name] from sys.objects where type = 'v'
open cur

fetch next from cur into @procName
while @@fetch_status = 0
begin
exec('drop view ' + @procName)
fetch next from cur into @procName
end
close cur
deallocate cur

Read More...

Hello Guys,

If you want to delete all the tables which are in your database just run below queries.

--Delete All Keys

DECLARE @Sql NVARCHAR(500) DECLARE @Cursor CURSOR
SET @Cursor = CURSOR FAST_FORWARD FOR
SELECT DISTINCT sql = 'ALTER TABLE [' + tc2.TABLE_NAME + '] DROP [' + rc1.CONSTRAINT_NAME + ']'
FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS rc1
LEFT JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc2 ON tc2.CONSTRAINT_NAME =rc1.CONSTRAINT_NAME
OPEN @Cursor FETCH NEXT FROM @Cursor INTO @Sql
WHILE (@@FETCH_STATUS = 0)
BEGIN
Exec SP_EXECUTESQL @Sql
FETCH NEXT FROM @Cursor INTO @Sql
END
CLOSE @Cursor DEALLOCATE @Cursor
GO
EXEC sp_MSForEachTable 'DROP TABLE ?'
GO

I hope you like it enjoy all my friends.

Read More...

Hello Guys,

Here is the query which will helps to delete all the store procedures form the Microsoft Sql Server,

DECLARE @procedureName varchar(500)
DECLARE cur CURSOR
FOR SELECT [name] FROM sys.objects WHERE type = 'p'
OPEN cur

FETCH NEXT FROM cur INTO @procedureName
WHILE @@fetch_status = 0
BEGIN
EXEC('DROP PROCEDURE ' + @procedureName)
FETCH NEXT FROM cur INTO @procedureName
END
CLOSE cur
DEALLOCATE cur

If you want to tell us anything about this article or if you want to ask any thing about this article content please write your comments.

Thanks,

Arjun Jadeja

Read More...

Hello Guys and Gilrs,

Before one day ago one client came to me and asked me why our website`s email goes into the junk folder ? So I have made few search on the internet and here is the some steps to prevent your emails to convert into the spam.

Read More...