Tuesday, June 30, 2009

Visual Studio Selection Modes

Microsoft product, Visual studio Editor provides the 2 types selection modes, which are stream and Box mode.

Everybody knows very well about
Stream Mode selection, you can use Shift + Arrow key or use mouse selection to do this selection, which is resembles as given below,

Other mode is box mode selection, to do this, use the Shift + Alt + Arrow Key or use Alt + Mouse left button, this selection resembles as given below


Sunday, June 28, 2009

Connect SQL Server by using IP Address:

Usually we will connect our SQL Server database by its Instance name or (local) or. (Dot), thru SQL Server management studio. There is another way to connect the DB in client tool, by IP Address. If you install the SQL Enterprise edition, this option is enabled default installation, but if you install other edition like enterprise or express, it is not default one.

You can enable IP access by following steps.

Start --> All Programs --> Microsoft SQL Server --> Configuration Tools --> SQL Server Configuration Manager

This will open “SQL Server Configuration Manager” window, here Expand “SQL Server Network Configuration”, then select proper instance “Protocols for
”, now list of protocols will appear on right pane of the window, as exhibit here,


Double click on the “TCP/IP” Protocol from the list, then property window will appear with 2 tabs, “protocol” and “IP Addresses”. In Protocol Tab, Set Enabled as Yes.


In IP Addresses Tab, set Active to “Yes”, Enabled to “Yes”

After set the property, click on the “Apply” button then Click “ok” button to exit the window. Now you need restart the SQL Server Services to update the changes.

After you restarted the services, you can connect the Database by your system IP Address.

Hope it Helps!

Saturday, June 27, 2009

Microsoft Code Analysis Tool .NET (CAT.NET) v1 CTP - 32 bit

CAT.NET is a binary code analysis tool that helps identify common variants of certain prevailing vulnerabilities that can give rise to common attack vectors such as Cross-Site Scripting (XSS), SQL Injection and XPath Injection.

