It operates on collections of items, for instance arrays or other built-in list types. It does not use an integer index. Instead, it is used on a collection and returns each element in order. In the foreach-statement, you do not need to specify the loop bounds minimum or maximum. It traverse whole collection.

General Syntax:

foreach( Datatype item in items )
{
Statement;
}

Example: To add the number from 1 to 10 by using foreach loop and sum the number by series of 1+2+3+...+10.

Both the concepts are same only. For each is used for traversing items in a collection. It usually maintain no explicit counter and no use of index. They essentially say "do this to everything in this set", rather than "do this x times".

For loop is classified as an iteration statement. The statements in the for loop repeat continuously for a specific number of times. It as counter and integer index (ex: a[i], i represent the index value and change it by increment operation on each iteration).

Update

To Update a database entry, first retrieve the item and edit it directly in the object model. After you have modified the object, call SubmitChanges on the DataContext to update the database.

The following example, Let retrieve a Student detail from tbl_Student table who are all from Location Pondy. Then change Location = “Pondy” to “Puducherry”. Finally SubmitChanges is called to send the changes to database.

Tuesday, July 9, 2013

Language-Integrated Query (LINQ) is a set of features introduced in Visual Studio 2008 that extends powerful query capabilities to the language syntax of C# and Visual Basic. LINQ introduces standard, easily-learned patterns for querying and updating data, and the technology can be extended to support potentially any kind of data store. Visual Studio includes LINQ provider assemblies that enable the use of LINQ with .NET Framework collections, SQL Server databases, ADO.NET Datasets, and XML documents.

LINQ Providers:

LINQ to SQL

LINQ to XML

LINQ to Dataset

LINQ to Objects

LINQ to SQL:

LINQ to SQL is a component of .NET Framework version 3.5 that provides a run-time infrastructure for managing relational data as objects. In LINQ to SQL, the data model of a relational database is mapped to an object model expressed in the programming language of the developer. When the application runs, LINQ to SQL translates into SQL the language-integrated queries in the object model and sends them to the database for execution. When the database returns the results, LINQ to SQL translates them back to objects that you can work with in your own programming language.

By using LINQ to SQL, you can use the LINQ technology to access SQL databases just as you would access an in-memory collection.

Step 1: The Below picture will explain how to add LINQ to SQL in your project

Open Visual Studio and goto New Project and select the Windows Form Application.

In Solution Explorer, right click the application name -> Add -> New item.

Step 2: After open the "Add New Item Wizard" select the LINQ to SQL classes file in Data Category.

Step 3: The Object Relational Designer allows you to visualize data classes in your code. By click Server Explorer to add the table.

Step 4: Connect Database using Server Explorer at Right side or click the link enable text.

Step 5: Connect to Database using Server Explorer.

1.Default DataSource is SQL Server(Sqlclient).

2.Type the server name.

3.Select authentication type based on sql server

4.Select the Database.

5.(Optional) Verify the connection using Test Connection.

6.Press OK to make a connection with database and our project.

Step 6: Drag the table from server explorer to Dataclasses file.

Step 7: Double click the Form in solution explorer and place a Datagridview control from Toolbox to form. Write the below code in Form Load event.

LINQ with SELECT Statement and without Where Clause

namespace linq_example

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

private void Form1_Load(object sender, EventArgs e)

//Create DataContext object by using LINQ file DataClasses.

{

DataClasses1DataContext db = new DataClasses1DataContext();

//Linq query using IQueryable for Select statement query.

IQueryable<tbl_Student> student =

from stud in db.tbl_Students

select stud;

//set Datasource to DataGridView for bind the data.

dataGridView1.DataSource = student;

}

}

}

The Above code used the concept of linq to sql with Select statment and bind the data into datagridview.

Monday, July 8, 2013

Several ASP.NET application services rely on a provider to manage storing and retrieving data from a data source. Each provider is specific to the data source. ASP.NET includes a SQL Server provider for the following ASP.NET features:

Membership (the SqlMembershipProvider class).

Role management (the SqlRoleProvider class).

Profile (the SqlProfileProvider class).

Web Parts personalization (the SqlPersonalizationProvider class).

Web events (the SqlWebEventProvider class).

The above features are we need to define in asp.net 'Web.config' file.

Web.config is the main settings and configuration file for an ASP.NET web application. The file is an XML document that defines configuration information regarding the web application.This file stores the information about how the web application will act. The web.config file contains information that controls module loading, security configuration, session state configuration, and application language and compilation settings. Web.config files can also contain application specific items such as database connection strings.

