Wednesday, September 19, 2012

Place your C# Application in system tray

Hi All,

Here is the link to Put your C# application in a system tray.

Monday, September 17, 2012

Sql Scripts - Delete all Tables, Procedures, Views and Functions

In a shared environment you typically don't have access to delete your database, and recreate it for fresh installs of your product.

I managed to find these scripts which should help you clean out your database.

Use at your own risk.


Delete All Tables

--Delete All KeysDECLARE @Sql NVARCHAR(500) DECLARE @Cursor CURSORSET @Cursor = CURSOR FAST_FORWARD FORSELECT DISTINCT sql = 'ALTER TABLE [' + tc2.TABLE_NAME + '] DROP [' + rc1.CONSTRAINT_NAME + ']'FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS rc1LEFT JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc2 ON tc2.CONSTRAINT_NAME =rc1.CONSTRAINT_NAMEOPEN @Cursor FETCH NEXT FROM @Cursor INTO @SqlWHILE (@@FETCH_STATUS = 0)BEGINExec SP_EXECUTESQL @SqlFETCH NEXT FROM @Cursor INTO @SqlENDCLOSE @Cursor DEALLOCATE @CursorGOEXEC sp_MSForEachTable 'DROP TABLE ?'GO

Delete All Stored Procedures

declare @procName varchar(500)declare cur cursor for select [name] from sys.objects where type = 'p'open curfetch next from cur into @procName while @@fetch_status = 0 begin if @procName <> 'DeleteAllProcedures' exec('drop procedure ' + @procName) fetch next from cur into @procName endclose curdeallocate cur

Delete All Views


declare @procName varchar(500)declare cur cursor for select [name] from sys.objects where type = 'v'open curfetch next from cur into @procName while @@fetch_status = 0 begin exec('drop view ' + @procName) fetch next from cur into @procName endclose curdeallocate cur


Delete All Functions


declare @procName varchar(500)declare cur cursor for select [name] from sys.objects where type = 'fn'open curfetch next from cur into @procName while @@fetch_status = 0 begin exec('drop function ' + @procName) fetch next from cur into @procName endclose curdeallocate cur

Tuesday, September 11, 2012

Monday, September 10, 2012

.Net Nuke

.NET Nuke

DotNetNuke is an open-source web application framework written in VB.NET for the ASP.NET framework. The application's content management system is extensible and customizable through the use of skins and modules, and it can be used to create, deploy, and manage intranet, extranet, and websites

DotNetNuke has a skinning architecture which provides a clear separation between design and content, enabling a web designer to develop skins without requiring any specialist knowledge of development in ASP.NET—only knowledge of HTML and an understanding of how to prepare and package the skins themselves is required.