CAT.NET is a snap-in to the Visual Studio IDE that helps you identify security flaws within a managed code (C#, Visual Basic .NET, J#) application you are developing. It does so by scanning the binary and/or assembly of the application, and tracing the data flow among its statements, methods, and assemblies. This includes indirect data types such as property assignments and instance tainting operations. The engine works by reading the target assembly and all reference assemblies used in the application -- module-by-module -- and then analyzing all of the methods contained within each. It finally displays the issues its finds in a list that you can use to jump directly to the places in your application's source code where those issues were found. The following rules are currently support by this version of the tool. - Cross Site Scripting - SQL Injection - Process Command Injection - File Canonicalization - Exception Information - LDAP Injection - XPATH Injection - Redirection to User Controlled Site

Download CATNETx32.msi

Microsoft Code Analysis Tool .NET (CAT.NET) v1 CTP - 64 bit


CAT.NET is a binary code analysis tool that helps identify common variants of certain prevailing vulnerabilities that can give rise to common attack vectors such as Cross-Site Scripting (XSS), SQL Injection and XPath Injection.

CAT.NET is command line tool that helps you identify security flaws within a managed code (C#, Visual Basic .NET, J#) application you are developing. It does so by scanning the binary and/or assembly of the application, and tracing the data flow among its statements, methods, and assemblies. This includes indirect data types such as property assignments and instance tainting operations. The engine works by reading the target assembly and all reference assemblies used in the application -- module-by-module -- and then analyzing all of the methods contained within each. It finally displays the issues its finds in a list that you can use to jump directly to the places in your application's source code where those issues were found. The following rules are currently support by this version of the tool. - Cross Site Scripting - SQL Injection - Process Command Injection - File Canonicalization - Exception Information - LDAP Injection - XPATH Injection - Redirection to User Controlled Site

Download CATNETx64CTP.exe

Friday, June 26, 2009

Environment Layout Options in SQL Server Management Studio

SQL Server 2005 or later version provides option to organize the appearance of opened SQL windows in 2 ways. One is Tab Document Format and other one is MDI environment Format.

You can set this Format by,

In SQL Server Management Studio,

Tools à Options à Environment à General à Environment Layout à Select Option you Desire Here, Either MDI (Multiple Document Interface) or Tab.

See the screenshot


If you use MDI environment, you can see only one window at time. If more than one window is opened, you can activate other window by using Ctrl + Tab keys.

Here I opened many query windows, due to MDI Options, it will shows one will be active, as shown in the screen shot.


If you use Tab Document, you can see Multiple Tabs on the Query windows, you can switch over any window by Ctrl + Tab keys or Click on the Tab


Hope it helps to someone.

Visual studio 2008 or SQL 2008 Express Edition - Download



Dear friends,

If you want to learn or getting started with Visual studio 2008 or SQL 2008, this link will be helpful to you.

Microsoft used to introduce Express Edition for all new versions of SQL and VS.

To get started today, select an Express Edition product from,

Download Microsoft Express Edition.

You should run Windows Update to ensure your computer is up-to-date before you install any Express Edition. Remember, Express Editions are not the complete Visual Studio product, but are tools designed for students and hobbyists.

Hope it helps!

Have a great day!

Wednesday, June 24, 2009

Microsoft Axum


Brief Description
A .NET language for safe, scalable and productive parallel programming through isolation, actors and message-passing.

Overview
Installers: Axum is an incubation project from Microsofts Parallel Computing Platform that aims to validate a safe and productive parallel programming model for the .NET framework. Its a language that builds upon the architecture of the web and the principles of isolation, actors, and message-passing to increase application safety, responsiveness, scalability and developer productivity. Other advanced concepts we are exploring are data flow networks, asynchronous methods, and type annotations for taming side-effects. Axum Lite: Contains the Axum command-line compiler and Axum runtime as well as the sample projects. Programmer's Guide: Use this simple and easy to follow programmer's guide to learn how to create safe, scalable, and responsive applications with the Axum language. Language Specification: A detailed specification of the Axum language.

Download Microsoft Axum

JavaScript - Regular Expressions for Validate 24 Hrs Time

One of my friend requested me a code of Javascript to validate the time, which is in the format of 00:00 (24 hrs). i written this code. it may useful to someone, so that i posted in this blog

function Validate24Hrs(Time_Field) {

RegEx = "\([0-2][0-9]):([0-5][0-9])$";

Err_Msg = "";

if (Time_Field.value != "")

{

if (Regs = Time_Field.value.match(RegEx)) {

if ((Regs[1] > 23)) {

Err_Msg = 'Not Matching';

}

}

else {

Err_Msg = 'Not Matching';

}

}

if (Err_Msg != "") {

alert(Err_Msg);

Time_Field.focus();

return false;

}

else {

alert('Matching');

return true;

}

}


if it is useful or face any problem, please leave ur valuable comments here.

Have a Great Day!

Tuesday, June 23, 2009

SQL Server 2005 - Report Builder

You can download "Microsoft SQL Server 2008 Reporting Services Report Builder" 2.0 from the link, which i provided on my previous post.

The original Report Builder that was released with SQL Server 2005 is still available. When you open the Report Manager, you will still see the Report Builder button as shown below (assuming you are a member of the Report Builder role in SSRS).


Microsoft SQL Server 2008 Reporting Services Report Builder 2.0

SQL Server 2008 includes a brand new version of the Report Builder which was first introduced in SQL Server 2005. The key new features in Report Builder 2.0 are:

  • A completely new user interface that conforms to the Office 2007 look and feel

  • A local client install rather than a click-once application that you download and install from Report manager

  • Supports running reports locally or on the server

  • A Report Model is not required; you can create your own queries using a query designer, import queries from existing reports, or manually type in your queries

  • A Tablix report type which is a combination of the matrix and table reports

Report Builder 2.0 is not included on the SQL Server 2008 media. Instead you can download it from
Microsoft SQL Server 2008 Reporting Services Report Builder 2.0

.NET Rocks! - David Hayden on the Unity Framework

Brief Description
David Hayden talks to Carl and Richard about the Microsoft Unity Framework

Overview
David Hayden is an independent consultant in Sarasota, Florida offering consulting, mentoring, and development services on architecture and best practices in .NET. David is a Microsoft MVP in C#, speaker, MSDN Forum Moderator, Enterprise Library Community Leader, and advisor to Microsoft Patterns & Practices. He spends much of his time helping companies and development teams leverage the proven practices and productivity benefits of Enterprise Library and Software Factories. In addition to his personal blogs at DavidHayden.com and CodeBetter.com, David also runs PnPGuidance.net, which offers numerous articles, screencasts, sample downloads and other resources covering best practices in .NET.

Download 20081111DHayden.zip

Microsoft ADO.NET Entity Framework Feature Community Technology Preview 1

Brief Description
Set of features that build on top of Entity Framework 4.0 Beta 1 (included in .NET Framework 4.0 Beta 1)

Overview
This CTP is a an early preview of features that build on top of ADO.NET Entity Framework 4.0 Beta 1 (Microsoft .NET Framework 4.0 Beta 1).

The features included in this CTP are :
  1. Templates for Self-Tracking Entities (N-Tier support)
  2. Templates for POCO (Plain Old CLR Objects) Entities
  3. Code-Only Programming Model that allows you to write Entity Data Model based applications without requiring external artifacts

Refer to the
Readme and Getting Started for additional instructions.

Download EF4FeatureCTP1.exe

Monday, June 22, 2009

Hands on Lab of SQL Server 2005

Hi,

Have a look at this link.

Download Hands on Lab of SQL Server 2005

This link provides "Hands on Lab of SQL Server 2005" for the followings, and it is a downloadble document.

  1. Data Transformation Services (DTS) Hands-On Lab Manual
  2. Reporting Services Hands-On Lab Manual
  3. Management Studio Hands-On Lab Manual
  4. XML Features Hands-On Lab Manual
  5. SQL Server 2005 and ADO.NET Hands-On Lab Manual
  6. T-SQL Enhancements Hands-On Lab Manual
  7. SQL CLR Hands-On Lab Manual
  8. SMO and Web Services Hands-On Lab Manual
  9. Analysis Services Hands-On Lab Manual
  10. Data Mining Hands-On Lab Manual
  11. Database Tuning Hands-On Lab Manual

Hope it helps you!

Top With Percent in SQL

In SQL percent keyword helps to retrieve %age of records from a table.

Have a look at this sample query, In AdventureWorks database, Sales.SalesOrderHeader contains 31465 records, in the following query we are going to retrieve almost 10% of records

USE AdventureWorks

GO

SELECT top 10 percent * FROM Sales.SalesOrderHeader

This query will return 3147 records

TOP Enhancements In SQL 2005 and Later versions

In previous versions of SQL Server, TOP operator used only to return the number of rows or a percentage in SELECT queries. In SQL Server 2005, 2008 or later versions, you can use TOP in DELETE, UPDATE, and INSERT queries and can also specify the number of rows (or percent) by using variables or any valid numeric returning expression (such as a subquery). The main reason for allowing TOP with DELETE, UPDATE, and INSERT was to replace the SET ROWCOUNT option, which SQL Server traditionally didn't optimize very well.

You can specify the TOP limit as a literal number or an expression. If you're using an expression, you must enclose it in parentheses. The expression should be of the bigint data type when you are not using the PERCENT option and a float value in the range 0 through 100 when you are using the PERCENT option.

Following Sample Query is a sample Example for delete with Top

-- Top with delete query

delete top (2) from dbo.table3

-- Top with Subquery

USE AdventureWorks

GO

SELECT TOP (SELECT COUNT(*) FROM Sales.SalesPerson)

SalesOrderID, RevisionNumber, OrderDate

FROM Sales.SalesOrderHeader

ORDER BY SalesOrderID

Sunday, June 21, 2009

PIVOT Operator in SQL

PIVOT is a new T-SQL operator that you can specify in your FROM clause to rotate rows into columns and create a traditional crosstab query.

How to use Pivot:

In your SELECT statement, you specify the values you want to pivot on. The following example using the AdventureWorks database uses the order years (calculated using the DatePart function) as the columns. The FROM clause looks normal except for the PIVOT statement. This statement creates the value you want to show in the rows of the newly created columns. This example uses the aggregate SUM of TotalDue (a calculated field in the FROM clause). Then we use the FOR operator to list the values we want to pivot on in the OrderYear column. The example is shown here:

SELECT
CustomerID,
[2001] AS Y2001,
[2002] AS Y2002,
[2003] AS Y2003,
[2004] AS Y2004
FROM
(
SELECT CustomerID, DATEPART(yyyy, OrderDate) as OrderYear, TotalDue
FROM Sales.SalesOrderHeader
)piv
PIVOT
(

SUM (TotalDue)
FOR OrderYear IN
([2001], [2002], [2003],[2004])
)
AS chld
ORDER BY CustomerID

Output:

CustomerIDY2001Y2002Y2003Y2004
140732.606772366.1284NULLNULL
2NULL15653.671512118.02754962.2705
339752.8421168393.7021219434.426551925.3549
4NULL263025.3113373484.299143525.6018
5NULL33370.690160206.999920641.1106

More Rows .....

hope This example will help you to understand about concept of pivot operator

Friday, June 19, 2009

Building Web Applications with ASP.NET 3.5 and Microsoft Visual Web Developer 2008

Refer this link,

http://www.asp.net/learn/videos/#VisualWebDeveloper

Here list of video series are available, it will help you develop a functional understanding of using Microsoft’s free IDE for web application developer (Visual Web Developer) to build ASP.NET 2.0 & 3.5 web applications. Microsoft’s Joe Stagner demonstrates not only how to use the “VWD” IDE but explains what’s happening behind the scenes and offers guidance on best practices.



have a look at this site, hope it helps everyone.

MSDN Community Distribution CD June 2009

Brief Description
MSDN Community Distribution CD Image Download

Overview
Download the Community Distribution CDs as ISO images, burn and distribute them among your friends and colleagues.
Note: Registration required for this Download