Develop Information System Learning Guide
Develop Information System Learning Guide
Phone of Department:254117215735
Table of Contents
DEVELOP INFORMATION SYSTEMS....................................................................................................................2
Learning Outcomes.......................................................................................................................................................2
COURSE OUTLINE.....................................................................................................................................................3
Learning Outcome 1: Understand fundamentals of Information Systems...............................................................6
Learning outcome 2: Understand the Software Development Process...................................................................12
3: Demonstrate Human Computer Interaction Principles.......................................................................................25
4. Understand the VB.NET programming environment..........................................................................................30
5. Develop and test a VB.NET application................................................................................................................42
DEVELOP INFORMATION SYSTEMS
Introduction
This unit covers the competencies required to develop an information system. It involves understanding
fundamentals of information systems, understanding the software development process, demonstrating
human computer interaction principles, understanding the VB.net programming environment and developing
and testing a VB.NET application.
Performance Standard
1. Described the software development process
2. Demonstrated Human Computer Interaction principles
3. Develop and test a VB.NET application
Learning Outcomes
List of Learning Outcomes
Understand fundamentals of Information Systems
Understand the Software Development Process
Demonstrate Human Computer Interaction Principles
Understand the VB.NET programming environment
Develop and test a VB.NET application
COURSE OUTLINE
1. Understand fundamentals of Information Systems
Information systems
✓ Definition
✓ Components
• Types of information systems
✓ Transaction Processing Systems
✓ Management information Systems
✓ Decision Support Systems
✓ Executive Information Systems
✓ Office Automation Systems
• Emerging trends in information systems
• Recommendation of information systems for different scenarios
• Information system security
✓ Definition
✓ Information security management system
✓ Tools for information system security
✓ Firewalls
✓ Virtual private networks
• Mobile security
✓ Geolocation software
✓ Remote data removal software
• Web security
✓ Cyber security
✓ Technologies
✓ Web threats
✓ Defence strategies
2. Understand the Software Development Process
• Software Development Lifecycle
• Software Development Methodologies
✓ Waterfall
✓ Spiral
✓ Rapid Application Development
✓ Agile Development
• Modeling techniques
✓ Data Flow Diagrams
✓ Entity Relation Diagrams
✓ UML diagrams
• Creation of models for given scenarios
3. Demonstrate Human Computer Interaction Principles
Human Computer Interaction
Definition
Role of interaction design
Interaction styles
Interaction elements
Mistakes in interaction design
• Interface design principles
• Prescribing interaction choices and recognition of interaction flaws
4. Understand the VB.NET programming environment
The .Net framework
Applications supported
Components of the .Net framework
Installation of Visual Studio
Features of VB.Net
The Integrated Development Environment (IDE)
Definition of IDE
Parts of VB.Net IDE
VB.Net program structure
VB.NET syntax
Namespace declaration
Class or module
Procedures
Data types, variables,
constants
The Main procedure
Statements and Expressions (Variable declarations, operations, control statements)
Comments
Creating aVB.Net project
Saving Forms and Project
Compiling a Project
5. Develop and test a VB.NET application
Basic VB.Net Controls
Controls and their purpose
Standard naming conventions for controls
Elements of a control
Properties
Methods
Events
Demonstrating Properties, Methods and Events
Properties for basic controls
Setting properties at design time and run time
Methods for basic controls
Events for basic controls
Demonstrating event handling
Mouse events
Keyboard events
Designing VB.NET form using HCI principles
Connection of VB.Net applications to a database
ADO.Net object model
Demonstrating Database connection using the Data Provider
Demonstrating creation of tables using Dataset components
Deployment of VB.Net applications
Purpose deployment
Demonstrating deployment steps
References
a. Programming with visual basic 2017 8th Edition by Diane Zak
b. An Introduction to Programming Using Visual Basic. Eleventh Edition by David I. Schneider
c. VB.NET Programming by H. M. Deitel
d. Microsoft Docs: Visual Basic .NET
Learning Outcome 1: Understand fundamentals of
Information Systems
Introduction:
This learning outcome covers describing the components of information systems, outlining types of
information systems, explaining emerging trends in information systems and recommending
Information systems for different scenarios
Information systems
Information systems are the combination of people, information technology, and business processes to
accomplish a business objective.
ix). Web security: Web security is mainly security of web applications such as websites, and web
information systems from attacks and intrusions.
Cyber security
Cyber security is the practice of defending computers, servers, mobile devices, electronic systems, networks,
and data from malicious attacks. It's also known as information technology security or electronic
information security
Web threats
The threats countered by cyber-security are three-fold:
Cybercrime includes single actors or groups targeting systems for financial gain or to cause disruption.
Cyber-attack often involves politically motivated information gathering.
Cyber-terrorism is intended to undermine electronic systems to cause panic or fear.
Defence strategies
Cyber safety tips - protect yourself against cyber attacks
Businesses and individuals ought to take guard against cyber threats. The following are some cyber safety
tips:
Update your software and operating system: This means you benefit from the latest security
patches.
Use anti-virus software: Security solutions like Kaspersky Total Security will detect and removes
threats. Keep your software updated for the best level of protection.
Use strong passwords: Ensure your passwords are not easily guessable.
Do not open email attachments from unknown senders: These could be infected with malware.
Do not click on links in emails from unknown senders or unfamiliar websites: This is a common
way that malware is spread.
Avoid using unsecured Wi-Fi networks in public places: Unsecure networks leave you vulnerable
to man-in-the-middle attacks.
Conclusion
At the end of this learning outcome, the trainee should be able to describe the components of information
systems, outline types of information systems, explain emerging trends in information systems and
recommend information systems for different scenarios
Further reading
Information systems for business and beyond: A look at the technology, people, and processes of
information systems; 2014 -by David T. Bourgeois, Ph.D. and Bourgeois
Assessment
a) What are the five components that make up an information system?
b) What are three examples of information system hardware?
c) Microsoft Windows is an example of which component of information systems?
d) What roles do people play in information systems?
Oral assessment
a) Outline types of information systems
b) What is a database in the context of Information Systems?
c) What does the term authentication mean?
Practical assessment
a) Research on business application areas of the various types of information systems and indicate their
benefits
References
https://saylordotorg.github.io/text_business-information-systems-design-an-app-for-that/index.html
https://edugeneral.org/blog/business/types-of-information-systems/
SDLC waterfall
b. User Design. In this phase, representatives of the users work with the system analysts, designers, and
programmers to interactively create the design of the system. One technique for working with all of
these various stakeholders is the so-called JAD session. JAD is an acronym for joint application
development. A JAD session gets all of the stakeholders together to have a structured discussion
about the design of the system. Application developers also sit in on this meeting and observe, trying
to understand the essence of the requirements.
c. Construction. In the construction phase, the application developers, working with the users, build
the next version of the system. This is an interactive process, and changes can be made as developers
are working on the program. This step is executed in parallel with the User Design step in an
iterative fashion, until an acceptable version of the product is developed.
d. Cutover. In this step, which is similar to the implementation step of the SDLC, the system goes live.
All steps required to move from the previous state to the use of the new system are completed here.
Figure 1:The RAD methodology
3. Agile Methodologies
Agile methodologies are a group of methodologies that utilize incremental changes with a focus on quality
and attention to detail. Each increment is released in a specified period of time (called a time box), creating a
regular release schedule with very specific objectives. While considered a separate methodology from RAD,
they share some of the same principles: iterative development, user interaction, ability to change. The agile
methodologies are based on the “Agile Manifesto,” first released in 2001.
The characteristics of agile methods include:
i) small cross-functional teams that include development-team members and users;
ii) daily status meetings to discuss the current state of the project;
iii) short time-frame increments (from days to one or two weeks) for each change to be completed;
iv) and at the end of each iteration, a working project is completed to demonstrate to the
stakeholders.
The goal of the agile methodologies is to provide the flexibility of an iterative approach while
ensuring a quality product.
Modeling techniques
Models are forms of description often adopted in software development. They are abstractions used to
represent and communicate what is important, devoid of unnecessary detail, and to help developers deal
with the complexity of the problem being investigated or the solution being developed.
a) Data Flow Diagrams (DFD)
DFD graphically representing the functions, or processes, which capture, manipulate, store, and distribute
data between a system and its environment and between components of a system.
The visual representation makes it a good communication tool between User and System designer. Structure
of DFD allows starting from a broad overview and expand it to a hierarchy of detailed diagrams. DFD has
often been used due to the following reasons:
i) Logical information flow of the system
ii) Determination of physical system construction requirements
iii) Simplicity of notation
iv) Establishment of manual and automated systems requirements
ii) Data flow: A data-flow is a path for data to move from one part of the information system to
another. A data-flow may represent a single data element such as the Customer ID or it can represent
a set of data element (or a data structure).
Example:
Customer_info (LastName, FirstName, SS#, Tel #, etc.)
Order_info (OrderId, Item#, OrderDate, CustomerID, etc.)
Notation: Straight lines with incoming arrows are input data flow; Straight lines with outgoing
arrows are output data flows
iii) Data Store: A data store or data repository is used in a data-flow diagram to represent a situation
when the system must retain data because one or more processes need to use the stored data in a later
time.
Notation: Data can be written into the data store, which is depicted by an outgoing arrow; Data can
be read from a data store, which is depicted by an incoming arrow.
Examples are: inventory, Accounts receivables, Orders, and Daily Payments.
iv) External Entity: An external entity is a person, department, outside organization, or other
information system that provides data to the system or receives outputs from the system. External
entities are components outside of the boundaries of the information systems. They represent how
the information system interacts with the outside world.
A rectangle represents an external entity; They either supply data or receive data; They do not
process data
Notation: A customer submitting an order and then receive a bill from the system; A vendor issue an
invoice
ii) Actions, which are represented by diamond shapes, show how two entities share information in the
database.
In some cases, entities can be self-linked. For example, employees can supervise other employees.
iii) Attributes, which are represented by ovals. A key attribute is the unique, distinguishing
characteristic of the entity. For example, an employee's social security number might be the
employee's key attribute.
iv) Connecting lines, solid lines that connect attributes to show the relationships of entities in the
diagram.
v) Cardinality specifies how many instances of an entity relate to one instance of another entity.
Ordinality is also closely linked to cardinality. While cardinality specifies the occurrences of a
relationship, ordinality describes the relationship as either mandatory or optional. In other words,
cardinality specifies the maximum number of relationships and ordinality specifies the absolute
minimum number of relationships.
Chen Style:
Information Engineering Style:
CASE tools can be grouped together if they have similar functionality, process activities and capability of
getting integrated with other tools.
Scope of Case Tools
The scope of CASE tools goes throughout the SDLC.
Documentation tools generate documents for technical users and end users. Technical users are mostly in-
house professionals of the development team who refer to system manual, reference manual, training
manual, installation manuals etc. The end user documents describe the functioning and how-to of the system
such as user manual. For example, Doxygen, DrExplain, Adobe RoboHelp for documentation.
iv) Analysis Tools
These tools help to gather requirements, automatically check for any inconsistency, inaccuracy in the
diagrams, data redundancies or erroneous omissions. For example, Accept 360, Accompa, CaseComplete for
requirement analysis, Visible Analyst for total analysis.
v) Design Tools
These tools help software designers to design the block structure of the software, which may further be
broken down in smaller modules using refinement techniques. These tools provides detailing of each module
and interconnections among modules. For example, Animated Software Design
Conclusion
At the end of the learning outcome, the trainee should be able to explain the software development life cycle
and software development methodologies and demonstrate modeling techniques using CASE tools.
Further reading
https://bus206.pressbooks.com/chapter/chapter-10-information-systems-development/
Assessment
Written assessment
1. Explain Software Development Life Cycle
2. What is RAD software development?
3. State at least 4 rules of data flows in a DFD
4. What is a CASE tool?
5. Why is information systems modeling important?
Oral assessment
1. Explain Software Development Methodologies
2. Explain all the symbols in a DFD
Practical assessment
Install Star UML software
Demonstrate the various UML diagrams, indicating the scenarios that call for each diagram.
References
Sommerville, Software Engineering, 9th ed, Addison Wesley, 2011
https://www.visual-paradigm.com/guide/data-flow-diagram/what-is-data-flow-diagram/
3: Demonstrate Human Computer Interaction Principles
Introduction
This learning outcome covers explaining the Human Computer Interaction and interaction design principles
and demonstrating interface design using a design software.
v) 5D: Behaviour
This includes the mechanism of a product: how do users perform actions on the website? How do users
operate the product? In other words, it’s how the previous dimensions define the interactions of a product. It
also includes the reactions—for instance emotional responses or feedback—of users and the product.
3. Axure
Runs on OS X, Windows
Prototypes for: All OS’s
Conclusion
At the end of the learning outcome, the trainee should be able to explain the Human Computer Interaction
and interaction design principles and demonstrate interface design using a design software.
Further reading
https://www.interaction-design.org/literature/book/the-encyclopedia-of-human-computer-interaction-2nd-
ed/human-computer-interaction-brief-intro
Assessment
Written assessment
- Explain possible mistakes in interaction design
- What is HCI?
- Why is consistency important in interface design?
- How should the naturalness principle apply in interface design?
- What range of computer users should HCI design cover?
Oral assessment
How should HCI design cover the needs of special users such as children and the physically challenged?
Practical assessment
1. Install a UI/UX design software
2. Demonstrate interface interaction design using the design software
References
Grudin, J. (2012) A Moving Target: The evolution of Human-computer Interaction. In J. Jacko (Ed.),
Human-computer interaction handbook: Fundamentals, evolving technologies, and emerging applications.
(3rd edition). Taylor & Francis
Human–Computer Interaction: Fundamentals and Practice by Gerard Jounghyun Kim; ISBN 978-1-4822-
3389-6
https://asktog.com/atc/principles-of-interaction-design/
4. Understand the VB.NET programming environment
Introduction
This learning outcome covers explaining the .NET framework, installing Visual Studio, outlining features of
VB.NET, explaining the VB.NET IDE environment, explaining VB.NET program structure and creating
and compiling a VB.NET project
Before you start learning more about VB.NET programming, it is important to understand the development
environment and identify some of the frequently using programming tools in Visual Studio IDE.
Visual Studio IDE
1. Menu Bar
2. Standard Toolbar
3. Toolbox
4. Forms Designer
5. Output Window
6. Solution Explorer
7. Properties Window
Visual Basic.NET IDE is built out of a collection of different windows. Some windows are used for writing
code, some for designing interfaces, and others for getting a general overview of files or classes in your
application.
Visual Studio organizes your work in projects and solutions. A solution can contain more than one project,
such as a DLL and an executable that references that DLL. From the following chapters you will learn how
to use these Visual Studio features for your programming needs.
VB.NET Program Structure
A VB.Net program basically consists of the following parts −
Namespace declaration
A class or module
One or more procedures
Variables
The Main procedure
Statements & Expressions
Comments
Let us look at a simple code that would print the words "Hello World"
Imports System
Module Module1
'This program will display Hello World
Sub Main()
Console.WriteLine("Hello World")
Console.ReadKey()
End Sub
End Module
When the above code is compiled and executed, it produces the following result −
Hello, World!
You can compile a VB.Net program by using the command line instead of the Visual Studio IDE −
– Open a text editor and add the above mentioned code.
– Save the file as helloworld.vb
– Open the command prompt tool and go to the directory where you saved the file.
– Type vbc helloworld.vb and press enter to compile your code.
– If there are no errors in your code the command prompt will take you to the next line and would
generate helloworld.exe executable file.
– Next, type helloworld to execute your program.
– You will be able to see "Hello World" printed on the screen.
Let us look at an implementation of a Rectangle class and discuss VB.Net basic syntax on the basis of our
observations in it −
Imports System
Public Class Rectangle
Private length As Double
Private width As Double
'Public methods
Public Sub AcceptDetails()
length = 4.5
width = 3.5
End Sub
Public Function GetArea() As Double
GetArea = length * width
End Function
Public Sub Display()
Console.WriteLine("Length: {0}", length)
Console.WriteLine("Width: {0}", width)
Console.WriteLine("Area: {0}", GetArea())
End Sub
Shared Sub Main()
Dim r As New Rectangle()
r.Acceptdetails()
r.Display()
Console.ReadLine()
End Sub
End Class
When the above code is compiled and executed, it produces the following result −
Length: 4.5
Width: 3.5
Area: 15.75
Sub Main indicates the entry point of VB.Net program. Here, we are using Class that contains both code and
data. You use classes to create objects. For example, in the code, r is a Rectangle object.
Shared methods or static methods can be invoked without creating an object of the class. Instance methods
are invoked through an object of the class −
Shared Sub Main ()
Dim r As New Rectangle ()
r.Acceptdetails()
r.Display()
Console.ReadLine()
End Sub
You may also change the .net framework that you are targeting on the middle top part of the “New Project”
screen. However, the default .net Framework 2.0 should work for light-weight programs.
At the bottom, you will see a textbox for naming your project; just use a self-descriptive name like
‘MyFirstApp’. Also, you need to select a folder where your project’s file will be saved. The solution name
will be filled by default and you can leave it that way. Then click ‘OK’ to start the new project.
Windows Forms
VB.Net programmers have made extensive use of forms to build user interfaces. Each time you create a
Windows application, Visual Studio will display a default blank form, onto which you can drag and drop
controls from the Visual Studio Toolbox window.
The first step is to start a new project and build a form. Open your Visual Studio and select File-
>NewProject and select Visual Basic from the New project dialog box and select Windows Forms
Application. Enter your project name instead of WindowsApplication1 in the bottom of the dialog box and
click OK button. The following picture shows how to create a new Form in Visual Studio.
Select project type from New project dialog Box.
When you add a Windows Form to your project, many of the forms properties are set by default. Although
these values are convenient, they will not always suit your programming needs. The following picture shows
what the default Form looks like.
At the top of the form there is a title bar which displays the forms title. Form1 is the default name, you can
change the name to your convenience . The title bar also includes the control box, which holds the minimize,
maximize, and close buttons.
If you want to set any properties of the Form, you can use Visual Studio Property window to change it.
Conclusion
At the end of the learning outcome, the trainee should be able to explain the .NET framework, install Visual
Studio, outline features of VB.NET, explain the VB.NET IDE environment, explain the VB.NET program
structure and create and compile a VB.NET project
Further reading
https://www.tutorialspoint.com/vb.net/
Assessment
Written assessment
1) What are the components of the VB.NET IDE environment?
2) What is namespace?
3) Which data types does VB.NET support?
4) What is the role of a method in a VB.NET program
5) When is “new” keyword used in a VB.NET program?
Oral assessment
What are the .Net framework components?
Practical assessment
1. Write and compile VB.NET code to declare a variable to store the age of a person.
Then the output of the program is as an example shown below:
You are 20 years old.
2. Write VB.NET code to prompt a user to input his/her name and then the output will be shown as shown in
the example below:
Hello John!
References
https://visualstudio.microsoft.com/
http://vb.net-informations.com/gui/vb.net_vside.htm
http://vb.net-informations.com/gui/windows_forms.htm
5. Develop and test a VB.NET application
Introduction
This learning outcome covers outlining Basic VB.Net Controls, explaining elements of a control,
demonstrating basic VB.Net Controls’ Properties, Methods and Events event handling and forms design
using HCI principles and connection of VB.Net applications to a database.
VB.Net - Basic Controls
An object is a type of user interface element you create on a Visual Basic form by using a toolbox control. In
fact, in Visual Basic, the form itself is an object. Every Visual
Elements of a control
Basic control consists of three important elements −
Properties which describe the object,
Methods cause an object to do something and
Events are what happens when an object does something.
Control Properties
All the Visual Basic Objects can be moved, resized or customized by setting their properties. A property is a
value or characteristic held by a Visual Basic object, such as Caption or Fore Color.
Properties can be set at design time by using the Properties window or at run time by using statements in
the program code. Object.Property=Value
Where
Object is the name of the object you're customizing.
Property is the characteristic you want to change.
Value is the new property setting.
If you are using a control such as one of those provided by the Toolbox, you can call any of its public
methods. The requirements of such a method depend on the class being used.
If none of the existing methods can perform your desired task, you can add a method to a class.
For example, the MessageBox control has a method named Show, which is called in the code snippet below
Control Events
An event is a signal that informs an application that something important has occurred. For example, when a
user clicks a control on a form, the form can raise a Click event and call a procedure that handles the event.
There are various types of events associated with a Form like click, double click, close, load, resize, etc.
Following is the default structure of a form Load event handler subroutine. You can see this code by double
clicking the code which will give you a complete list of the all events associated with Form control −
Here, Handles MyBase.Load indicates that Form1_Load() subroutine handles Load event. Similar way, you
can check stub code for click, double click. If you want to initialize some variables like properties, etc., then
you will keep such code inside Form1_Load() subroutine. Here, important point to note is the name of the
event handler, which is by default Form1_Load, but you can change this name based on your naming
convention you use in your application programming.
Form Design Using Basic Controls
VB.Net provides a huge variety of controls that help you to create rich user interface. Functionalities of all
these controls are defined in the respective control classes. The control classes are defined in the
System.Windows.Forms namespace.
Event Handling
Events are basically a user action like key press, clicks, mouse movements, etc., or some occurrence like
system generated notifications. Applications need to respond to events when they occur.
Clicking on a button, or entering some text in a text box, or clicking on a menu item, all are examples of
events. An event is an action that calls a function or may cause another event. Event handlers are functions
that tell how to respond to an event.
VB.Net is an event-driven language. There are mainly two types of events −
Mouse events
Keyboard events
The event handlers of the mouse events get an argument of type MouseEventArgs. The MouseEventArgs
object is used for handling mouse events. It has the following properties −
Buttons − indicates the mouse button pressed
Clicks − indicates the number of clicks
Delta − indicates the number of detents the mouse wheel rotated
X − indicates the x-coordinate of mouse click
Y − indicates the y-coordinate of mouse click
Example:
Following is an example, which shows how to handle mouse events. Take the following steps −
Add three labels, three text boxes and a button control in the form.
Change the text properties of the labels to - Customer ID, Name and Address, respectively.
Change the name properties of the text boxes to txtID, txtName and txtAddress, respectively.
Change the text property of the button to 'Submit'.
Add the following code in the code editor window −
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles
MyBase.Load
' Set the caption bar text of the form.
Me.Text = "tutorialspont.com"
End Sub
The event handlers of the KeyDown and KeyUp events get an argument of type KeyEventArgs. This object
has the following properties −
Alt − it indicates whether the ALT key is pressed
Control − it indicates whether the CTRL key is pressed
Handled − it indicates whether the event is handled
KeyCode − stores the keyboard code for the event
KeyData − stores the keyboard data for the event
KeyValue − stores the keyboard value for the event
Modifiers − it indicates which modifier keys (Ctrl, Shift, and/or Alt) are pressed
Shift − it indicates if the Shift key is pressed
The event handlers of the KeyDown and KeyUp events get an argument of type KeyEventArgs. This object
has the following properties −
Handled − indicates if the KeyPress event is handled
KeyChar − stores the character corresponding to the key pressed
Example
Let us continue with the previous example to show how to handle keyboard events. The code will verify that
the user enters some numbers for his customer ID and age.
Add a label with text Property as 'Age' and add a corresponding text box named txtAge.
Add the following codes for handling the KeyUP events of the text box txtID.
Data Provider
A data provider is used for connecting to a database, executing commands and retrieving data, storing it in a
dataset, reading the retrieved data and updating the database.
The data provider in ADO.Net consists of the following four objects −
1 Connection
This component is used to set up a connection with a data source.
2 Command
A command is a SQL statement or a stored procedure used to retrieve, insert,
delete or modify data in a data source.
3 DataReader
Data reader is used to retrieve data from a data source in a read-only and forward-
only mode.
4 DataAdapter
This is integral to the working of ADO.Net since data is transferred to and from a
database through a data adapter. It retrieves data from a database into a dataset and
updates the database. When changes are made to the dataset, the changes in the
database are actually done by the data adapter.
DataSet
DataSet is an in-memory representation of data. It is a disconnected, cached set of records that are retrieved
from a database. When a connection is established with the database, the data adapter creates a dataset and
stores data in it. After the data is retrieved and stored in a dataset, the connection with the database is closed.
This is called the 'disconnected architecture'. The dataset works as a virtual database containing tables, rows,
and columns.
The following diagram shows the dataset object model −
VB.NET DataSet objects
The DataSet class is present in the System.Data namespace. The following table describes all the
components of DataSet −
1 DataTableCollection
It contains all the tables retrieved from the data source.
2 DataRelationCollection
It contains relationships and the links between tables in a data set.
3 ExtendedProperties
It contains additional information, like the SQL statement for retrieving data, time
of retrieval, etc.
4 DataTable
It represents a table in the DataTableCollection of a dataset. It consists of the
DataRow and DataColumn objects. The DataTable objects are case-sensitive.
5 DataRelation
It represents a relationship in the DataRelationshipCollection of the dataset. It is
used to relate two DataTable objects to each other through the DataColumn
objects.
6 DataRowCollection
It contains all the rows in a DataTable.
7 DataView
It represents a fixed customized view of a DataTable for sorting, filtering,
searching, editing and navigation.
8 PrimaryKey
It represents the column that uniquely identifies a row in a DataTable.
9 DataRow
It represents a row in the DataTable. The DataRow object and its properties and
methods are used to retrieve, evaluate, insert, delete, and update values in the
DataTable. The NewRow method is used to create a new row and the Add method
adds a row to the table.
10 DataColumnCollection
It represents all the columns in a DataTable.
11 DataColumn
It consists of the number of columns that comprise a DataTable.
Connecting to a Database
The .Net Framework provides two types of Connection classes −
SqlConnection − designed for connecting to Microsoft SQL Server.
OleDbConnection − designed for connecting to a wide range of databases, like Microsoft Access and
Oracle.
Example 1
We have a table stored in Microsoft SQL Server, named Customers, in a database named testDB. Please
consult 'SQL Server' tutorial for creating databases and database tables in SQL Server.
Let us connect to this database. Take the following steps −
Select TOOLS → Connect to Database
Select a server name and the database name in the Add Connection dialog box.
Choose the database object, Customers table in our example, and click the Finish button.
Select the Preview Data link to see the data in the Results grid −
When the application is run using Start button available at the Microsoft Visual Studio tool bar, it will show
the following window −
Example 2
In this example, let us access data in a DataGridView control using code. Take the following steps −
Add a DataGridView control and a button in the form.
Change the text of the button control to 'Fill'.
Double click the button control to add the required code for the Click event of the button, as shown
below −
Imports System.Data.SqlClient
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) _
Handles MyBase.Load
'TODO: This line of code loads data into the
'TestDBDataSet.CUSTOMERS' table.
You can move, or remove it, as needed.
Me.CUSTOMERSTableAdapter.Fill(Me.TestDBDataSet.CUSTOMERS)
' Set the caption bar text of the form.
Me.Text = "VB.NET "
End Sub
Example 3
So far, we have used tables and databases already existing in our computer. In this example, we will create a
table, add columns, rows and data into it and display the table using a DataGridView object.
Take the following steps −
Add a DataGridView control and a button in the form.
Change the text of the button control to 'Fill'.
Add the following code in the code editor.
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles
MyBase.Load
' Set the caption bar text of the form.
Me.Text = "tutorialspont.com"
End Sub
4. Build the Setup project to create the installer (Setup.exe and related files). Note that you build a
Setup project in the same way that you build a Windows Application project.
5. Test the Setup project on the local computer.
6. Distribute the Setup.exe program and any necessary files to the end user via removable media, the
Internet, or a company intranet.
Conclusion
At the end of the learning outcome, the trainee should be able to demonstrate basic VB.Net basic controls’
properties, methods and events, event handling, connection of VB.Net applications to a database and
deployment of VB.NET applications.
Further reading
https://www.tutorialspoint.com/vb.net
Assessment
Written assessment
Outline Basic VB.Net Controls
Explain Elements of a control
What are the standard naming conventions for controls
What is an event handler?
Why does a VB.NET application require deployment?
Oral Assessment
Outline the steps of connecting a VB.NET application to a database
Practical Assessment
Develop a simple VB.NET application to capture a student’s details. Using it demonstrate simple but
useful event handling, database connectivity and deployment.