You are on page 1of 61

GYAN VIHAR SCHOOL OF

ENGINEERING & TECHNOLOGY

Practical Training

Report On

CCOM SERVICES
(From May 16 To June 30, 2009)

Submitted in partial fulfillment


For the award of degree of Bachelor
of technology (Computer Sciences)
by RTU

SUBMITTED TO SUBMITTED BY

MR. NAVEEN HEMRAJANI MANISH KUMAR SHARMA


H.O.D. (C.S) B.Tech. 4th YEAR(C.S)
GVSET, JAIPUR ( VII SEMESTER)
GYAN VIHAR SCHOOL OF ENGG. & TECH.
JAIPUR

CERTIFICATE OF SUMMER TRAINING MAY-JUNE 2009

Certified to Ms. DIVYANSHA SHARMA, student of B.tech. IVyear


(VII SEM.), Computer Science has submitted his report on Practical
Training after successful completion of summer practical training at
CCOM SERVICES from 16th May 2009 to 30th June 2009. In
practical fulfillment of the period of the training prescribed in the
syllabus of University of Rajasthan for B.Tech examination.

Head Of Department
Mr. Naveen Hemrajani
C.S. Department
ACKNOWLEDGEMENT

“To Train Is Costly But Not To Train Is Not Costlier” These


immortal words of “Pt. Jawaharlal Nehru” have a very significant and
deep meaning which is fathomed only after one month training at
“CCOM SERVICES”.

I take consideration to place our record on appreciation of the


courtesy and consideration intended ton us during the course of
program. First of all, our felt gratitude goes to Mr. CHIRAC SHAH
Director of CCOM SERVICES for his invaluable assistance during
the training .

We thank them for their valuable guidance and encouragement


throughout the progress of work.

The satisfaction that accompanies the successful completion of


any task would be incomplete without the mention of those people
who directly or indirectly ceaseless cooperation, whose constant
guidance & encouragement crown all the effort with success.
PREFACE

Practical Training is a way to implement theoretical knowledge to


practical use to become an engineer. It is necessary to have a sound
practical knowledge to become a successful engineer. It is a proven
fact that brackish knowledge is not sufficient because the thing is not
ideal in practical field as they should be.

Internet is a way to gather the information about anything in the


world. By making website of any institution, we can present it in front
of people in much better way. Internet covers a vast area of network
and thus helps in educating people and to update them by latest
affairs.

By use of website manual work is decreased, such as in an institution


if any student wants registration then he can do it easily by website.

This report describes in details my training in pacifier soft pvt.ltd. All


topics have been explained in simple and lucid language with
diagrams, specifications, applications.

It is matter to great pleasure that our college authorities have


recommended a practical training period of 45 days to our theoretical
knowledge acquired in the college.
INDEX

 Company Profile
 About Us
 Our Services
 Profile
 Careers
 About .Net
 VB.Net
 Differences between VB $ VB.Net
 Datatypes in .Net
 Controls used in .Net
 Project
CCOM SERVICES
ABOUT US:

Incorporated in 2006 we have exposed many avenues in


IT and Telecom Industry. Quite recently we have
partnered with RT Outsourcing Services limited an ISO
9001certfied technical organization. Accordingly, Our
Mission is to establish ourselves one of the leading
firms in Fulfillment services (IT/Telecom, Logistics,
Assemblies/ Merchandising/Manufacturing) product
repair & preventive Maintenance for various devices and
gadgets. We believe that this list of services could fit
well within your company's portfolio, given your market
strengths, values and customer base, and so we would
like to present our ideas to you and your appropriate
team.

CCom was instituted in 1998, essentially to provide web


based services such as website development and
multimedia solutions.

Our clientele include multinational corporations,


government institutions, small and medium enterprises
from India and across the globe.

CCom Enterprises Pvt. Ltd. has been empanelled as


Turnkey Solution Provider for The Government of
Maharashtra, Ministry of Information Technology
(Annexure 1 of GR No. COM/1002/CR No. 121/02/39) Yet
again, C Com has thus proved to compete with the top
players in the industry in a very short span of time.

OUR SERVICES:
Application Downloads on various gadgets/Devices Key Injection
Refurbishment and Reconditioning Screening Services Service,
Project and Contract Management. Logistics/Packing Fulfillment
services. Up-gradation, installation, & troubleshooting Preventive
Maintenance

OUR PARTNER

RT Outsourcing is India’s leading provider of Technical Support


and Reverse Logistics services for Original
Equipment Manufacturers, EMS Companies,Outsourcers,
Distributors, Large Corporation and Retail Chains.

OUR CLIENTS
 
 
 

Incorporated in year 2006, Ccom has spread its wings in India to tap the
booming Telecom/Service Industry. With industry surging, the opportunities
are exploding & everything grows with it. We are professionally managed 
organization. Our Partners/Joint ventures are located in multiple sites
across India and Middle East (Gulf).

Ccom Outsourcing services is committed to provide Technical Support


(Onsite /Offsite), Product Repair (Software), Refurbishment Services, up
gradation, installation, & troubleshooting for OEM (Original Equipment
Manufacturers), Distributors and Retail Chains.

Ccom offers integrated pre and post sales Service/support Solutions for
various gadgets and equipments. The company provides client specific
customized solutions with Lower cost, Better performance, domain
expertise and Operational efficiencies without capital investment.

The company's headcounts with more than 10 years of total work


experience, of our technically qualified engineers and technicians. We have
top priority to provide dedicated services to the client's business model,
products and their customer's needs. The benefits include dramatic
reduction in costs, enhanced customer loyalty, direct competitive
advantage, scalability and convenience to the customer.

Quality Policy

Quality Policy of Ccom is to provide highest quality of software deployment


and executing services that will put our client's business on the cutting
edge and enhance their satisfaction by continual improvement of our
systems. As being a Ethical compliance organization we want to build a
strong public image that upholds the integrity and character of the
company.
 