ASP.NET membership gives you a built-in way to validate and store user credentials. ASP.NET membership therefore helps you manage user authentication in your Web sites. You can use ASP.NET membership with ASP.NET forms authentication by using with the ASP.NET login controls to create a complete system for authenticating users.

ASP.NET role management helps you to manage authorization, allowing you to specify which resources various users in your application are allowed to access. Role management lets you treat groups of users as a unit by assigning users to roles such as manager, sales, member, and so on. The primary purpose of establishing roles is to give you an easy way to manage access rules for groups of users. You create users and then assign the users to roles (in Windows, to groups). A typical use is to then create a set of pages that you want to restrict to certain users.

The ASP.NET SQL Server registration tool (Aspnet_regsql.exe) is used to create a Microsoft SQL Server database that is used by the SQL Server providers in ASP.NET. The tool is also used to add or remove options from an existing database.

You can run Aspnet_regsql.exe without any command-line arguments to run a wizard that will walk you through specifying connection information for your SQL Server installation, and installing or removing the database elements for the membership, role management, profile, Web Parts personalization, and health monitoring features.

Simple Questions:Problem # 1:
Write a query to display the member id, member name, city and membership status who are all having life time membership. Hint: Life time membership status is “Permanent”.

Ans:select member_id,member_name,city,membership_status from LMS_MEMBERS where membership_status='permanent'Problem # 2:
Write a query to display the book code, publication, price and supplier name of the book witch is taken frequently.

Ans: SELECT b1.book_code,b2.publication,b2.price,b3.supplier_name FROM(SELECT b1.book_code FROM LMS_BOOK_ISSUE b1 GROUP BY book_code HAVING COUNT(b1.BOOK_CODE) > 1) b1 JOIN LMS_BOOK_DETAILS b2 ON b1.book_code = b2.book_code JOIN LMS_SUPPLIERS_DETAILS b3 ON b2.supplier_id = b3.supplier_id Problem # 3:
Write a query to display the member id, member name who have taken the book with book code 'BL000002'.

Ans: select b1. member_id,b1.member_name,b2.book_code from LMS_MEMBERS b1,LMS_BOOK_ISSUE b2 where b2.BOOK_CODE='BL000002'Problem # 4:
Write a query to display the book code, book title and author of the books whose author name begins with 'P'.

Ans:select book_code,book_title,author from LMS_BOOK_DETAILS where AUTHOR like 'P%'Problem # 5:
Write a query to display the total number of Java books available in library with alias name ‘NO_OF_BOOKS’.

Ans:select COUNT(category)as NO_OF_BOOKS from LMS_BOOK_DETAILS where CATEGORY='JAVA'Problem # 6:
Write a query to list the category and number of books in each category with alias name ‘NO_OF_BOOKS’.

Ans:select category,COUNT(category)as NO_OF_BOOKS from LMS_BOOK_DETAILS group by CATEGORYProblem # 7:
Write a query to display the number of books published by "Prentice Hall” with the alias name “NO_OF_BOOKS”.

Ans:select COUNT(publication) as NO_OF_BOOKS from LMS_BOOK_DETAILS where PUBLICATION='Prentice Hall'Problem # 8:
Write a query to display the book code, book title of the books which are issued on the date "1st April 2012".

Ans(without issue_date):select b1.book_code,b2.book_title from LMS_BOOK_ISSUE b1 inner join LMS_BOOK_DETAILS b2 on b1.BOOK_CODE=b2.BOOK_CODE where b1.DATE_ISSUE='2012-04-01'Ans(with issue date): select b1.book_code,b1.DATE_ISSUE,b2.book_title from LMS_BOOK_ISSUE b1 inner join LMS_BOOK_DETAILS b2 on b1.BOOK_CODE=b2.BOOK_CODE where b1.DATE_ISSUE='2012-04-01'Problem # 9:
Write a query to display the member id, member name, date of registration and expiry date of the members whose membership expiry date is before APR 2013. Ans:select member_id,member_name,DATE_REGISTER,DATE_EXPIRE from LMS_MEMBERS where DATE_EXPIRE < '2013-04-01' Problem # 10:
write a query to display the member id, member name, date of registration, membership status of the members who registered before "March 2012" and membership status is "Temporary"

Problem #11:
Write a query to display the member id, member name who’s City is CHENNAI or DELHI. Hint: Display the member name in title case with alias name 'Name'.

Ans:select member_id,member_name as 'Name' from LMS_MEMBERS where CITY='chennai' or CITY='delhi'

