Visual Basic for the Approved Workman
()
About this ebook
Drawing from many years of professional software development and teaching experience, I prepared an innovative text that presents the Visual Basic language in a simple, yet powerful way, at the same time integrating Biblical perspective.
Few textbooks address the simplicity of Visual Basic, many are unable to address the complexity of real-world systems, and few if any have attempted to integrate faith with content to prepare students and new programmers for the workplace. This textbook has three goals. The first is to arm the Christian student with Scripture compatible with business-oriented programming, that they may be able witnesses for Christ. The second is to present Visual Basic in all its simplicity, that it may be a joy to use. The third is to present a realistic prototype system so students can be prepared for good works in their business endeavors. Software applications illustrating major concepts in each chapter are available electronically via a link in the text. These can be used as is, or tailored to suit a variety of information processing applications.
Having started using BASIC in the late 1970s, then Visual Basic in the 1990s before Visual Studio existed, then Visual Studio first with C++ and now C# and VB, it has been my experience that computer languages are both similar and consistent in what they accomplish on all varieties of computer platforms. Visual Studio was used to test all code. Be sure to reference the latest Visual Basic language reference, along with product manuals for your specific version of Visual Studio, as you add to your knowledge where the text leaves off.
I have found it a great joy to develop this text under the influence and leading of the Holy Spirit of God, and count it a privilege to present it to you.
Also be sure to check out my latest inspirational book "Becoming an Approved Workman".
Wesley Sweetser, Jr
I have over 40 years experience in the private sector and government developing software and databases and managing projects and teaching. I "retired" in 2018 and continue working in Florida, glorifying God, doing home remodeling, publishing three programming eBooks in the Approved Workman series, along with finding work at a local college. God is good! May God bless you as you serve him.
Read more from Wesley Sweetser, Jr
COBOL for the Approved Workman Rating: 0 out of 5 stars0 ratingsC# for the Approved Workman Rating: 0 out of 5 stars0 ratingsSic Transit Gloria Mundi Rating: 0 out of 5 stars0 ratings
Related to Visual Basic for the Approved Workman
Related ebooks
Beginning Visual Basic 2010 Rating: 0 out of 5 stars0 ratingsC# For Beginners: An Introduction to C# Programming with Tutorials and Hands-On Examples Rating: 5 out of 5 stars5/5ASP.NET 3.5 CMS Development Rating: 0 out of 5 stars0 ratingsPHP MySQL Development of Login Modul: 3 hours Easy Guide Rating: 5 out of 5 stars5/5Visual Basic 2010 Coding Briefs Data Access Rating: 5 out of 5 stars5/5Beginning PHP: Master the latest features of PHP 7 and fully embrace modern PHP development Rating: 0 out of 5 stars0 ratings(Part 1) You Must Learn VBScript for QTP/UFT: Don't Ignore The Language For Functional Automation Testing Rating: 5 out of 5 stars5/5Learn Professional Programming in .Net Using C#, Visual Basic, and Asp.Net Rating: 0 out of 5 stars0 ratingsVisual Studio VS The Ultimate Step-By-Step Guide Rating: 0 out of 5 stars0 ratingsIntroduction to Programming Languages Rating: 4 out of 5 stars4/5Pivot Tables for everyone. From simple tables to Power-Pivot: Useful guide for creating Pivot Tables in Excel Rating: 0 out of 5 stars0 ratingsSQLite Database Programming for Xamarin: Cross-platform C# database development for iOS and Android using SQLite.XM Rating: 0 out of 5 stars0 ratingsStart-to-Finish Visual C# 2015 Rating: 5 out of 5 stars5/5Ajax in One Hour, For Beginners, Learn Coding Fast Rating: 0 out of 5 stars0 ratingsPython Programming for Beginners Rating: 3 out of 5 stars3/5C# Programming from Zero to Proficiency (Beginner): C# from Zero to Proficiency, #2 Rating: 0 out of 5 stars0 ratingsSimultaneous multithreading A Complete Guide Rating: 0 out of 5 stars0 ratingsIntroduction to PHP, Part 1, Second Edition Rating: 0 out of 5 stars0 ratingsHTML, XHTML & CSS QuickSteps Rating: 0 out of 5 stars0 ratingsSQL Database Programming: The Ultimate Guide to Learning SQL Database Programming Fast! Rating: 0 out of 5 stars0 ratingsMastering HTML and CSS for Modern Development Rating: 0 out of 5 stars0 ratingsHow to Learn PHP, MySQL and Javascript Quickly!: For Dummies Rating: 5 out of 5 stars5/5Basics of Programming: A Comprehensive Guide for Beginners: Essential Coputer Skills, #1 Rating: 0 out of 5 stars0 ratingsJavaScript: Best Practices to Programming Code with JavaScript: JavaScript Computer Programming, #3 Rating: 0 out of 5 stars0 ratingsAccess 2021 / Microsoft 365 Programming by Example: Mastering VBA for Data Management and Automation Rating: 0 out of 5 stars0 ratingsSuperBASIC: The Manual Rating: 0 out of 5 stars0 ratingsClient Side Web Development For Beginners (HTML/CSS/JS) Rating: 4 out of 5 stars4/5
Christianity For You
Boundaries Updated and Expanded Edition: When to Say Yes, How to Say No To Take Control of Your Life Rating: 4 out of 5 stars4/5The 21 Irrefutable Laws of Leadership: Follow Them and People Will Follow You Rating: 4 out of 5 stars4/5Mere Christianity Rating: 4 out of 5 stars4/5Law of Connection: Lesson 10 from The 21 Irrefutable Laws of Leadership Rating: 4 out of 5 stars4/5The 5 Love Languages: The Secret to Love that Lasts Rating: 4 out of 5 stars4/5How to Read the Bible for All Its Worth: Fourth Edition Rating: 4 out of 5 stars4/5How to Lead When You're Not in Charge: Leveraging Influence When You Lack Authority Rating: 4 out of 5 stars4/5The Bible Recap: A One-Year Guide to Reading and Understanding the Entire Bible Rating: 5 out of 5 stars5/5The Screwtape Letters Rating: 4 out of 5 stars4/5Unoffendable: How Just One Change Can Make All of Life Better (updated with two new chapters) Rating: 4 out of 5 stars4/5Decluttering at the Speed of Life: Winning Your Never-Ending Battle with Stuff Rating: 4 out of 5 stars4/5Present Over Perfect: Leaving Behind Frantic for a Simpler, More Soulful Way of Living Rating: 4 out of 5 stars4/5The Good Girl's Guide to Great Sex: Creating a Marriage That's Both Holy and Hot Rating: 4 out of 5 stars4/5The Four Loves Rating: 4 out of 5 stars4/5Anxious for Nothing: Finding Calm in a Chaotic World Rating: 4 out of 5 stars4/5Good Boundaries and Goodbyes: Loving Others Without Losing the Best of Who You Are Rating: 4 out of 5 stars4/5The Book of Enoch Rating: 4 out of 5 stars4/5NIV, Holy Bible Rating: 4 out of 5 stars4/5Girl, Wash Your Face: Stop Believing the Lies About Who You Are so You Can Become Who You Were Meant to Be Rating: 3 out of 5 stars3/5Uninvited: Living Loved When You Feel Less Than, Left Out, and Lonely Rating: 4 out of 5 stars4/5The Purpose Driven Life: What on Earth Am I Here For? Rating: 4 out of 5 stars4/5Wild at Heart Expanded Edition: Discovering the Secret of a Man's Soul Rating: 4 out of 5 stars4/5The Pursuit of God with Study Guide: The Human Thirst for the Divine Rating: 4 out of 5 stars4/5The 120-Book Holy Bible and Apocrypha Collection: Literal Standard Version (LSV) Rating: 5 out of 5 stars5/5Changes That Heal: Four Practical Steps to a Happier, Healthier You Rating: 4 out of 5 stars4/5Less Fret, More Faith: An 11-Week Action Plan to Overcome Anxiety Rating: 4 out of 5 stars4/5The Holy Bible Rating: 4 out of 5 stars4/5
Reviews for Visual Basic for the Approved Workman
0 ratings0 reviews
Book preview
Visual Basic for the Approved Workman - Wesley Sweetser, Jr
Visual Basic for
the Approved
Workman
by
Wesley D. Sweetser, Jr.
wesleysweetser@netscape.net
Companies, names and data used in examples in this text and the accompanying software are fictitious unless otherwise noted or Biblically true. No part of this book may be reprinted without written permission, except for brief quotations in books and critical reviews. The accompanying software may be used by the purchaser in software development enterprises as long as credit is given to its source. Permission to use Microsoft specific software is determined by the license granted by Microsoft for each user or site.
Unless otherwise indicated, Scripture is taken from the New American Standard Bible Copyright © 1960, 1963, 1968, 1971, 1972, 1973, 1975, 1977, 1988 by the Lockman Foundation. Used by permission.
Scripture (marked NIV) taken from the HOLY BIBLE, NEW INTERNATIONAL VERSION Copyright © 1973, 1978, 1984 International Bible Society. Used by permission of Zondervan Bible Publishers.
Visual Studio and SQL Server are registered trademarks of Microsoft Corporation in the United States of America and other countries.
Copyright © 2018 by Wesley D. Sweetser, Jr. All rights reserved.
Published electronically in the United States of America.
Ephesians 2:10
For we are His workmanship, created in Christ Jesus for good works, which God prepared beforehand, that we should walk in them.
2 Timothy 2:15
Be diligent to present yourself approved to God as a workman who does not need to be ashamed, handling accurately the word of truth.
Dedication
This work is dedicated to the Lord from Whom I have receive my strength and Who has granted me so great a salvation.
Romans 10:9-10
that if you confess with your mouth Jesus as Lord, and believe in your heart that God raised Him from the dead, you will be saved; for with the heart a person believes, resulting in righteousness, and with the mouth he confesses, resulting in salvation.
CONTENTS
Part 1 - Foundation
1. Introduction to Visual Basic
2. Methods
Part 2 - Tools
3. Interactive Programs
4. Database Input and Output
5. Arithmetic
6. Selection and Control
7. Arrays
Part 3 - Special Topics
8. Reports
9. SQL Server Integration
About the Author
PREFACE
Drawing from many years of professional software development and teaching experience, I prepared an innovative text that presents the Visual Basic (VB) language in a simple, yet powerful way, at the same time integrating Biblical perspective.
Few textbooks address the simplicity of Visual Basic, many are unable to address the complexity of real-world systems, and few if any have attempted to integrate faith with content to prepare students and new programmers for the workplace. This textbook has three goals. The first is to arm the Christian student with Scripture compatible with business-oriented programming, that they may be able witnesses for Christ. The second is to present Visual Basic in all its simplicity, that it may be a joy to use. The third is to present a realistic prototype system so students can be prepared for good works in their business endeavors.
An overview of Visual Basic and the primary Christian emphasis are presented in the first chapter. Then using object-oriented methodology, methods and loops are presented in chapter 2 with only a few commands needed to understand the sample code. Interactive programs are presented in chapter 3, with a menu and a complete suite of software available electronically which can be tailored for use in any system.
Chapter 4 introduces databases. Chapter 5 and 6 cover arithmetic, along with selection and control. Arrays are presented in chapter 7. Reports are covered in chapter 8 and the text concludes with an introduction to SQL Server Integration.
Code used in the text is available electronically at
https://drive.google.com/open?id=1ev_d6IHQAxQnlNAaqH7Uv1LEM3VvcEyW
Mention of samples folders or .vb files or other files in the text refers to this link.
I have found it a great joy to develop this text under the influence and leading of the Holy Spirit of God, and count it a privilege to present it to you.
In Christ's service,
Wesley D. Sweetser, Jr.
November 2018
Part 1
Return to Contents
Foundation
1 Corinthians 3:10-11
According to the grace of God which was given to me, as a wise master builder I laid a foundation, and another is building upon it.
But let each man be careful how he builds upon it. For no man can lay a foundation other than the one which is laid, which is Jesus Christ.
CHAPTER ONE
Return to Contents
Introduction to Visual Basic
Isaiah 28:10
"For He says,
'Order on order, order on order,
Line on line, line on line,
A little here, a little there.' "
1.1 Visual Basic Overview
Visual Basic is a sophisticated language capable of creating and retrieving data on a massive scale with great flexibility and ease. Visual Basic is the mainstay of many businesses today.
Visual Basic is a language that helps bring order to business enterprises. Where there is disorder, we can use Visual Basic to create systems of programs to organize and rearrange data in meaningful ways. In a much more awesome manner, God created order from disorder and it was good:
Genesis 1:3-4
Then God said, Let there be light
; and
there was light. And God saw that the
light was good; and God separated the
light from the darkness.
Colossians 1:16
For by Him all things were created, both
in the heavens and on earth, visible and
invisible, whether thrones or dominions
or rulers or authorities -- all things
have been created by Him and for Him.
Throughout Scripture, we see how God has continued to order the world, particularly Israel in the Old Testament and the church in the New Testament. Each of the twelve tribes of Israel had a particular order in marching through the desert and in the setting up of the tabernacle, and there was order in constructing and rebuilding the Temple, to cite some Old Testament examples. With respect to the New Testament, the body of Christ is well ordered. It consists of many members, each with a particular function or purpose. We are admonished to do everything decently and in order
(1 Corinthians 14:40) with regard to congregational worship.
Bringing order out of chaos is not only prized within the business enterprise, but order is also highly valued within a Visual Basic program itself. If bringing order out of chaos was good to God, then writing a well-ordered Visual Basic program is a good work. To accomplish orderliness, we desire to have each component of our Visual Basic programs have a particular function or purpose, just as each member of the body of Christ has a particular purpose. We accomplish this by making use of object-oriented programming concepts that are based on using classes, objects, and functions or methods to carry out specific tasks.
The advantage to a business of having highly structured or well-ordered programs and systems of programs built upon objects and methods, lies in the reduced cost to develop the software initially and to maintain these programs and systems as changes need to be made over time. Our desire is to honor and be like our God, who is a God of order, especially since we are His workmanship created in Him to perform good works (Eph. 2:10).
1.2 The Structure of Visual Basic
The structure of Visual Basic is somewhat precise. Here is a sample Visual Basic program showing the most basic structure:
Module Hello
' sample showing single method
Sub Main()
Console.WriteLine(Hello
)
' keep console open to see Hello message
' press any key or click X to close window
Console.ReadKey()
End Sub
End Module
The Module, Sub Main() and End lines are generated automatically when creating a new project as a Console Application using Visual Studio. The Console Application is the simplest type of program. In later chapters Web Applications will also be discussed.
Main() is a method automatically generated and required for every Visual Basic application. You can optionally use string arguments to pass information from outside the program at the start of program execution, which is discussed further down and in chapter 7.
A method can be a