Knowledge Base Category: Development

How to activate the administrator account in windows?

Go to start > run in previous versions of windows and type cmd then press [Enter] On Windows 7 just go to the Search Bar and type cmd then press [Enter] start
In the Black screen type   [tp no_translate="y"]
Net user administrator /active:yes
Read more

How to encrypt and decrypt

Sample code to Encrypt and Decrypt: Create a Sample WebSite  On the ASPX page place the following tags [tp no_translate="y"]
<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
        Enter Text:<asp:TextBox ID="txtencoded" runat="server" Height="53px" TextMode="MultiLine" Width="531px"></asp:TextBox>
Read more

SQL Complex Pivot

This is a sample for a complex pivot [tp no_translate="y"]
Declare @Employees table(id int,name varchar(40))
Insert Into @Employees 
Values (10,'John')
Insert Into @Employees 
Values (20,'Luis')
Insert Into @Employees 
Values (30,'Sebastian')
Insert Into @Employees 
Values (40,'Richard')
Insert Into @Employees 
Values (50,'Gonzalo')
Insert Into @Employees 
Values (60,'Leo')

Declare @MonthlySales Table(id int identity (1,1),empid int,totalsales int,salesdate datetime)
Insert into @MonthlySales
Insert into @MonthlySales
Insert into @MonthlySales
Insert into @MonthlySales
Insert into... 						
Read more

How to find a String in a Store Procedure?

The following code finds a string thru all store procedures
[tp no_translate="y"]
select from sys.procedures p join 
syscomments c ON
where text like '%TABLENAME%'
To search for a column name in a table use the following:
 Select as tablename,c.* from sys.columns c 
 Join sys.tables t on c.object_id=t.object_id
 where = 'Note'
[/tp]  ...
Read more