Philosophy
The management operates under the five powerful principles of
Competitive, Commitment, Correspondence, Complete and Compatible
(5C's).

 Competition makes oneself more aggressive more dedicated towards


there work. Ccom believes in competition to the highest level which
will reap benefit to the client in form of satisfaction.
 Commitment to our client is the most integral part of our business. We
are always committed to provide on time service while maintaining
highest standards of quality.
 Correspond regular with our client regarding updates, newsletter and
various other means of communication helps them to keep track on
the development of their job.
 Complete In-house structure to provide all the needs of the vendor
under one roof.
 Compatible, harmonious with our services and our clients

Mission /Vision
As per the projection ,by the end of year 2008 we are committed to
establish ourselves one of the leading firm in IT(Hardware, Fulfillment,
Knitting and various other services) where we would cross all the
boundaries and meet the customers expectation , requirement and praise.  

Software, Logistics & Assemblies fulfillment service

 
It would be a gross understatement to say that we have all got used to the mobile
phone and that statement is quite true with India. The need for software services
within the telecom sector has been steadily increasing over the years, especially
with the demand for telecommunication services. At Ccom, we offer an array of
software services within the telecom and networking sectors.

Services
With our skilled and experienced technical staff, comprised of engineers and
technicians, we can provide high quality service in the following domains:
 Application Downloads on various gadgets/Devices
 Key Injection.
 Refurbishment and Reconditioning.
 Screening Services.
 Service, Project and Contract Management.
 Logistics/Packing Fulfillment services.

Up-gradation, installation, & troubleshooting for OEM (Original Equipment


Manufacturers), Distributors and Retail Chains.
Further, we offer integrated pre and post sales service/support for an assortment
of gadgets and equipments.
 
Embedded Software Installation for portable equipments
 
Embedded Software Installations in various fields which will help to reduce cost
and quite efficiently manage your resources, some sectors which come under
embedded software installations vicinity are as follows:

Industry -

 Aerospace & Defense


 Automotive
 Consumer
 Electronics
 Networking
 Process Control Systems

Devices-
 Smart Hand Held Devices
 Notebooks
 PDA - Pocket Digital Assistant
 Consumer Products/Electronics/gadgets and various other portable
equipments
 POS terminals
 ATM
 Kiosks

Fulfillment services

The term “fulfillment” can refer to different aspects as per the industry.

Fulfillment in IT/Telecom industry


Ccom provides fulfillment services in Telecom industry, here are the
some examples of the service.
 Software Locking/Unlocking for mobile devices, Firmware upgrade,
packing/Labeling for GSM/CDMA mobiles.
 Software Key Injection for POS/Card Terminals.
 Application downloads for ATM/Kiosk/Mobile devices.
 Screening Services- This act helps to diagnose for different tribulations in
the devices.

Fulfillment in Logistics Sector


In simple terms it is a pick and pack service from shipping a finished
unit to an end customer. Some of the services in this umbrella include:
 Pick and Pack
 Repackaging
 Shrink wrap
 Reverse Logistics
 Unloading containers
 Hand Assembly
 Kits / Gift sets

 POP Display Pack-outs

Fulfillment in Assemblies/ Merchandising/Manufacturing

Labeling
The application of labels either to the product or to the packaging can
be done as per the OEM/Manufacturers guidelines. Merchandising can
include the addition of price stickers, Logo or other details of the
company.

Knitting Services/ Pre-Assembling


Pre-assembling is completion of a finished product from component
parts or pre-programming of products. Ccom provides Kitting services
such as assembly of two or more new parts/ components before using
the assembled item. Various parts/ components can be assembled and
a combination of software to be loaded on a hardware device Ccom
has been providing kitting services for OEM clients as per their
standard guidelines with stringent quality level. Kitting/Pre-
Assembling can be done to different equipments such as accessories,
batteries, Card Terminals, to the product pack.
Product Repair (Hardware)
under warranty product which includes Monitors, POS Terminals,
Setup Boxes etc comes under our repair service Department. Having
Exclusive partner ship with RT Outsourcing services we provide
repairing services for some of the valuable brands which includes
View sonic, Acer Philips, Axalto , Axesstel to name a few.

 
   Ccom houses a motivating work environment, where teams are
constantly looking to go one step further to win client loyalty and provide
excellent services and achieve targets.
   Individuals working at the Ccom will have a chance to act upon
mammoth services of the booming IT/Telecom/Service industry in India
where we cater worldwide Clientage. While we often have specific hiring
needs, we are always looking for honest, hard-working people, with
positive attitudes, in the areas of:
 Sales
 Marketing
 IT
 Accounting & Finance
 Technical Expertise
 GSM Technology

Basic Requirements
 Free to travel for long periods
 Flexible Timings
 Experience 4-5 years minimum
 Technical Expertise  
 Organized

 English & other Language


About Technology Used

What is this .NET all about ?

The simple answer is 'it is the technology from Microsoft, on


which all other Microsoft technologies will be depending on
in future.. It is a major technology change. Just like the
computer world moved from DOS to Windows, now they
are moving to .NET. But don't be surprised if you find anyone
saying that "I do not like .NET and I would stick with the
good old COM and C++". There are still lot of people who
like to use the bullock-cart instead of the latest Honda car .
.NET technology was introduced by Microsoft, to catch the
market from the SUN's Java. Few years back, Microsoft had
only VC++ and VB to compete with Java, but Java was
catching the market very fast. With the world depending
more and more on the Internet/Web and java related tools
becoming the best choice for the web applications, Microsoft
seemed to be loosing the battle. Thousands of programmers
moved to java from VC++ and VB. This was alarming for
Microsoft and many of the Microsoft fan's kept on asking "is
Microsoft sleeping?". And Microsoft had the answer. One
fine morning, they announced : "We are not sleeping. We
have the answer for you.". And that answer was .NET.

But Microsoft has a wonderful history of starting late but


catching up quickly. This is true in case of .NET too.
Microsoft put their best men at work for a secret project
called Next Generation Windows Services (NGWS)., under
the direct supervision of Mr. Bill Gates. The outcome of the
project is what we now know as .NET. Even though .NET
has borrowed most of it's ideas from Sun's J2EE, it has
really outperformed their competitors.

Microsoft's VC++ was a powerful tool. But it was too


complex. It has too many datatypes, and developers had to
learn many libraries including WIndows SDK, MFC, ATL,
COM etc. There were many datatype compatibility issues
while exchanging data between different layers. Visual Basic
was too easy, and many serious programmers hated it just
for that reason. Even though Visual basic was very easy to
use, it was not very flexible to develop serious applications.
SUN's Java became a very good choice for these reasons. It
had the flixibility and power of C++ and at the same time
easy enough to catch the attention of VB programmers.

Microsoft recognised these factors and they introducd the


.NET considering all these factors. All unwanted
complexities are eliminated and a pure object oriented
programming model was introduced. This makes
programmer's life very easy.

.NET framework comes with a single class library. And thats


all programmers need to learn!! Whether they write the code
in C# or VB.NET or J#, it doesn't matter, you just use the
.NET class library. There is no classes specific to any
language. There is nothing more you can do in a language,
which you can't do in any other .NET language. You can
write code in C# or VB.NET with the same number of lines of
code, same performance and same efficiency, because
eveyone uses same .NET class library.
What is .NET ?
 it is a platform neutral framework.
 is a layer between the operating system and the
programming language.
 It supports many programming languages, including
VB.NET, C# etc.
 .NET provides a common set of class libraries, which can
be accessed from any .NET based programming
language. There will not be separate set of classes and
libraries for each language. If you know any one .NET
language, you can write code in any .NET language!!
 In future versions of Windows, .NET will be freely
distributed as part of operating system and users will never
have to install .NET separately.

What is not?
 .NET is not an operating system.

 .NET is not a programming language.

".NET is a framework"

Are you confused by this definition? Well, that is OK. It is


really confusing!

We cannot define .NET as a 'single thing'. It is a new, easy,


and extensive programming platform. It is not a
programming language, but it supports several programming
languages. By default .NET comes with few programming
languages including C# (C Sharp), VB.NET, J# and
managed C++. .NET is a common platform for all the
supported languages. It gives a common class library, which
can be called from any of the supported languages. So,
developers need not learn many libraries when they switch
to a different language. Only the syntax is different for each
language.

When you write code in any language and compile, it will be


converted to an 'Intermediate Language' (Microsoft
Intermediate Language - MSIL). So, your compiled
executable contains the IL and not really executable
machine language. When the .NET application runs, the
.NET framework in the target computer take care of the
execution. (To run a .NET application, the target computer
should have .NET framework installed.) The .NET framework
converts the calls to .NET class libraries to the
corresponding APIs of the Operating system.

Whether you write code in C# or VB.NET, you are calling


methods in the same .NET class libraries. The same .NET
framework executes the C# and VB.NET applications. So,
there won't be any performance difference based on the
language you write code.

What is Visual Studio.NET?

Many people always get confused with Visual Studio .NET


(VS.NET) and .NET technology. VS.NET is just an editor,
provided by Microsoft to help developers write .NET
programs easily. VS.NET editor automatically generates lot
of code, allows a developer to drag and drop controls to a
form, provide short cuts to compile and build the application
etc.

VS.NET is not a required thing to do .NET programming.


You can simply use a notepad or any other simple editor to
write your .NET code!!! And you can compile your .NET
programs from the command prompt.

Well, what I said is true theoretically... but if you decide to


use notepad for .NET programming, by the time you develop
few sample applications, Microsoft would have introduced
some other new technology and .NET would be outdated.
You may not want that. So, let us go by VS.NET, just like
every other .NET guys.

.NET supported languages

Currently .NET supports the following languages:


 C#
 VB.NET
 C++
 J# The above languages are from Microsoft. Many third
parties are writing compilers for other languages with .NET
support.

Difference between VB and VB.NET

Believe us, there is not much in common between VB and


VB.NET other than the name. VB.NET is a totally new
programming language. It just retains the syntax of old VB.
So, if you are a vb programmer, probably you may like
VB.NET than C# just because of the syntax.
In addition to this, VB.NET still supports many of the old VB
functions just for backward compatibility. But if you are a
serious .NET programmer, we strongly suggest never use
old VB functions in VB.NET. So, switching from VB to
VB.NET is just like learning a new programming language,
with very small similarities between them.

C# or VB.NET? Which one to choose?

As we mentioned in earlier chapters, it makes no much


difference. Whether you write code in VB.NET or C#, when
you compile, your code will get converted to MSIL (Microsoft
Intermediate language). It is this MSIL which you deliver to
your customer in the form of a DLL or EXE. The MSIL is
executed by the same .NET framework, whether you wrote it
originally in C# or VB.NET.

The MSIL generated by C# and VB.NET is almost 99% is


the same! Many believe that C# has the power of C++ and
VB.NET has the user friendliness of VB. That is not true.
Both are equally powerful and friendly.

VB.NET has backward compatibility with old Visual basic.


So, it supports old vb functions. C# is a fresh, clean
language. So strongly support using C# instead of VB.NET
just for this clean compiler.

.NET vs. Java

Java is one of the greatest programming languages created


by humans. Java doesn't have a visual interface
and requires us to write heaps of code to develop
applications. On the other hand, with .NET, the Framework
supports around 20 different programming languages which
are better and focus only on business logic leaving all other
aspects to the Framework. Visual Studio .NET comes with a
rich visual interface and supports drag and drop. Many
applications were developed, tested and maintained to
compare the differences between .NET and Java and the
end result was a particular application developed using .NET
requires less lines of code, less time to develop and lower
deployment costs along with other important issues.
Personally

Concepts of OOP:

o Objects
o Classes
o Data Abstraction and Encapsulation
o Inheritance
o Polymorphism

Briefly-concepts

Objects are the basic run-time entities in an object-


oriented system. Programming problem is analyzed in
terms of objects and nature of communication between
them. When a program is executed, objects interact with
each other by sending messages. Different objects can
also interact with each other without knowing the details of
their data or code.

Classes

A class is a collection of objects of similar type. Once a


class is defined, any number of objects can be created
which belong to that class.
Data-Abstraction

Abstraction refers to the act of representing essential


features without including the background details
or explanations. Classes use the concept of abstraction
and are defined as a list of abstract attributes.

Encapsulation

Storing data and functions in a single unit (class) is


encapsulation. Data cannot be accessible to the outside
world and only those functions which are stored in the
class can access it.

Inheritance

Inheritance is the process by which objects can acquire


the properties of objects of other class. In OOP,
inheritance provides reusability, like, adding additional
features to an existing class without modifying it. This is
achieved by deriving a new class from the existing one.
The new class will have combined features of both the
classes.

Polymorphism

Polymorphism means the ability to take more than one


form. An operation may exhibit different behaviors in
different instances. The behavior depends on the data
types used in the operation. Polymorphism is extensively
used in implementing Inheritance

Advantages
Object-Oriented Programming has the following
advantages over conventional approaches:

o OOP provides a clear modular structure for programs


which makes it good for defining abstract datatypes
where implementation details are hidden and the unit
has a clearly defined interface.
o OOP makes it easy to maintain and modify existing
code as new objects can be created with small
differences to existing ones.
o OOP provides a good framework for code libraries
where supplied software components can be easily
adapted and modified by the programmer. This is
particularly useful for developing graphical user
interfaces.

Is it platform independent?

The code you write is platform independent, because


whatever you write is getting compiled into MSIL. There is no
native code, which depends on your operating system or
CPU. But when you execute the MSIL, the .NET framework
in the target system will convert the MSIL into native platform
code.

So, if you run your .NET exe in a WIndows machine, the


.NET framework for Windows will convert it into Windows
native code and execute. If you run your .NET application in
Unix or Linux, the .NET framework for Unix/Linux will convert
your code into Unix/Linux native code and execute. So, your
code is purely platform independent and runs anywhere!
Future of .NET

Microsoft is moving all its technologies to be .NET based


or .NET related. The next version of SQL Server even
supports writing stored procedures in .NET languages. .NET
runtime will be part of all Operating Systems by default.
In short, if you like to work on Microsoft technologies for
programming, .NET would be the only choice you will have.
 
What is Visual Studio.NET?

Many people always get confused with Visual Studio


.NET (VS.NET) and .NET technology. VS.NET is just an
editor, provided by Microsoft to help developers write .NET
programs easily . VS.NET editor automatically generates lot
of code, allows developers to drag and drop controls to a
form, provide short cuts to compile and build the application
etc.

VB Language

Visual Basic is very popular for it's friendly working


(graphical) environment. Visual Basic. NET is an extension
of Visual Basic programming language with many new
features in it. The changes from VB to VB .NET are huge,
ranging from the change in syntax of the language to the
types of projects we can create now and the way we design
applications. Visual Basic .NET was designed to take
advantage of the .NET Framework base classes and runtime
environment. It comes with power packed features that
simplify application development.

Briefly on some changes:

The biggest change from VB to VB .NET is, VB .NET is


Object-Oriented now. VB .NET now supports all the key
OOP features like Inheritance, Polymorphism, Abstraction
and Encapsulation. We can now create  classes and objects,
derive classes from other classes and so on. The major
advantage of OOP is code reusability
The Command Button now is Button and the Textbox is
Textbox instead of Text as in VB6
Many new controls have been added to the toolbar to make
application development more efficient
VB .NET now adds Console Applications to it apart from
Windows and Web Applications. Console applications are
console oriented applications that run in the DOS version
All the built-in VB functionality now is encapsulated in a
Namespace (collection of different classes) called System
New keywords are added and old one's are either removed
or renamed
VB .NET is strongly typed which means that we need to
declare all the variables by default before using them
VB .NET now supports structured exception handling using
Try...Catch...Finally syntax
The syntax for procedures is changed. Get and Let are
replaced by Get and Set
Event handling procedures are now passed only two
parameters
The way we handle data with databases is changed as
well. VB .NET now uses ADO .NET; a new data handling
model to communicate with databases on local machines or
on a network and also it makes handling of data on the
Internet easy. All the data in ADO .NET is represented in
XML format and is exchanged in the same format.
Representing data in XML format allows us for sending large
amounts of data on the Internet and it also reduces network
traffic when communicating with the database
VB .NET now supports Multithreading. A threaded
application allows to do number of different things at once,
running different execution threads allowing using system
resources
Web Development is now an integral part of VB .NET
making Web Forms and Web Services two major types of
applications

Namespaces

A namespace is a collection of different classes. All VB


applications are developed using classes from the .NET
System namespace. The namespace with all the built-in VB
functionality is the System namespace. All other
namespaces are based on this System namespace.

Some Namespaces and their use:

System: Includes essential classes and base classes for


commonly used data types, events, exceptions and so on
System. Data: Includes classes which lets us handle data
from data sources
System.Data.OleDb: Includes classes that support the
OLEDB .NET provider
System.Data.SqlClient: Includes classes that support the
SQL Server .NET provider
System. Web: Includes classes and interfaces that support
browser-server communication
System.Web.Services: Includes classes that let us build and
use Web Services
System.Windows.Forms: Includes classes for creating
Windows based forms
System.XML: Includes classes for XML support

Assemblies An assembly is the building block of a .NET


application. It is a self describing collection of code,
resources, and metadata (data about data, example, name,
size, version of a file is metadata about that file). An
Assembly is a complied and versioned collection of code and
metadata that forms an atomic functional unit. Assemblies
take the form of a  dynamic link library (.dll) file or executable
program file (.exe) but they differ as they contain the
information found in a type library and the information about
everything else needed to use an application or component.
All .NET programs are constructed from these Assemblies.
Assemblies are made of two parts: manifest, contains
information about what is contained within the assembly
and modules, internal files of IL code which are ready to run.

An assembly includes:

o Information for each public class or type used in the


assembly – information includes class or type names,
the classes from which an individual class is derived,
etc
o Information on all public methods in each class, like, the
method name and return values (if any)
o Information on every public parameter for each method
like the parameter's name and type
o Information on public enumerations including names
and values
o Intermediate language code to execute
o A list of types exposed by the assembly and list of other
assemblies required by the assembly 

Windows Forms In Visual Basic its these Forms with which we work. They are
the base on which we build, develop all our user interface and they come with a rich
set of classes. Forms allow us to work visually with controls and other items from the
toolbox. In VB .NET forms are based on the System.Windows.Forms namespace and
the form class is System.Windows.Forms.Form. The form class is based on the
Control class which allows it to share many properties and methods with other
controls.

When we open a new project in Visual Basic the dialogue box that appears first is the
one which looks like the image below. Since we are working with Windows
Applications (Forms) you need to select WindowsApplication and click OK.

Once you click OK a new Form opens with the title, Form1, towards the  top-left side
of the form and maximize, minimize and close buttons towards the top right of the
form. The whole form is surrounded with a border. The main area of the form in which
we work is called the Client Area. It's in this client area we design the user
interface leaving all the code to the code behind file. Forms also support events
which let's the form know that something happened with the form, for example, when
we double-click on the form, the Form load event occurs. VB .NET also supports
forms to be inherited.

Image of a Windows Form.


Typically the Form looks like this in Code which is handled by the
Framework.

Public Class Form1


Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()


MyBase.New()

'This call is required by the Windows Form Designer.


InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal
disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer


Private components As
System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows


Form Designer
'It can be modified using the Windows Form Designer. 
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> Private
Sub InitializeComponent()
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(496, 493)
Me.Name = "Form1"
Me.Text = "Form1"

End Sub

#End Region

Private Sub Form1_Load(ByVal sender As System.Object,


ByVal e As System.EventArgs) Handles MyBase.Load

End Sub
End Class

What is .NET Built On?

.NET is built on the Windows Server System to take


major advantage of the OS and which comes with a
host of different servers which allows for building,
deploying, managing and maintaining Web-based
solutions. The Windows Server System is designed
with performance as priority and it provides
scalability, reliability, and manageability for the
global, Web-enabled enterprise. The Windows Server
System integrated software products are built for
interoperability using open Web standards such as
XML and SOAP.
Core Windows Server System Products include :

SQL Server2000: This Database Server is Web


enabled and is designed with priority for .NET based
applications. It is scalable, easy to manage and has
a native XML store.

Application Center 2000: This product is designed


to manage Web Applications.

Commerce Server 2000: This powerful Server is


designed for creating E-Commerce based
applications.

Mobile Information Server: This Server provides


real-time access for the mobile community. Now
Outlook users can use their Pocket PC's to access all
their Outlook data while they are moving.

Exchange Server 2000: This is a messaging


system Server and allows applications on any device
to access information and collaborate using XML.

BizTalk Server 2000: This is the first product


created for .NET which is XML based and allows to
build business process that integrate with other
services in the organization or with other Businesses.

Internet Security and Acceleration Server


2000: This Server provides Security and Protection
for machines. It is an integrated firewall and Web
cache server built to make the Web-enabled
enterprise safer, faster, and more manageable.
Host Integration Server 2000: This Server allows
for the Integration of mainframe systems with .NET.

When developing real world projects if you don't


know how to use the above mentioned Server's
which are built for .NET based applications do not
worry. Your System Administrator is always there to
help you.

Datatypes in C# and .NET

.NET data types are either structures or classes, part of


the System namespace. For example, the following data
types are implemented as struct in .NET:
 Int16
 Int32
 Double

(String is implemented as a class in .NET, for various


reasons.)

Here is how you can declare variables of type Int, Double


and String:
 Int16 age, employee Number;
 Double salary;
 String name, address;

Data Types in C# and the corresponding class/struct


in .NET class library

the following list shows the list of data types available in C# and their corresponding
class/struct in .NET class library.

C# Data Mapped to .NET


type class/struct
sbyte System.SByte
byte System. Byte
char System. Char
float System. Single
decimal System. Decimal
double System. Double
ushort System.UInt16
short System.Int16
uint System.UInt32
int System.Int32
ulong System.UInt64
long System.Int64
bool System. Boolean
string System. String
object System. Object

Value Types & Reference Types


In C# data types are classified into two :
 Value types
 Reference types

reference
value types
types
allocated on allocated on
stack heap
Reference type
variable
a value type contains the
variable address of
contains the memory
data itself location where
data is actually
stored.
When copying
a reference
When you type variable to
copy a another
value type variable, only
variable to the memory
another address is
one, the copied. Both
actual data variables will
is copied still point to the
and each same memory
variable can location, which
be means, if you
independent change one
ly variable, the
manipulated value will be
. changed for
the other
variable too.
integer,
float, String and
Boolean, object are
double etc reference
are value types.
types.

Namespaces in .NET

A Namespace is a group of related classes. It is a good


practice to group related classes into a namespace when
you create a class library.

The main advantage of using namespaces is, to avoid


conflicts when you have multiple classes with the same
name.
So, namespaces allow you to avoid name conflicts!

All classes in .NET class library are grouped into


namespaces. You can use all the classes using the fully
qualified name, including the namespace also along with the
class name.

If you want to declare a Button object, you must do the


following:

System.Windows.Forms.Button myButton;

It is not mandatory to use the namespace also along with the


name. You may use the using directive on top of the class
and safely avoid the need to write the fully qualified name
everytime when you refer to a class.

Using System.Windows.Forms.Button;

If you have the above line of code on top of the class file,
you don't need to type the namespace name
System.Windows.Forms with all the classes in this
namespace. You can simply use class name directly as
shown below:

Button myButton;
.NET Namespaces

Here is a list of some of the namespaces in .NET class


library.
 System
 System.Xml
 System.Data
 System.Data.OleDb
 System.Data.SqlClient
 

WinForms
WinForms is the most commonly used feature of .NET.
'Windows' based applications in .NET is called 'WinForms'.
The .NET framework comes with a good number of classes
to support 'Form' based application development.

Event driven programming

Event Driven programming model is the most commonly


used feature in modern programming. In this model, you will
write appropriate code for each event. Examples for events
are
· Button Click
· Mouse Move
· Mouse Click
· Key Press

. Once user enters all the information, he may press the


'Submit' button. As a developer, you would have written code
in the button click event, to save this user entered data into a
database. This is how typically a WinForms based
application works in an event driven programming model.
Toolbox

Toolbox provides all the drag and drop controls for your
application. Depending on the kind of application you are
working on, the toolbox will show appropriate controls and
you can drag and drop them to your form. If you are
developing a web application, toolbox will show ASP.NET
controls and if you are developing a Windows application, it
will show Windows controls (like Radio button, text box,
buttons etc).

You can simply drag and drop any controls from the toolbox
to your form. After you drag and drop any control, double
click on the control to go the default event associated with
the control.

The above behaviour is common for all the windows


explained below. They will be minimized by default and you
can point the mouse over it to expand it. Use the pushbutton
to keep it expanded.

Design mode & HTML mode

If you are developing a web application, you can switch


between design mode and HTML mode for any web form.
When you are in HTML mode, it will show you the HTML
tags and ASP.NET code and you can manually edit it. You
can switch to the Design mode by clicking the Design button
on BOTTOM LEFT corner of VS.NET. In design mode, you
can see how your ASP.NET page is going to look like when
some one view your web page. Also, you can drag and drop
controls from the toolbox, which will automatically generate
the HTML for it.
Solution Explorer

Solution Explorer, located on TOP RIGHT corner of VS.NET,


displays your solution, all projects included in each solution
and the list of files in each project. They are listed in the form
of a tree control.

Typically, for a single application, you will have 1 solution


and one or more projects. When you create a new
application, you are have to create single Visual Studio
project. In more complex applications, there may be more
than one project. All these projects are grouped into a single
solution. Even if you do not create a solution separately, a
solution will be automatically created for you.

To add a new file to your project, you can right click on the
project name (JustTest is the project name in the picture)
and choose the menu option Add. It will give you the option
to choose a file type. You can choose an appropriate type.

Output

Output window, located on BOTTOM LEFT corner of


VS.NET, displays the result of your project compilation.
When you compile your project, all errors, warnings and
compilation results will be displayed in this window.

Task List - shows individual tasks. Typically, when you


compile your project, all errors and warnings will be added to
your task list. You can double click on any item in the task
list to go directly to the code associated with the task.

Command Window - you can execute code statements


here. When you are debugging, you can evaluate the value
of any variables by typing ? followed by the variable name.
Find Results - when you search for any text in file(s) using
VS.NET, the results will be displayed in this window

Controls

A control is an object that can be drawn on to the Form to


enable or enhance user interaction with the application.
Examples of these control, TextBoxes, Buttons, Labels,
Radio Buttons, etc. All these Windows Controls are based
on the Control class, the base class for all controls. Visual
Basic allows us to work with controls in two ways: at design
time and at runtime. Working with controls at design time
means, controls are visible to us and we can work with them
by dragging and dropping them from the Toolbox and
setting their properties in the properties window. Working at
runtime means, controls are not visible while designing, are
created and assigned properties in code and are visible only
when the application is executed. There are many new
controls added in Visual Basic .NET and we will be working
with some of the most popular controls in this section. You
can select the controls from the menu towards the left-hand
side of this page.

Notable properties of most of these Windows Controls which


are based on the Control class itself are summarized in the
table below. You can always find the properties of the control
with which you are working by pressing F4 on the keyboard
or by selecting View->Properties Window from the main
menu.

The Control Class

The Control class is in the System.Windows.Forms


namespace. It is a base class for the Windows Controls
The properties of the Control object are summarized below. Properties are alphabetical
as seen in the properties window.

Property Description

Indicates if the form can accept data that the


AllowDrop
user drags and drops into it

Gets/Sets which edges of the control are


Anchor
anchored

Gets/Sets the background color for the


BackColor
control

Gets/Sets the background image in the


BackgroundImage
control

Gets the distance between the bottom of the


Bottom
control and the top of its container client area

Bounds Gets/Sets the controls bounding rectangle

Returns a value specifying if the control can


CanFocus
recieve focus

Returns a value specifying if the control can


CanSelect
be selected

Gets/Sets a value specifying if the control has


Capture
captured the mouse

Gets/Sets a value specfying if the control


CausesValidation causes validation for all controls that require
validation

Returns a value specifying if the control has


ContainsFocus
the input focus

ContextMenu Gets/Sets the shortcut menu for the control

Gets/Sets the collection of controls contained


Controls
within the control

Gets/Sets the cursor to be displayed when the


Cursor
user moves the mouse over the form

DataBindings Gets the data bindings for the control

Gets/Sets which edge of the parent a control


Dock
is docked to

Gets/Sets a value indicating if the control is


Enabled
enabled

Returns a value specifying if the control has


Focused
input focus
Font Gets/Sets the font for the control

ForeColor Gets/Sets the foreground color of the control

Returns a value specifying if the control


HasChildren
contains child controls

Height Gets/Sets the height of the control

Gets/Sets the x-coordinates of a control's left


Left
edge in pixels

Gets/Sets the co-ordinates of the upper-left


Location
corner of the control

Name Gets/Sets name for the control

Parent Gets/Sets the control's parent container

Returns the distance between the right edge


Right of the control and the left edge of it's
container

Gets/Sets the value indicating if the


RightToLeft alignment of the control's elements is
reversed to support right-to-left fonts

Size Gets/Sets size of the control in pixels

Gets/Sets the tab order of this control in its


TabIndex
container

Gets/Sets a value specifying if the user can


TabStop
tab to this control with the tab key

Gets/Sets an object that contains data about


Tag
the control

Text Gets/Sets the text for this control

Top Gets/Sets the top coordinates of the control

Gets/Sets a value specifying if the control is


Visible
visible

Width Gets/Sets the width of the control

Control Tab Order

To move focus from one control to other quickly using the


keyboard we can use the Tab key. We can set the order in
which the focus is transferred by setting the tab order. The
tab order is the order in which controls on the form receive
the focus and is specified by the TabIndex property. To
change the order in which a control receives focus we need
to set the TabIndex property to different value for each
control on the form. Lower values receive the focus first and
proceed numerically through higher values. If there is a tie
between TabIndex values, the focus first goes to the control
that is closest to the front of the form.

We can also set the tab order graphically with Visual Studio
by selecting Tab Index from the View menu. Boxes
containing current tab order appear in each control when you
select Tab Index from View menu. Click each control to set
the correct tab order in which you want the controls to
receive focus.

ListBox

The ListBox control displays a list of items from which we


can make a selection. We can select one or more than one
of the items from the list. The ListBox control is based on the
ListControl class which is based on the Control class.

Notable Properties of the ListBox

Button Control

One of the most popular control in Visual Basic is the Button


Control (previously Command Control). They are the
controls which we click and release to perform some action.
Buttons are used mostly for handling events in code, say, for
sending data entered in the form to the database and so on.
The default event of the Button is the Click event and the
Button class is based on the ButtonBase class which is
based on the Control class.
Button Event

The default event of the Button is the Click event. When a


Button is clicked it responds with the Click Event

Working with Buttons

Well, it's time to work with Buttons. Drag a Button from the
toolbox onto the Form. The default text on the Button is
Button1. Click on Button1 and select its properties by
pressing F4 on the keyboard or by selecting
View->Properties Window from the main menu. That
displays the Properties for Button1.

Important Properties of Button1 from Properties Window:

Appearance

Appearance section of the properties window allows us to


make changes to the appearance of the Button. With the
help of BackColor and Background Image properties we can
set a background color and a background image to the
button. We set the font color and font style for the text that
appears on button with ForeColor and the Font property. We
change the appearance style of the button with the FlatStyle
property. We can change the text that appears on button
with the Text property and with the TextAlign property we
can set where on the button the text should appear from a
predefined set of options.

Behavior

Notable Behavior properties of the Button are the Enabled


and Visible properties. The Enabled property is set to True
by default which makes the button enabled and setting it's
property to False makes the button Disabled. With the
Visible property we can make the Button Visible or Invisible.
The default value is set to True and to make the button
Invisible set it's property to False.

Layout

Layout properties are about the look of the Button. Note the
Dock property here. A control can be docked to one edge of
its parent container or can be docked to all edges and fill the
parent container. The default value is set to none. If you
want to dock the control towards the left, right, top, bottom
and center you can do that by selecting from the button like
image this property displays. With the Location property you
can change the location of the button. With the Size property
you can set the size of the button.

TextBox Control

Windows users should be familiar with textboxes. This


control looks like a box and accepts input from the user. The
TextBox is based on the TextBoxBase class which is based
on the Control class. TextBoxes are used to accept input
from the user or used to display text. By default we can enter
up to 2048 characters in a TextBox but if the Multiline
property is set to True we can enter up to 32KB of text. The
image below displays a Textbox.

Some Notable Properties:

Some important properties in the Behavior section of


the Properties Window for TextBoxes.
Enabled: Default value is True. To disable, set the
property to False.
Multiline: Setting this property to True makes the
TextBox multiline which allows to accept multiple lines
of text. Default value is False.
PasswordChar: Used to set the password character. The
text displayed in the TextBox will be the character set by the
user. Say, if you enter *,  the text that is entered in the
TextBox is displayed as *.
ReadOnly: Makes this TextBox readonly. It doesn't allow to
enter any text.
Visible: Default value is True. To hide it set the property to
False.

Important properties in the Appearance section

TextAlign: Allows to align the text from three possible


options. The default value is left and you can set the
alignment of text to right or center.
Scrollbars: Allows to add a scrollbar to a Textbox. Very
useful when the TextBox is multiline. You have four options
with this property. Options are are None, Horizontal, Vertical
and Both. Depending on the size of the TextBox anyone of
those can be used.

Label

Labels are those controls that are used to display text in


other parts of the application. They are based on the Control
class.

Notable property of the label control is the text property


which is used to set the text for the label.
LinkLabel

LinkLabel is similar to a Label but they display a


hyperlink. Even multiple hyperlinks can be specified
in the text of the control and each hyperlink can
perform a different task within the application. They
are based on the Label class which is based on the
Control class.

Notable properties of the LinkLabel control are the


ActiveLinkColor, LinkColor and LinkVisited which are
used to set the link color.

RichTextBox
RichTextBoxes are similar to TextBoxes but they
provide some advanced features over the standard
TextBox. RichTextBox allows formatting the text, say
adding colors, displaying particular font types and so
on. The RichTextBox, like the TextBox is based on
the TextBoxBase class which is based on the Control
class. These RichTextBoxes came into existence
because many word processors these days allow us
to save text in a rich text format. With
RichTextBoxes we can also create our own word
processors. We have two options when accessing
text in a RichTextBox, text and rtf (rich text format).
Text holds text in normal text and rtf holds text
in rich text format. Image of a RichTextBox is shown
below.
The default event of RichtextBox is the
TextChanged event which looks like this in code:

Code Samples

Code for creating bold and italic text in a


RichTextBox

Drag a RichTextBox (RichTextBox1) and a Button


(Button1) onto the form. Enter some text in
RichTextBox1, say, "We are working with
RichTextBoxes". Paste the following code in the click
event of Button1. The following code will search
for text we mention in code and sets it to be
displayed as Bold or Italic based on what text is
searched for.

TreeView

The tree view control is used to display a hierarchy of nodes (both parent, child). You can expand
and collpase these nodes by clicking them. This control is similar to Windows Explorer which
displays a tree view in it's left pane to list all the folders on the hard disk. Below is the image of a
Tree View control.
Notable Properties of TreeView 

Bounds: Gets the actual bound of the tree node


Checked: Gets/Sets whether the tree node is checked
FirstNode: Gets the first child tree node
FullPath: Gets the path from the root node to the current node
ImageIndex: Gets/Sets the image list index of the image displayed for a node
Index: Gets the location of the node in the node collection
IsEditing: Gets whether the node can be edited
IsExpanded: Gets whether the node is expanded
IsSelected: Gets whether the node is selected
LastNode: Gets the last child node
NextNode: Gets the next sibling node
NextVisibleNode: Gets the next visible node
NodeFont: Gets/Sets the font for nodes
Nodes: Gets the collection of nodes in the current node
Parent: Gets the parent node of the current node
PrevNode: Gets the previous sibling node
PrevVisibleNode: Gets the previous visible node
TreeView: Gets the node's parent tree view

ComboBox
ComboBox is a combination of a TextBox and a ListBox. The
ComboBox displays an editing field (TextBox) combined with
a ListBox allowing us to select from the list or to enter new
text. ComboBox displays data in a drop-down style format.
The ComboBox class is derived from the ListBox class.
Below is the Image of a ComboBox.
ListBox
The ListBox control displays a list of items from which we
can make a selection. We can select one or more than one
of the items from the list. The ListBox control is based on the
ListControl class which is based on the Control class.

Notable Properties of the ListBox

HorizontalScrollbar: Displays a horizontal scrollbar to the


ListBox. Works when the ListBox has MultipleColumns.
MultiColumn: The default value is set to False. Set it to True
if you want the list box to display multiple columns.
ScrollAlwaysVisible: Default value is set to False. Setting it
to true will display both vertical and horizontal scrollbar
always.
SelectionMode: Default value is set to one. Select option
none if you do not any item to be selected. Select it to
MultiSimple if you want multiple items to be selected. Setting
it to MultiExtended allows you to select multiple items with
the help of Shift, Control and arrow keys on the keyboard.
Sorted: Default value is set to False. Set it to true if you want
the items displayed in the ListBox to be sorted by
alphabetical order.

RadioButton

RadioButtons are similar to CheckBoxes but


RadioButtons are displayed as rounded instead of
boxed as with a checkbox. Like CheckBoxes,
RadioButtons are used to select and deselect options
but they allow us to choose from mutually exclusive
options. The RadioButton control is based on the
ButtonBase class which is based on the Control class.
A major difference between CheckBoxes and
RadioButtons is, RadioButtons are mostly used
together in a group. Below is the image of a
RadioButton.

Important properties of the RadioButton in the


Appearance section of the properties window are:

Appearance: Default value is Normal. Set the value


to Button if you want the RadioButton to be
displayed as a Button.
BackgroundImage: Used to set a background image
for the RadioButton.
CheckAlign: Used to set the alignment for the
RadioButton from a predefined list.
Checked: Default value is False, set it to True if you
want the RadioButton to be displayed as checked.
CheckBox

Checkboxes are those controls which gives us an


option to select, say, Yes/No or True/False. A
checkbox is clicked to select and clicked again to
deselect some option. Below is the image of a
Checkbox.

Notable Properties

Important properties of the CheckBox in the


Appearance section of the properties window are:

Appearance: Default value is Normal. Set the value


to Button if you want the CheckBox to be displayed
as a Button.
BackgroundImage: Used to set a background image
for the checkbox.
CheckAlign: Used to set the alignment for the
CheckBox from a predefined list.
Checked: Default value is False, set it to true if you
want the CheckBox to be displayed as checked.
CheckState: Default value is Unchecked. Set it to
True if you want a check to appear. When set to
Indeterminate it displays a check in gray
background.
FlatStyle: Default value is Standard. Select the value
from a predefined list to set the style of the
checkbox.

Panel, GroupBox, PictureBox

Panel

Panels are those controls which contain other controls, for


example, a set of radio buttons, checkboxes, etc. Panels are
similar to Groupboxes but the difference, Panels cannot
display captions where as GroupBoxes can and Panels can
have scrollbars where as GroupBoxes can't. If the Panel's
Enabled property is set to False then the controls which the
Panel contains are also disabled. Panels are based on the
ScrollableControl class.

Notable property of the Panel control in the appearance


section is the BorderStyle property.

Adding Controls to a Panel

On a from drag a Panel (Panel1) from the toolbox. We want


to place some controls, say, checkboxes on this Panel. Drag
three checkboxes from the toolbox and place them on the
Panel. When that is done all the checkboxes in the Panel are
together as in a group but they can function independently.
The image below displays a panel.

GroupBox Control

As said above, Groupboxes are used to Group controls.


GroupBoxes display a frame around them and also allows to
display captions to them which is not possible with the Panel
control. The GroupBox class is based on the Control class.

PictureBox Control
PictureBoxes are used to display images on them. The
images displayed can be anything varying from Bitmap,
JPEG, GIF, PNG or any other image format files. The
PictureBox control is based on the Control class.

Menus

Everyone should be familiar with Menus. Menus (File, Edit,


Format etc in all windows applications) are those that allow
us to make a selection when we want to perform some
action with the application, for example, to format the text,
open a new file, print and so on. In VB .NET MainMenu is
the container for the Menu structure of the form. Menus are
made of MenuItem objects that represent individual parts of
a menu (like File->New, Open, Save, Save As etc). The two
main classes involved in menu handling are, MainMenu and
MenuItem.

Date TimePicker, Month Calendar


Date Time Picker

Date Time Picker allows us to select date and time. Date


TimePicker is based on the control class. When we click on
the drop-down arrow on this control it displays a month
calendar from which we can make selections. When we
make a selection that selection appears in the textbox part of
the Date TimePicker. The image below displays the Date
TimePicker.

Notable Behavior properties of MonthCalendar

 FirstDayOfWeek
 ShowToday
 ShowTodayCircle

Common Dialogs

Visual Basic .NET comes with built-in dialog boxes which


allow us to create our own File Open, File Save, Font, Color
dialogs much like what we see in all other windows
applications. To make a dialog box visible at run time we use
the dialog box's ShowDialog method. The Dialog Boxes
which come with Visual Basic .NET are: OpenFileDialog,
SaveFileDialog, FontDialog, ColorDialog, PrintDialog,
PrintPreviewDialog and PageSetupDialog. We will be
working with OpenFile, SaveFile, Font and Color Dialog's in
this section. The return values of all the above said dialog
boxes which will determine which selection a user makes
are: Abort, Cancel, Ignore, No, None, OK, Return, Retry and
Yes.

OpenFileDialog

Open File Dialog's are supported by the OpenFileDialog


class and they allow us to select a file to be opened. Below
is the image of an OpenFileDialog.
SaveFileDialog

Save File Dialog's are supported by the SaveFileDialog class


and they allow us to save the file in a specified location.

FontDialog

Font Dialog's are supported by the FontDialog Class


and they allow us to select a font size, face, style,
etc.

Properties of the FontDialog are as follows:

Color: Gets/Sets selected font color.


Font: Gets/Sets the selected font.
MaxSize: Gets/Sets the maximum point size the user can
select.
MinSize: Gets/Sets the mainimum point size the user can
select.

Print Dialogs  Providing support for Printing is one of the


common tasks during application development.
PageSetupDialog

Page Setup dialogs are used to specify page details for


printing. This dialog allows us to set borders and
adjustments, headers and footers, portraits, orientation, etc.
You use the PrinterSettings property of this dialog to get a
Printer Settings object that holds settings the user specified.
The PageSetupDialog exposes a Document property that
specifies the PrintDocument to use.
Projects
VS.NET allows you to create several types of projects. Most
of the time you will be using one of two categories:
· Windows Application - to create any standard windows
application.
· ASP.NET Web Application - to create a web site.

Creating a Project

To create a new project, choose the main menu : File > New
> Project.

After selecting a type, you choose a template from the right


side. You may choose Windows Application, ASP.NET Web
Application or any other template based on the nature of the
application you want.

Building a project
Go to the main menu and select the menu item Build >
Build Solution.

This process will compile all the files included in your project
and show you the result in the Output window.
To Run the application you just Built, go to the main menu
and select Debug > Start Without Debugging
When you compile (build) the code, if there is any errors or
warnings, the details will be shown in the 'Task List' window.
You can click on the specific item in this window to go
directly to the line of code associated with the error.
Debugging your project
Debug > Start or press F5. Now your application will run in
debug mode. To run your application in non-debug mode,
choose the menu : Debug > Start without Debugging or
press Ctrl F5.
Database Concepts

Database is the media to store data. If you have an


application that has to store and retrieve data, your
application must be using a database.

A 'File' is the simplest form of saving the data in the disk, but
is not the most 'efficient way' of managing application data. A
database is basically a collection of one or more files, but in
a custom format, and data is organised in a specific format
such a way that it can be retrieved and stored very
efficiently.

Some examples for databases are :


· MS Access
· SQL Server
· Oracle

MS Access saves data into database files with the


extension .mdbSQL Server (Microsoft product) and Oracle
(Oracle Corp.) are more complex, advanced, relational
databases and they are much more expensive

ADO.NET

ADO.NET is the data access model that comes with the


.NET Framework. ADO.NET provides the classes required to
communicate with any database source (including Oracle,
Sybase, Microsoft Access, Xml, and even text files).

DataAccess Providers in .NET

ADO.NET comes with few providers providers, including:


· OleDb
· SqlClient

A DATA PROVIDER is a set of classes that can be used


to access, retrieve and manipulate data from the
databases.

The ADO.NET Data Architecture

Data Access in ADO.NET relies on two


components: DataSet and Data Provider.

DataSet

The dataset is a disconnected, in-memory


representation of data. It can be considered as a
local copy of the relevant portions of the database

Data Provider

The Data Provider is responsible for providing and


maintaining the connection to the database to
connect to other types of databases like Access and
Oracle. Each DataProvider consists of the following
component classes:

The Connection object which provides a


connection to the database
The Command object which is used to execute
a command
The DataReader object which provides a
forward-only, read only, connected recordset

What is DataSet ?
A DataSet is an in memory representation of data loaded
from any data source.

You might also like