Saturday, March 08, 2014

Create Windows admin user from command line

Here is how we can create windows user from command prompt.
c:\net user /add [username] [password]
The above will creates the user account.

To add the user account to administrators group. Need to do like this below
c:\net localgroup administrators [username] /add

Hope this helps!

Guide to Resetting a Windows 7 Password

Every one has tendency to forget passwords. I am one of them. Here is the nice tutorial to reset windows 7 password which helped me. Its very helpful and nice tutorial. Author has done very good job for compiling this.

Hope this helps to you as well.

Wednesday, February 12, 2014

Delete a table data using JOINS in SQL Server

Here is how we can delete using JOINS. I have used inner join here.

DELETE
Table1
FROM
Table1 INNER JOIN Table2
ON Table1.Field2 = Table2.Field2
WHERE -- YOUR WHERE CONDITIONS
Table2.Field3 IS NOT NULL


Hope this helps

Update a table using JOINS in SQL Server

Here is how we can update a table using JOINS in SQL SERVER.

UPDATE
Table1
SET
Table1.Field1 = Table2.Field1
FROM
Table1
INNER JOIN Table2 ON Table1.Field2 = Table2.Field2
WHERE -- YOUR WHERE CONDITIONS
Table2.Field3 IS NOT NULL


Hope this helps

Friday, January 10, 2014

How to hide all Validators from JavaScript in .NET?

Here is how you can hide all validator messages from below JavaScript.  

function HideValidators() {
if (window.Page_Validators)
for (var vI = 0; vI < Page_Validators.length; vI++) {
var vValidator = Page_Validators[vI];
vValidator.isvalid = true;
ValidatorUpdateDisplay(vValidator);
}
}