Name: Fermin Martinez
In-Class Work: Programming Logic Assignment 2
Complete the following problems. You may discuss this assignment with your classmates
but need to complete the assignment individually. Upload this document with your
answers to Canvas.
VB Express 2010
Practice Selection Exercise
Write a selection statement that does the following:
Presidents award for GPAs of 4.0
Deans award for GPAs of 3.5 or higher
Excellence award for GPAs of 3.0 or higher
Programming Review - P2
Selection Review: Whats unnecessary?
If income < 20K then
tax = .05
Elseif income >=20K and <50K then
tax = .10
Elseif income >=50K then
tax = .15
If income < 20K then
tax = .05
Else if inc
Basic Programming Review
Control structures, pseudo code
arithmetic operators, data types,
Stuff To Do
Finish forming teams today
Complete Access 2007 by Class
What is pseudocode?
What is its purpose?
What kind o
Imports Excel = Microsoft.Office.Interop.Excel
Private Sub btnExtract_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnExtract.Click
Dim RowsCount A
Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGo.Click
If txtSearch.Text = " Then
DataGridView.DataSource = DSReturn("SELECT StudentEmail as StudentEmail, SFirstName as
Private Sub ButtonSignIn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles ButtonSignIn.Click
'check student database for email(username) and password correlation
Dim SQL As String = "SELECT [Student Table].[StudentID], [Student
So the first group is labeled A. The TypeOf is looking at the value thats assigned to the text of the radio button.
The DirectCast is pulling the text of the radio button and then will show it in the LabelA area at the bottom. In
this case we are having i
Fixing the directory path name if you move or rename your project folder:
Open up Visual Basic Program
Solution Explorer > Double click app.config to view the auto-generated code
There are two methods to resolve the invalid directory error.
Primary Keys, Foreign
Keys, Relationships and
Creating a Table - Review
Create a new Access database
Create 1 table for a library to track its movies
with the following fields
This code checks if the password is meeting the character length requirement
as well as if the password matches with confirm password. This particular code
uses validation method. Everytime the user moves away from
The code below will allow you to use queries you building with the Table
Adapters to return values directly to the calling code. This code
specifically, takes the userID and User Password from textboxes on the form
and then passes the userid to a fillby m
Extra Credit Challenge
Users whose form code has been deleted from their Form.vb file are unable to view the form
design view. The option doesnt appear on any menu, and thus cannot be viewed, even if there is
an associated Form.Designer.vb file as
DataGridView as a cleaner alternative to Listview for presenting data:
Add a DataGridView to your form and leave it without a data source.
Add columns to the DataGridView by clicking on it, and then the edit columns link bellow the properties box on
How to write insert and update queries
Update queries are used to change fields of a particular record that already exists. For example,
changing what Major a student is. To do this, a new query needs to be added to whatever table is
going to be ef
Connecting to an Access database
Adding a database: use the Data Source window: data->show data sources->add new
Select Database then Next-> New Connection->Change and select Access file
Browse for your file -> test connection -> okay-> NO
User Friendly Feature
A time saving feature for users is to combine the use of
CheckedChanged event with the text box focus event when working
with radio buttons.
When working with search criteria, a radio button can be used to select which
Simple Queries and
What is a query?
Why are they helpful?
What are some different things you can do with
What are the query results called?
What are calculated fields?
Lets open the Students Database
What are the pa
Querying Multiple Tables
and Table Operations
Lets get started
Download Discussion 11 database and
Save the folder to your desktop and extract it
Open the Shares database
Create a new query, add your tabl
Connecting VB to a
Download the AddressBookDB2007.accdb thats
in the in-class exercises for Discussion 12 folder
under unit 5
Create a new project
And the IDEs Data Sources window to connect
to a database (y
More on working with
Make sure everyone in your group has a copy of
your finalized course database on their
desktops. If you dont have it Ive provided an
example on D2L
IF thats a problem, use the provided datab
Procedures and Scope
What is a procedure?
Whats another name for a procedure in OO
How should we name procedures?
What is the different between a function and a
Social Network Privacy?
Social Network Privacy?
What you are about to learn is very scary
Common Hacking Techniques
A software robot or bot that can be con
The Cost of Security and Compliance
The cost of dealing with a data breach
rose nearly $7 million per incident in the
SPAM cost U.S. businesses $42 billion
this year. $17 billion in lost produ
1. Write the pseudo-code for an if-then statement that determines the appropriate tax rate
for a given annual income level. Use the income tax guide below.
Under $20,000 = 2% income tax
$20,000 - $50,000 = 5% income tax
$50,001 - $75,000 = 10% income tax
The Windows Vista 64 Bit edition has compatibility issues with many different software
programs. Visual basic express is not compatible with this version of Vista when you try to
incorporate Access 2007 with Visual Basic Express 2008.
Extra Credit: Connecting to the database without using drag-drop TableAdapter.
The picture below is showing that I am connecting to the database without using drag-drop Table Adapter.
The code below is exactly what we have done in class except two changes
*PASSWORD LENGTH VALIDATION FOR REGISTRATION PAGE*
This code checks for whether or not the password entered in by the user is meeting
the character length requirement. This code is also embedded with a MessageBox
within the actual code, so that when the p
Auto Validation, KeyPress Validation and Input Mask Validation
Contact Auto-Validation For Registration Page(s)
The txtContact TextBox is must have a ( then any 3 numbers, followed by another
), a space, any three numbers, a dash and then any four numbers
The explosion of digital information and proliferation of communication systems have transformed the
way digital information is stored and managed. From this transformation has arisen the concept of
Information Assurance (IA) - the p
San Jos State University
Bus 110A, Fundamentals of MIS, Spring 2016
Course and Contact Information
All office hours are virt
Insert Query Help
Below is an example of how to build and call and Insert Query. The example is from the Registration From in
an Electronic Library project. However, the process is the same for any Insert Query.
In order to insert a new LibraryMember reco
The code below shows how to check to see if a specific record already exists
in a table. You can use adaptations of this code to check to see if a user is
already registered as a Library Member, to see if a library resource is in the
library collection, t