Problem #12:
Write a query to concatenate book title, author and display in the following format. Book_Title_is_written_by_AuthorExample: Let Us C_is_written_by_Yashavant Kanetkar Hint: display unique books. Use “BOOK_WRITTEN_BY” as alias name.

Problem #13:
Write a query to display the average price of books which is belonging to ‘JAVA’ category with alias name “AVERAGEPRICE”.

Ans:select AVG(price) as 'AVERAGEPRICE' from LMS_BOOK_DETAILS where CATEGORY='java'Problem #14:
Write a query to display the supplier id, supplier name and email of the suppliers who are all having gmail account.

Ans:select supplier_id,SUPPLIER_NAME,EMAIL from LMS_SUPPLIERS_DETAILS where EMAIL like '%gmail.com'Problem#15:
Write a query to display the supplier id, supplier name and contact details. Contact details can be either phone number or email or address with alias name “CONTACTDETAILS”. If phone number is null then display email, even if email also null then display the address of the supplier. Hint: Use Coalesce function.

ANS:select Supplier_id,supplier_name,coalesce(contact,email,address) as contactdetails from Lms_suppliers_detailsProblem#16:
Write a query to display the supplier id, supplier name and contact. If phone number is null then display ‘No’ else display ‘Yes’ with alias name “PHONENUMAVAILABLE”. Hint: Use ISNULL.

ANS:select SUPPLIER_ID,SUPPLIER_NAME,case when CONTACT is NULL then 'NO' when CONTACT is not null then 'YES' end as PHONE_NUM_AVAILABLE from LMS_SUPPLIERS_DETAILSProblem#17:
Write a query to display the member id, member name, city and member status of members with the total fine paid by them with alias name “Fine”.

Average Questions:Problem # 1:
Write a query to display the member id, member name of the members, book code and book title of the books taken by them.

ANS: select MEMBER_ID,(select MEMBER_NAME from LMS_MEMBERS where MEMBER_ID=t1.MEMBER_ID )as MEMBER_NAME,BOOK_CODE,(select BOOK_TITLE from LMS_BOOK_DETAILS where BOOK_CODE=t1.BOOK_CODE)as BOOK_TITLE from LMS_BOOK_ISSUE t1Problem # 2:
Write a query to display the total number of books available in the library with alias name “NO_OF_BOOKS_AVAILABLE” (Which is not issued). Hint: The issued books details are available in the LMS_BOOK_ISSUE table.

ANS: SELECT COUNT(t1.BOOK_CODE)AS NO_OF_BOOKS_AVAILABLE FROM LMS_BOOK_DETAILS t1 LEFT JOIN LMS_BOOK_ISSUE t2 ON t1.BOOK_CODE = t2.BOOK_CODE WHERE t2.BOOK_CODE IS NULLProblem # 3:
Write a query to display the member id, member name, fine range and fine amount of the members whose fine amount is less than 100.

ANS:SELECT T1.MEMBER_ID,(SELECT MEMBER_NAME FROM LMS_MEMBERS WHERE MEMBER_ID=T1.MEMBER_ID)AS MEMBER_NAME,(SELECT T2.FINE_RANGE FROM LMS_MEMBERS WHERE MEMBER_ID=T1.MEMBER_ID)AS FINE_RANGE,(SELECT FINE_AMOUNT FROM LMS_FINE_DETAILS T2 WHERE FINE_RANGE= T1.FINE_RANGE)AS FINE_AMOUNT FROM LMS_BOOK_ISSUE T1 LEFT JOIN LMS_FINE_DETAILS T2 ON T1.FINE_RANGE = T2.FINE_RANGE WHERE T2.FINE_AMOUNT < 100Problem # 4:
Write a query to display the book code, book title, publisher, edition, price and year of publication and sort based on year of publication, publisher and edition.

ANS:SELECT BOOK_CODE,BOOK_TITLE,PUBLICATION,BOOK_EDITION,PRICE,YEAR(PUBLISH_DATE) AS YEAR_OF_PUBLICATION FROM LMS_BOOK_DETAILS ORDER BY YEAR_OF_PUBLICATIONProblem # 5:
Write a query to display the book code, book title and rack number of the books which are placed in rack 'A1' and sort by book title in ascending order. ANS:SELECT BOOK_CODE,BOOK_TITLE,RACK_NUM FROM LMS_BOOK_DETAILS where RACK_NUM='A1' ORDER BY BOOK_TITLE ASCProblem # 6:
Write a query to display the member id, member name, due date and date returned of the members who has returned the books after the due date. Hint: Date_return is due date and Date_returned is actual book return date. ANS:SELECT MEMBER_ID,(SELECT MEMBER_NAME FROM LMS_MEMBERS WHERE MEMBER_ID=T1.MEMBER_ID)AS MEMBER_NAME,DATE_RETURN AS DUE_DATE,DATE_RETURNED FROM LMS_BOOK_ISSUE T1 WHERE DATE_RETURN < DATE_RETURNED Problem # 7:
Write a query to display the member id, member name and date of registration who have not taken any book. ANS: SELECT T1.MEMBER_ID,MEMBER_NAME,DATE_REGISTER FROM LMS_MEMBERS T1 LEFT JOIN LMS_BOOK_ISSUE T2 ON T1.MEMBER_ID = T2.MEMBER_ID WHERE T2.MEMBER_ID IS NULL

Problem # 8:
Write a Query to display the member id and member name of the members who has not paid any fine in the year 2012. ANS:Using Sub Query:select t1.MEMBER_ID,(select t2.MEMBER_NAME from LMS_MEMBERS t2 where t1.MEMBER_ID=t2.MEMBER_ID)as MEMBER_NAME from LMS_BOOK_ISSUE t1 where t1.DATE_RETURN >=t1.DATE_RETURNED and year(t1.DATE_RETURNED)=2012
(or) Using Join:select t1.MEMBER_ID,t2.MEMBER_NAME from LMS_BOOK_ISSUE t1 join LMS_MEMBERS t2 on t1.MEMBER_ID=t2.MEMBER_ID where t1.DATE_RETURN>=t1.DATE_RETURNED and YEAR(t1.DATE_RETURNED)=2012Problem # 9:
Write a query to display the date on which the maximum numbers of books were issued and the number of books issued with alias name “NOOFBOOKS”. ANS:select DATE_ISSUE,count(DATE_ISSUE) as NO_OF_BOOKS from LMS_BOOK_ISSUE group by DATE_ISSUE having COUNT(DATE_ISSUE)=(select MAX(counted) from (select COUNT(DATE_ISSUE) as counted from LMS_BOOK_ISSUE group by DATE_ISSUE) as t)Problem # 10:
Write a query to list the book title and supplier id for the books authored by “Herbert Schildt" and the book edition is 5 and supplied by supplier ‘S01’. ANS:select BOOK_TITLE,SUPPLIER_ID from LMS_BOOK_DETAILS where AUTHOR='Herbert Schildt' and BOOK_EDITION='5' and SUPPLIER_ID='S01'Problem # 11:
Write a query to display the rack number and the number of books in each rack with alias name “NOOFBOOKS” and sort by rack number in ascending order. ANS:select RACK_NUM,COUNT(book_code) as NO_OF_BOOKS from LMS_BOOK_DETAILS group by RACK_NUMProblem # 12:
Write a query to display book issue number, member name, date or registration, date of expiry, book title, category author, price, date of issue, date of return, actual returned date, fine amount. ANS:Select BOOK_ISSUE_NO,MEMBER_NAME,DATE_REGISTER,DATE_EXPIRE,BOOK_TITLE,CATEGORY, PRICE, DATE_ISSUE,DATE_RETURN,DATE_RETURNED,(select FINE_AMOUNT from LMS_FINE_DETAILS f where i.FINE_RANGE= f.FINE_RANGE)as FINE_AMOUNT from LMS_BOOK_ISSUE i,LMS_MEMBERS m,LMS_BOOK_DETAILS b where i.MEMBER_ID=m.MEMBER_ID and b.BOOK_CODE=i.BOOK_CODE Problem # 13:
Write a query to display the book code, title, publish date of the books which is been published in the month of
December. ANS:select BOOK_CODE,BOOK_TITLE,PUBLISH_DATE from LMS_BOOK_DETAILS where MONTH(PUBLISH_DATE)='12'Problem # 14:
Write a query to display the book code, book title ,supplier name and price of the book witch takes maximum price based on each supplier. ANS:select BOOK_CODE,BOOK_TITLE,SUPPLIER_NAME,PRICE from LMS_BOOK_DETAILS b inner join LMS_SUPPLIERS_DETAILS s on b.SUPPLIER_ID=s.SUPPLIER_ID where b.PRICE=(select MAX(PRICE) from LMS_BOOK_DETAILS k where b.SUPPLIER_ID=k.SUPPLIER_ID)Problem # 15:
Write a query to display book code, book name, and publisher, how old the book is. Sorted as older to newer.ANS:select BOOK_CODE,BOOK_TITLE,PUBLICATION,YEAR(GETDATE())-YEAR(DATE_ARRIVAL)as YEARS from LMS_BOOK_DETAILS order by YEARS desc

Complex Questions:Problem # 1:
Write a query to display the book code, book title and supplier name of the supplier who has supplied maximum number of books. For example, if “ABC Store” supplied 3 books, “LM Store” has supplied 2 books and “XYZ Store” has supplied 1 book. So “ABC Store” has supplied maximum number of books, hence display the details as mentioned below. Example:BOOK_CODE BOOK_TITLE SUPPLIER_NAME
BL000008 Easy Reference for Java ABC STORE
BL000001 Easy Reference for C ABC STORE
BL000003 Easy Reference for VB ABC STORE ANS:select BOOK_CODE,BOOK_TITLE,SUPPLIER_NAME from LMS_BOOK_DETAILS B inner join LMS_SUPPLIERS_DETAILS S on B.SUPPLIER_ID = S.SUPPLIER_ID where S.SUPPLIER_ID in (select SUPPLIER_ID from LMS_BOOK_DETAILS group by SUPPLIER_ID having COUNT(SUPPLIER_ID)=(select MAX(cnt) from (select COUNT(*) as cnt from LMS_BOOK_DETAILS group by SUPPLIER_ID)as T))

Problem # 2:
Write a query to display the member id, member name and number of remaining books he/she can take with “REMAININGBOOKS” as alias name. Hint: Assuming a member can take maximum 3 books. For example, Ramesh has already taken 2 books; he can take only one book now. Hence display the remaining books as 1 in below format. Example: MEMBER_ID MEMBER_NAME REMAININGBOOKS
LM001 RAMESH 1
LM002 MOHAN 3 ANS:select m.MEMBER_ID,MEMBER_NAME,T.cb as REMAINING_BOOKS from LMS_MEMBERS m inner join (select a.member_id,COUNT(i.MEMBER_ID) as cb from LMS_MEMBERS a left outer join LMS_BOOK_ISSUE i on a.MEMBER_ID= i.MEMBER_ID group by a.MEMBER_ID)T on T.MEMBER_ID=m.MEMBER_IDProblem # 3
Write a query to display the supplier id and supplier name of the supplier who has supplied minimum number of books. For example, if “ABC Store” supplied 3 books, “LM Store” has supplied 2 books and “XYZ Store” has supplied 1 book. So “XYZ Store” has supplied minimum number of books, hence display the details as mentioned below. Example:SUPPLIER_ID SUPPLIER_NAME
S04 XYZ STORE ANS:select S.SUPPLIER_ID,SUPPLIER_NAME from LMS_BOOK_DETAILS B inner join LMS_SUPPLIERS_DETAILS S on B.SUPPLIER_ID = S.SUPPLIER_ID where S.SUPPLIER_ID in (select SUPPLIER_ID from LMS_BOOK_DETAILS group by SUPPLIER_ID having COUNT(SUPPLIER_ID)=(select MIN(cnt) from (select COUNT(*) as cnt from LMS_BOOK_DETAILS group by SUPPLIER_ID)as T))

Wednesday, June 26, 2013

The .NET Framework is a software framework developed by Microsoft that runs primarily on Microsoft Windows. It includes a large library and provides language interoperability (each language can use code written in other languages) across several programming languages. Programs written for the .NET Framework execute in a software environment, known as the Common Language Runtime (CLR), an application virtual machine that provides services such as security, memory management, and exception handling. The class library and the CLR together constitute the .NET Framework.

The .NET Framework's Base Class Library provides user interface, data access, database connectivity, cryptography, web application development, numeric algorithms, and network communications. Programmers produce software by combining their own source code with the .NET Framework and other libraries. The .NET Framework is intended to be used by most new applications created for the Windows platform. Microsoft also produces an integrated development environment largely for .NET software called Visual Studio.

CLR – Common Language Runtime

The .NET framework provides a run-time environment called the Common Language Runtime, which runs the code & provides services that make the development process easier.

Compilers and tools expose the common language runtime's functionality and enable you to write code that benefits from this managed execution environment. Code that you develop with a language compiler that targets the runtime is called managed code; it benefits from features such as cross-language integration, cross-language exception handling, enhanced security, versioning and deployment support, a simplified model for component interaction, and debugging and profiling services.

The common language runtime makes it easy to design components and applications whose objects interact across languages. Objects written in different languages can communicate with each other, and their behaviors can be tightly integrated.

Features:1. The common language runtime manages memory, thread execution, code execution, code safety verification, compilation, and other system services. 2. The runtime enforces code access security. 3. The runtime also enforces code robustness by implementing a strict type-and-code-verification infrastructure called the common type system (CTS). 4. The runtime can be hosted by high-performance, server-side applications, such as Microsoft SQL Server and Internet Information Services (IIS).

.NET Framework Class Library

The .NET Framework class library is a collection of reusable types that tightly integrate with the common language runtime. The class library is object oriented, providing types from which your own managed code can derive functionality. This not only makes the .NET Framework types easy to use, but also reduces the time associated with learning new features of the .NET Framework. In addition, third-party components can integrate seamlessly with classes in the .NET Framework.

The .NET Framework types enable you to accomplish a range of common programming tasks, including tasks such as string management, data collection, database connectivity, and file access. In addition to these common tasks, the class library includes types that support a variety of specialized development scenarios. For example, you can use the .NET Framework to develop the following types of applications and services:

The .NET Framework is a development platform for building apps for Windows, Windows Phone, Windows Server, and Windows Azure. It consists of the common language runtime (CLR) and the .NET Framework class library, which includes classes, interfaces, and value types that support an extensive range of technologies. The .NET Framework provides a managed execution environment, simplified development and deployment, and integration with a variety of programming languages, including Visual Basic and Visual C#.

The following are the new features and improvements in the following areas of the .NET Framework 4.5.

.NET for Windows Store Apps

Portable Class Libraries

Core New Features and Improvements

Tools

.NET Framework 4

The .NET Framework is an application development platform that provides services for building, deploying, and running desktop, web, and phone applications and web services. It consists of the common language runtime (CLR), which provides memory management and other system services, and an extensive class library, which includes tested, reusable code for all major areas of application development.

The following are the new features and improvements in the following areas of the .NET Framework 4.

Application Compatibility and Deployment

Core New Features and Improvements

Managed Extensibility Framework

Parallel Computing

Web

Client

Data

.NET Framework 3.5

The .NET Framework is a technology that supports building and running the next generation of applications and Web services. The .NET Framework consists of the common language runtime (CLR) and the .NET Framework class library, which includes ADO.NET, ASP.NET, Windows Forms, and Windows Presentation Foundation (WPF). The .NET Framework provides a managed execution environment, simplified development and deployment, and integration with a wide variety of programming languages.

The following are the new features and improvements in the following areas of the .NET Framework 3.5.

.NET Compact Framework

.NET Framework Client Profile

Click Once

Common Language Runtime(CLR)

Cryptography

Networking

Windows Forms

LINQ

.NET Framework 3.0

The .NET Framework version 3.0 was issued solely to include the following technologies in the .NET Framework and in the Windows Software Development Kit (SDK):

Windows Communication Foundation (WCF)

Windows Presentation Foundation (WPF)

Windows Workflow Foundation (WWF)

Windows CardSpace

.NET Framework 2.0

The Microsoft .NET Framework version 2.0 extends the .NET Framework version 1.1 with new features, improvements to existing features, and enhancements to the documentation. This section provides information about some key additions and modifications.

The following are the new features and improvements in the following areas of the .NET Framework 2.

Tuesday, June 18, 2013

This is a easy way to explore the items from database.In this Program 3 Modules having:

module 1: Select all database name and load into combo box.module 2: Select all Table name from particular database and load into list box. module 3: Select all the column name from particular table and load into list box.

Abstraction is one of the principle of object oriented programming. It is used to display only necessary and essential features of an object to ouside the world.Means displaying what is necessary and encapsulate the unnecessary things to outside the world.Hiding can be achieved by using "private" access modifiers.Note - Outside the world means when we use reference of object then it will show only necessary methods and properties and hide methods which are not necessary.

Advantages of abstraction are the hiding of implementation details, component reuse, extensibility, and testability. When we hide implementation details, we reveal a cleaner, more comprehensible and usable interface to our users. We are separating our interface from our implementation, and this makes component reuse more practical. Many, if not all of the object-oriented concepts we have discussed throughout this document play a role in the abstraction principle. Working together, their end goal is the same, to produce software that is flexible, testable, maintainable, and extensible.

5.Data Encapsulation:

Encapsulation, in the context of C#, refers to an object's ability to hide data and behavior that are not necessary to its user.

Encapsulation enables a group of properties, methods and other members to be considered a single unit or object.