SQL Server Database Programming With Visual Basic NET Concepts Designs and Implementations Ying Bai download
SQL Server Database Programming With Visual Basic NET Concepts Designs and Implementations Ying Bai download
https://textbookfull.com/product/sql-server-database-programming-
with-visual-basic-net-concepts-designs-and-implementations-ying-
bai/
https://textbookfull.com/product/beginning-database-programming-
using-asp-net-core-3-with-mvc-razor-pages-web-api-jquery-angular-
sql-server-and-nosql-1st-edition-bipin-joshi/
https://textbookfull.com/product/sql-server-execution-plans-for-
sql-server-2008-through-to-2017-and-azure-sql-database-3rd-
edition-grant-fritchey/
https://textbookfull.com/product/programming-with-microsoft-
visual-basic-2017-diane-zak/
https://textbookfull.com/product/pro-sql-server-relational-
database-design-and-implementation-5th-edition-louis-davidson/
Pro SQL Server Relational Database Design and
Implementation Sixth Edition Louis Davidson
https://textbookfull.com/product/pro-sql-server-relational-
database-design-and-implementation-sixth-edition-louis-davidson/
https://textbookfull.com/product/sql-easy-sql-programming-
database-management-for-beginners-your-step-by-step-guide-to-
learning-the-sql-database-felix-alvaro/
https://textbookfull.com/product/programming-with-microsoft-
visual-basic-2015-7th-edition-diane-zak/
https://textbookfull.com/product/modern-data-access-with-entity-
framework-core-database-programming-techniques-for-net-net-core-
uwp-and-xamarin-with-c-1st-edition-holger-schwichtenberg/
https://textbookfull.com/product/modern-data-access-with-entity-
framework-core-database-programming-techniques-for-net-net-core-
uwp-and-xamarin-with-c-1st-edition-holger-schwichtenberg-2/
SQL Server Database Programming
with Visual Basic.NET
IEEE Press
445 Hoes Lane
Piscataway, NJ 08854
Ying Bai
Department of Computer Science and Engineering
Johnson C. Smith University
Charlotte, North Carolina USA
Copyright © 2020 by The Institute of Electrical and Electronics Engineers, Inc. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means,
electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108
of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization
through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers,
MA 01923, (978) 750-8400, fax (978) 750-4470, or on the web at www.copyright.com. Requests to the Publisher for
permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ
07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permission.
Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this
book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book
and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. No warranty may be
created or extended by sales representatives or written sales materials. The advice and strategies contained herein may not
be suitable for your situation. You should consult with a professional where appropriate. Neither the publisher nor author
shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental,
consequential, or other damages.
For general information on our other products and services or for technical support, please contact our Customer Care
Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in
electronic formats. For more information about Wiley products, visit our web site at www.wiley.com.
10 9 8 7 6 5 4 3 2 1
This book is dedicated to my wife, Yan Wang
and my daughter, Susan (Xue) Bai.
vii
Contents
Chapter 1 Introduction 1
1.1 Outstanding Features About This Book 2
1.2 This Book Is For 2
1.3 What This Book Covers 2
1.4 How This Book Is Organized and How to Use This Book 5
1.5 How to Use Source Codes and Sample Database 6
1.6 Instructors and Customers Supports 8
7.5.2 Create the Codes to Update and Delete Data from the Course Table 405
7.5.2.1 Develop Two Stored Procedures in the SQL Server Database 407
7.5.2.2 Call the Stored Procedures to Perform the Data Updating and Deleting 409
7.5.3 Update and Delete Data against Databases Using the LINQ to SQL Query 412
7.5.3.1 Update and Delete Data Using LINQ to SQL Query for Student Table 413
7.5.3.2 Create a New Object of the DataContext Class for Student Form 414
7.5.3.3 Develop the Codes for the Select Button Click Event Procedure 415
7.5.3.4 Develop the Codes for the Insert Button Click Event Procedure 416
7.5.3.5 Develop the Codes for the Update Button Click Event Procedure 419
7.5.3.6 Develop the Codes for the Delete Button Click Event Procedure 419
7.5.3.7 Run the Project to Test Data Updating and Deleting Actions for Student Table 421
7.6 Chapter Summary 423
Homework 423
9.3.8 Develop the Stored Procedure to Perform the Data Query 533
9.3.8.1 Develop the Stored Procedure WebSelectFacultySP 533
9.3.8.2 Add Another Web Method to Call the Stored Procedure 534
9.3.9 Use DataSet as the Returning Object for the Web Method 536
9.3.10 Build Windows-based Web Service Clients to Consume the Web Services 538
9.3.10.1 Create a Web Service Proxy Class 539
9.3.10.2 Develop the Graphic User Interface for the Windows-based Client Project 541
9.3.10.3 Develop the Code to Consume the Web Service 541
9.3.11 Build Web-based Web Service Clients to Consume the Web Service 548
9.3.11.1 Create a New Web Site Project and Add an Existing Web Page 548
9.3.11.2 Add a Web Service Reference and Modify the Web Form Window 549
9.3.11.3 Modify the Designer and Codes for the Related Event Procedures 550
9.3.12 Deploy the Completed Web Service to Production Servers 555
9.3.12.1 Publish the Desired Web Service 557
9.4 Build ASP.NET Web Service Project to Insert Data Into SQL Server Database 559
9.4.1 Create a New Web Service Project WebServiceSQLInsert 559
9.4.2 Develop Four Web Service Methods 560
9.4.2.1 Develop Codes for the First Web Method SetSQLInsertSP 561
9.4.2.2 Develop Codes for User Defined Functions and Subroutine Procedures 563
9.4.2.3 Develop the Second Web Method GetSQLInsert 565
9.4.2.4 Develop the Third Web Method SQLInsertDataSet 568
9.4.2.5 Develop the Fourth Web Method GetSQLInsertCourse 572
9.4.3 Build Windows-based Web Service Clients to Consume the Web Services 578
9.4.3.1 Create a Windows-Based Consume Project and a Web Service Proxy Class 578
9.4.3.2 Develop the Graphic User Interface for the Client Project 579
9.4.3.3 Develop the Code to Consume the Web Service 581
9.4.4 Build Web-based Web Service Clients to Consume the Web Services 594
9.4.4.1 Create a New Web Site Project and Add an Existing Web Page 594
9.4.4.2 Add a Web Service Reference and Modify the Web Form Window 595
9.4.4.3 Modify the Codes for the Related Event Procedures 596
9.5 Build ASP.NET Web Service to Update and Delete Data for SQL Server Database 606
9.5.1 Modify the Default Namespace and Add Database Connection String 607
9.5.2 Create Our Customer-Built Base and Returned Classes 608
9.5.3 Create a Web Method to Call Stored Procedure to Update Student Records 609
9.5.4 Create a Web Method to Call Stored Procedure to Delete Student Records 611
9.5.5 Develop Two Stored Procedures WebUpdateStudentSP and WebDeleteStudentSP 613
9.5.5.1 Develop the Stored Procedure WebUpdateStudentSP 613
9.5.5.2 Develop the Stored Procedure WebDeleteStudentSP 616
9.6 Build Windows-Based Web Service Clients to Consume the Web Services 618
9.6.1 Modify the Student Form Window 618
9.6.2 Add a New Web Reference to Our Client Project 619
9.6.3 Build the Codes to the Update Button Click Event Procedure 620
9.6.4 Build the Codes to the Delete Button Click Event Procedure 621
Contents xvii
9.7 uild Web-Based Web Service Clients to Consume the Web Services 624
B
9.7.1 Create a New Web Site Application Project and Add an Existing Web Page 625
9.7.2 Add a Web Service Reference and Modify the Web Form Window 625
9.7.3 Modify the Codes Inside the Back Button Click Event Procedure 626
9.7.4 Add the Codes to the Update Button Click Event Procedure 626
9.7.5 Develop Codes for the Delete Button Click Event Procedure 628
9.8 Chapter Summary 631
Homework 632
Appendix A: Install and Configure SQL Server 2017 Express Database 637
Appendix B: Download and Install DevExpress .NET UI Controls 649
Appendix C: Download & Install FrontPage Server Extension for Windows 10 651
Appendix D: How to Use Sample Database 655
Index 657
xix
Dr. YING BAI is a Professor in the Department of Computer Science and Engineering at Johnson C. Smith
University. His special interests include: artificial intelligent controls, soft-computing, mix-language pro-
gramming, fuzzy logic controls, robotic controls, robots calibrations, and database programming.
His industry experience includes positions as software and senior software engineer at companies such
as Motorola MMS, Schlumberger ATE Technology, Immix TeleCom, and Lam Research.
Since 2003, Dr. Bai has published fifteen (15) books with publishers such as Prentice Hall, CRC Press
LLC, Springer, Cambridge University Press, and Wiley IEEE Press. Two of them were translated into
other languages. The Russian translation of his first book titled Applications Interface Programming
Using Multiple Languages was published by Prentice Hall in 2005. The Chinese translation of his eigth
book titled Practical Database Programming with Visual C#.NET was published by Tsinghua University
Press in China in 2011. Most books are about software programming, serial port programming, fuzzy
logic controls in industrial applications, microcontroller controls and programming, as well as classical
and modern controls on microcontrollers.
During recent years, Dr. Bai has also published about sixty (60) academic research papers in IEEE
Trans. Journals and International conferences.
xxi
Preface
Databases have become an integral part of our modern day life. We are an information-driven society.
Database technology has a direct impact on our daily lives. Decisions are routinely made by organiza-
tions based on the information collected and stored in the databases. A record company may decide to
market certain albums in selected regions based on the music preference of teenagers. Grocery stores
display more popular items at eye level and reorders are based on the inventories taken at regular inter-
vals. Other examples include patients’ records in hospitals, customers’ account information in banks,
book orders by the libraries, club memberships, auto part orders, and winter cloth stock by department
stores and many others.
In addition to database management systems, in order to effectively apply and implement databases in
real industrial or commercial systems, a good Graphic User Interface (GUI) is needed to allow users to
access and manipulate their records or data in databases. Visual Basic.NET is an ideal candidate to be
selected to provide this GUI functionality. Unlike other programming languages, Visual Basic.NET is a
kind of language that has advantages such as being easy-to-learn and easy-to-be-understood with little
learning curves. Beginning of Visual Studio.NET 2005, Microsoft integrated a few programming lan-
guages such as Visual C++, Visual Basic, C# and Visual J# into a dynamic model called .NET Framework
that makes Internet and Web programming easy and simple, and any language integrated in this model
can be used to develop professional and efficient Web applications that can be used to communicate with
others via Internet. ADO.NET and ASP.NET are two important sub-models of .NET Framework. The
former provides all components, including the Data Providers, DataSet and DataTable, to access and
manipulate data against different databases. The latter provides support to develop Web applications and
Web services in ASP.NET environment to allow users to exchange information between clients and serv-
ers easily and conveniently.
This book is mainly designed for college students and software programmers who want to develop
practical and commercial database programming with Visual Basic.NET and relational database such as
Microsoft SQL Server 2017. The book provides a detailed description about the practical considerations
and applications in database programming via Visual Basic.NET 2017 with authentic examples and
detailed explanations. More important, a new writing style is developed and implemented in this book,
combined with real examples, to provide readers with a clear picture as to how to handle the database
programming issues in Visual Basic.NET 2017 environment.
xxii Preface
The outstanding features of this book include, but are not limited to:
1) A novel writing style is adopted to try to attract students’ or beginning programmers’ interest in learn-
ing and developing practical database programs, and to avoid the headache caused by using huge
blocks of codes in the traditional database programming books.
2) Updated database programming tools and components are covered in the book, such as .NET
Framework 4.6, LINQ, ADO.NET 4.5 and ASP.NET 4.6, to enable readers to easily and quickly learn
and master advanced techniques in database programming and develop professional and practical
database applications.
3) A real completed sample database CSE_DEPT with Microsoft SQL Server 2017 is provided and used
for entire book. Step by step, a detailed illustration and description about how to design and build a
practical relational database are provided.
4) Covers both fundamental and advanced database-programming techniques to convenience both
beginning students and experienced programmers.
5) Various actual data providers are discussed and implemented in the sample projects, such as the SQL
Server and OleDb data providers. Instead of using the OleDb to access the SQL Server, the real SQL
Server data provider is utilized to connect to the Visual Basic.NET 2017 directly to perform data
operations.
6) All projects can be run in Microsoft Visual Studio.NET 2019 even they are developed and built with
Visual Studio.NET 2017.
7) Good textbook for college students, good reference book for programmers, software engineers, and
academic researchers.
I sincerely hope that this book can provide useful and practical help, and can guide all readers or users
who adopted this book to develop and build professional and practical database applications.
Ying Bai
xxiii
Acknowledgment
The first and most special thanks to my wife, Yan Wang, and I could not have finished this book without
her sincere encouragement and support.
My special thanks to Dr. Satish Bhalla who is the chapter contributor for this book. Dr. Bhalla is a spe-
cialist in database programming and management, especially in SQL Server, Oracle, and DB2. Dr. Bhalla
spent a lot of time preparing materials for Chapter 2 and he deserves thanks for this.
Many thanks to the Editor, Mary Hatcher, who made this book available to the public. This book would
not have reached the market without her deep perspective and hard work. The same thanks are extended
to the editorial team of this book. Without their contributions, it would be impossible for this book to be
published.
These thanks should also be extended to the following book reviewers for their precious opinions to
this book:
●● Dr. Jiang (Linda) Xie, Professor, Department of Electrical and Computer Engineering, University of
North Carolina at Charlotte.
●● Dr. Dali Wang, Professor, Department of Physics and Computer Science, Christopher Newport University.
Last but not least, thanks should be forwarded to all people who have supported me to finish this book.
xxiv
The companion website consists of a student website and an instructor website, and contains:
●● Student Website
○○ DB Projects
○○ Images
○○ Sample Database
○○ VB Forms
●● Instructor Website
○○ DB Projects
○○ HW Solutions
○○ Images
○○ Sample Database
Chapter 1
Introduction
For many years during my teaching database programming and Visual Basic.NET programming courses
in my college, I found that it is too difficult to find a good textbook for this topic so that I had to combine
a few different professional books together as references to teach these courses. Most of those books are
specially designed for programmers or software engineers, which cover a lot of programming strategies
and huge blocks of codes, which is a terrible headache to the college students or beginning programmers
who are new to the Visual Basic.NET and database programming. I have to prepare my class presenta-
tions and figure out all homeworks and exercises for my students. I dreamed that one day I could find a
good textbook that is suitable for college students or beginning programmers and help them to learn and
master the database programming with Visual Basic.NET easily and conveniently. Finally, I decided that
I needed to do something for this dream myself after a long time of waiting.
Another reason for me to have this idea is the job market. As you know, most industrial and commercial
companies in the US belong to database applications businesses such as manufacturers, banks, hospitals,
and retailers. The majority of them need professional people to develop and build database-related applica-
tions, but not database management and design systems. To enable our students to become good candidates
for those companies, we need to create a book like this one.
Unlike most database programming books in the current market, which discuss and present the data-
base programming techniques with huge blocks of programming codes from the first page to the last
page, this book tries to use a new writing style to show readers, especially college students, how to
develop professional and practical database programs in Visual Basic.NET 2017 by using Visual Studio.
NET Design Tools and Wizards related to ADO.NET 4.5, and to apply codes that are auto-generated by
various Wizards. By using this new style, the headache caused by using those huge blocks of program-
ming codes can be removed, instead, a simple and easy way to create database programs using the Design
Tools can be taken to attract students’ learning interest, and furthermore to enable students to build
professional and practical database programming in more efficient and interesting ways.
There are so many different database-programming books available on the market, but rarely can you
find a book like this one, which implemented a novel writing style to attract the students’ learning inter-
ests in this topic. To meet the needs of some experienced or advanced students or software engineers, the
book contains two programming methods: the interesting and easy-to-learn fundamental database pro-
gramming method – Visual Studio.NET Design Tools and Wizards, and advanced database programming
SQL Server Database Programming with Visual Basic.NET: Concepts, Designs and Implementations, First Edition. Ying Bai.
© 2020 The Institute of Electrical and Electronics Engineers, Inc. Published 2020 by John Wiley & Sons, Inc.
Companion website: www.wiley.com/go/bai/sql
2 Chapter 1 Introduction
method – runtime object method. In the second method, all database-related objects are created and
applied during or when your project is running by utilizing quite a few blocks of codes.
1) All programming projects can be run in Microsoft Visual Studio.NET 2019 even if all of them are
developed and built in Visual Studio.NET 2017.
2) A novel writing style is adopted to try to attract students’ or beginning programmers’ interests in
learning and developing practical database programs, and to avoid the headache caused by using
huge blocks of codes in the traditional database programming books.
3) Updated database programming tools and components are covered in the book, such as .NET
Framework 4.6, LINQ, ADO.NET 4.5 and ASP.NET 4.7, to enable readers to easily and quickly learn
and master advanced techniques in database programming and develop professional and practical
database applications.
4) A real completed sample database CSE_DEPT with Microsoft SQL Server 2018 database engine is
provided and used for the entire book. Step by step, a detailed illustration and description about how
to design and build a practical relational database are provided.
5) both fundamental and advanced database-programming techniques are covered to convenience both
beginning students and experienced programmers.
6) Various actual data providers are discussed and implemented in the sample projects, such as OleDb,
ODBC and SQL Server data providers. Instead of using the OleDb to access the SQL Server, the real
SQL Server data provider is utilized to connect to the Visual Basic.NET 2017 directly to perform data
operations.
7) The book provides homework and teaching materials, and these allow instructors to organize and pre-
pare their courses easily and rapidly, and enable students to understand what they learned better by
doing something themselves.
8) Good textbook for college students, good reference book for programmers, software engineers, and
academic researchers.
This book is designed for college students and software programmers who want to develop practical and
commercial database programming with Visual Basic.NET and relational databases such as Microsoft
SQL Server 2018. Fundamental knowledge and understanding on Visual Basic.NET and Visual Studio.
NET IDE is assumed.
Nine chapters are included in this book. The contents of each chapter can be summarized as below:
●● Chapter 1 provides an introduction and summarization to the whole book.
1.3 What This Book Cover 3
●● Chapter 2 provides a detailed discussion and analysis of the structure and components about rela-
tional databases. Some key technologies in developing and designing database are also given and
discussed in this part. The procedure and components used to develop a practical relational database
with SQL Server 2018 is analyzed in detailed with some real data tables in our sample database
CSE_DEPT.
●● Chapter 3 provides an introduction to the ADO.NET, which includes the architectures, organizations
and components of the ADO.NET. Detailed discussions and descriptions are provided in this chapter
to give readers both fundamental and practical ideas and pictures in how to use components in ADO.
NET to develop professional data-driven applications. Two ADO.NET architectures are discussed to
enable users to follow the directions to design and build their preferred projects based on the different
organizations of the ADO.NET. Four popular data provides, such as OleDb, ODBC, SQL Server and
Oracle, are discussed in detail. The basic ideas and implementation examples of DataTable and DataSet
are also analyzed and described with some real coding examples.
●● Chapter 4 provides a detailed discussion and analysis about the Language-Integrated Query (LINQ),
which includes LINQ to Objects, LINQ to DataSet, LINQ to SQL, LINQ to Entities, and LINQ to XML.
An introduction to LINQ general programming guide is provided at the first part in this chapter. Some
popular interfaces widely used in LINQ, such as IEnumerable, IEnumerable(Of T), IQueryable and
IQueryable(Of T), and Standard Query Operators (SQO) including the deferred and non-deferred
SQO, are discussed in that part. An introduction to LINQ Query is given in the second section in this
chapter. Following this introduction, a detailed discussion and analysis about the LINQ queries that is
implemented for different data sources is provided in detail.
●● Starting from Chapter 5, the real database programming techniques with Visual Basic.NET such as
data selection queries are provided and discussed. Two parts are covered in this chapter: Part I
contains the detailed descriptions in how to develop professional data-driven applications with the
help of the Visual Studio.NET design tools and wizards with some real projects, and this part con-
tains a lot of hiding codes that are created by Visual Basic.NET automatically when using those
design tools and wizards. Therefore, the coding for this part is very simple and easy. Part II covers
an advanced technique, the runtime object method, in developing and building professional data-
driven applications. Detailed discussions and descriptions about how to build professional and
practical database applications using this runtime method are provided combined with four real
projects.
●● Chapter 6 provides detailed discussions and analyses about three popular data insertion methods with
Microsoft SQL Server 2018 database:
1) Using TableAdapter’s DBDirect methods TableAdapter.Insert() method
2) Using the TableAdapter’s Update() method to insert new records that have already been added into
the DataTable in the DataSet
3) Using the Command object’s ExecuteNonQuery() method.
This chapter is also divided into two parts: Methods 1 and 2 are related to Visual Studio.NET design
tools and wizards and therefore are covered in Part I. The third method is related to runtime object and
therefore it is covered in Part II. Three real projects are used to illustrate how to perform the data inser-
tion into the Microsoft SQL Server 2018 database. Some professional and practical data validation
methods are also discussed in this chapter to confirm the data insertion.
4 Chapter 1 Introduction
●● Chapter 7 provides discussions and analyses on three popular data updating and deleting methods
with four real project examples:
1) Using TableAdapter DBDirect. methods such as TableAdapter.Update() and TableAdapter.Delete() to
update and delete data directly again the databases.
2) Using TableAdapter.Update() method to update and execute the associated TableAdapter’s proper-
ties such as UpdateCommand or DeleteCommand to save changes made for the table in the DataSet
to the table in the database.
3) Using the run time object method to develop and execute the Command’s method ExecuteNonQuery()
to update or delete data again the database directly.
This chapter is also divided into two parts: Methods 1 and 2 are related to Visual Studio.NET design tools
and wizards and therefore are covered in Part I. The third method is related to runtime object and it is
covered in Part II. Four real projects are used to illustrate how to perform the data updating and deleting
against the database Microsoft SQL Server 2018. Some professional and practical data validation methods
are also discussed in this chapter to confirm the data updating and deleting actions. The key points in
performing the data updating and deleting actions against a relational database, such as the order to exe-
cute data updating and deleting between the parent and child tables, are also discussed and analyzed.
●● Chapter 8 provides introductions and discussions about the developments and implementations of
ASP.NET Web applications in Visual Basic.NET 2017 environment. At the beginning of Chapter 8, a
detailed and complete description about the ASP.NET and the .NET Framework is provided, and this
part is especially useful and important to students or programmers who do not have any knowledge or
background in the Web application developments and implementations. Following the introduction
section, a detailed discussion on how to install and configure the environment to develop the ASP.NET
Web applications is provided. Some essential tools such as the Web server, IIS and FrontPage Server
Extension 2000, as well as the installation process of these tools are introduced and discussed in detail.
Starting from section 8.3, the detailed development and building process of ASP.NET Web applications
to access databases are discussed with four real Web application projects. The popular database SQL
Server 2018 is utilized as the target databases for those development and building processes.
●● Chapter 9 provides introductions and discussions about the developments and implementations of
ASP.NET Web services in Visual Basic.NET 2017 environment. A detailed discussion and analysis
about the structure and components of the Web services is provided at the beginning of this chapter.
One of the most popular databases, Microsoft SQL Server 2018, is discussed and used for three kinds
of example Web service projects, which include:
1) WebServiceSQLSelect
2) WebServiceSQLInsert
3) WebServiceSQLUpdateDelete.
Each Web service contains different Web methods that can be used to access different databases and
perform the desired data actions such as Select, Insert, Update, and Delete via the Internet. To consume
those Web services, different Web service client projects are also developed in this chapter. Both
Windows-based and Web-based Web service client projects are discussed and built for each kind of Web
service listed above. Totally nine (9) projects, including the Web service and the associated Web service
client projects, are developed in this chapter. All projects have been debugged and tested and can be run
in any Windows compatible operating systems such as Windows XP, Windows 7/8 and Windows 10.
1.4 How This Book Is Organized and How to Use This Boo 5
1.4 How This Book Is Organized and How to Use This Book
This book is designed for both college students who are new to database programming with Visual Basic.
NET and professional database programmers who has professional experience on this topic.
Chapters 2, 3, and 4 provide the fundamentals on database structures and components, ADO.NET
and LINQ components. Starting from chapter 5, which includes chapters 6 and 7, each chapter is
divided into two parts: fundamental part and advanced part. The data driven applications developed
with design tools and wizards provided by Visual Studio.NET, which can be considered as the funda-
mental part, have less coding-loads and therefore they are more suitable to students or programmers
who are new to the database programming with Visual Basic.NET. Part II contains the runtime object
method and it covers a lot of coding developments to perform the different data actions against the
database, and this method is more flexible and convenient to experienced programmers event a lot of
coding jobs is concerned.
Chapters 8 and 9 give a full discussion and analysis about the developments and implementations
of ASP.NET Web applications and Web services. These technologies are necessary to students and
programmers who want to develop and build Web applications and Web services to access and manip-
ulate data via Internet.
Based on the organization of this book we described above, this book can be used as two categories
such as Level I and Level II, which is shown in Figure 1.1.
For undergraduate college students or beginning software programmers, it is highly recommended to
learn and understand the contents of Chapters 2, 3, and 4, Part I of Chapters 5, 6, and 7 since those are
fundamental knowledge and techniques in database programming with Visual Basic.NET 2017. For
chapters 8 and 9, these areoptional to instructors and dependent on the time and schedule.
Level I
Chapter 2 Level II
Part I Part II
Chapter 5 Chapter 5
Part I Part II
Chapter 6 Chapter 6
Part I Part II
Chapter 7 Chapter 7
Optional
Chapter 8 Chapter 8
Chapter 9 Chapter 9
For experienced college students or software programmers who have already some knowledge and
techniques in database programming, it is recommended to learn and understand the contents of Part II
of Chapters 5 ~ 7 as well as Chapters 8 and 9 since the run-time data objects method and some sophisti-
cated database programming techniques such as joined-table query and nested stored procedures are
discussed and illustrated in those chapters with real examples. Also, the ASP.NET Web applications and
ASP.NET Web services are discussed and analyzed with many real database program examples for SQL
Server 2018 database.
All source codes in each project developed in this book are available, and all projects are categorized into
the associated chapters that are located at the folder DB Projects that is located at the site www.wiley.
com/go/bai/sql. You can copy or download those codes into your computer and run each project as you
like. To successfully run those projects, the following conditions must be met:
●● Visual Studio.NET 2017 or higher must be installed in your computer.
●● The database management system, Microsoft SQL Server 2018 Management Studio 18, must be
installed in your computer.
●● The sample database, CSE_DEPT.mdf, must be installed in your computer in the appropriate
folders.
●● To run projects developed in Chapters 8 and 9, in addition to conditions listed above, an Internet
Information Services (IIS) such as FrontPage Server Extension 2000 or 2002 must be installed in your
computer and it works as a pseudo server for those projects.
All related teaching and learning materials, including the sample databases, example projects, home-
work solutions, faculty and student images as well as sample Windows forms and Web pages, can be
found from the associated folders, Instructors or Students, located at the Wiley ftp site www.wiley.
com/go/bai/sql, as shown in Figure 1.2.
These materials are categorized and stored at different folders in two different sites based on the teach-
ing purpose (for instructors) and learning purpose (for students):
1) Sample Database Folder: Contains our sample database, CSE_DEPT.mdf (SQL Server 2018). Refer
to Appendix D to get details in how to use this database for your applications or sample projects.
2) DB Projects Folder: Contains all sample projects developed in the book. Projects are categorized and
stored at different Chapter subfolder based on the book chapter sequence. Readers can directly use the
codes and GUIs of those projects by downloading them from the DB Projects folder at the Wiley ftp
site.
3) Images Folder: Contains all sample faculty and student image files used in all sample projects in the
book. Readers can copy and paste those image files to their projects to use them.
4) VB Forms Folder: Contains all sampled Windows-based Forms and Web-based Pages developed and
implemented in all sample projects in the book. All Windows-based Forms are located at the Window
subfolder, and all Web-based Pages are located at the Web subfolder. Readers can use those Forms or
Pages by copying and pasting them into their real projects.
5) TeachingPPT Folder: Contains all MS-PPT teaching slides for each chapter.
1.5 How to Use Source Codes and Sample Databas 7
FOR INSTRUCTORS:
FOR STUDENTS:
DB Projects
Chapter 6 8-Student
Web Images
3 Projects
LogIn Page
Chapter 7
Faculty Page 4 Projects
Course Page
Student Page Chapter 8
4 Projects
Selection Page
Chapter 9
9 Projects
The three chief causes of personal popularity among women are, the
admiration which is excited, the sympathy which is given, or the
pleasure that can be bestowed. We put out of court for our present
purpose the popularity which accompanies political power or
intellectual strength, this being due to condition, not quality, and
therefore not of the sort we mean. Besides, it belongs to men rather
than to women, who seldom have any direct power that can
advance others, and still seldomer intellectual strength enough to
obtain a public following because of their confessed supremacy. The
popular women we mean are simply those met with in society—
women whose natural place is the drawing-room and whose sphere
is the well-dressed world—women who are emphatically ladies, and
who understand les convenances and obey them, even if they take
up a cause, practise philanthropy or preach philosophy. But the
popular woman rarely does take up a cause or make her
philanthropy conspicuous and her philosophy audible. Partizanship
implies angles; and she has no angles. If of the class of the admired,
she is most popular who is least obtrusive in her claims and most
ingenuous in ignoring her superiority. A pretty woman, however
pretty, if affected, vain, or apt to give herself airs, may be admired
but is never popular. The men whom she snubs sneer at her in
private; the women whom she eclipses as well as snubs do more
than sneer; those only to whom she is gracious find her beauty a
thing of joy; but as she is distractingly eclectic in her favouritism she
counts as many foes as she has friends; and though those who
dislike her cannot call her ugly, they can call her disagreeable, and
do. But the pretty woman who wears her beauty to all appearance
unconsciously, never suffering it to be aggressive to other women
nor wilfully employing it for the destruction of men, who is gracious
in manner and of a pleasant temper, who is frank and approachable,
and does not seem to consider herself as something sacred and set
apart from the world because nature made her lovelier than the rest
—she is the woman whom all unite in admiring, the popular person
par excellence of her set.
The popular pretty woman is one who, take her as a young wife
(and she must be married), honestly loves her husband, but does
not thrust her affection into the face of the world, and never flirts
with him in public. Indeed, she flirts with other men just enough to
make time pass pleasantly, and enjoys a rapid waltz or a lively
conversation as much as when she was seventeen and before she
was appropriated. She does not think it necessary to go about
morally ticketed; nor does she find it vital to her dignity nor to her
virtue to fence herself round with coldness or indifference to the
multitude by way of proving her loyalty to one. Still, as it is notorious
that she does love her husband, and as every one knows that he
and she are perfectly content with each other and therefore not on
the look-out for supplements, the men with whom she has those
innocent little jokes, those transparent secrets, those animated
conversations, that confessed friendship and good understanding, do
not make mistakes; and the very women belonging to them forget to
be censorious, even though this other, this popular woman, is so
much admired.
This popular woman is a mother too, and a fond one. Hence she can
sympathize with other mothers, and expatiate on their common
experiences in the confidential chat over five o'clock tea, as all fond
mothers do and should. She keeps a well-managed house, and is
notorious for the amount of needlework she gets through; and of
which she is prettily proud; not being ashamed to tell you that the
dress you admire so much was made by her own hands, and she will
give your wife the pattern if she likes; while she boasts of even
rougher upholstery work which she and her maid and her sewing-
machine have got through with despatch and credit. She gives
dinners with a cachet of their own—dinners which have evidently
been planned with careful thought and study; and she is not above
her work as mistress and organizer of her household. Yet she finds
time to keep abreast with the current literature of the day, and never
has to confess to ignorance of the ordinary topics of conversation.
She is not a woman of extreme views about anything. She has not
signed improper papers and she does not discuss improper
questions; she does not go in for woman's rights; she has a horror
of facility of divorce; and she sets up for nothing—being neither an
Advanced Woman desirous of usurping the possessions and
privileges of men, nor a Griselda who thinks her proper place is at
the feet of men, to take their kicks with patience and their caresses
with gratitude, as is becoming in an inferior creature. She does not
dabble in politics; and though she likes to make her dinners
successful and her evenings brilliant, she by no means assumes to
be a leader of fashion nor to impose laws on her circle. She likes to
be admired, and she is always ready to let herself be loved. She is
always ready too, to do any good work that comes in her way; and
she finds time for the careful overlooking of a few pet charities about
which she makes no parade, just as she finds time for her nursery
and her needlework. And, truth to tell, she enjoys these quiet hours,
with only her children to love her and her poor pensioners to admire
her, quite as much as she enjoys the brilliant receptions where she is
among the most popular and the most beautiful.
Her nature is gentle, her affections are large, her passions small.
She may have prejudices, but they are prejudices of a mild kind,
mainly on the side of modesty and tenderness and the quietude of
true womanhood. She is woman throughout, without the faintest
dash of the masculine element in mind or manners; and she aspires
to be nothing else. She carries with her an atmosphere of happiness,
of content, of spiritual completeness, of purity which is not prudery.
Her life is filled with a variety of interests; consequently she is never
peevish through monotony, nor yet, on the other hand, is she
excited, hurried, storm-driven, as those who give themselves up to
'objects,' and perfect nothing because they attempt too much. She is
popular, because she is beautiful without being vain; loving without
being sentimental; happy in herself, yet not indifferent to others;
because she understands her drawing-room duties as well as her
domestic ones, and knows how to combine the home life with social
splendour. This is the best type of the popular pretty woman to
whom is given admiration, and against whom no one has a stone to
fling nor a slander to whisper; and this is the ideal woman of the
English upper-class home, of whom we still raise a few specimens,
just to show what women may be if they like, and what sweet and
lovely creatures they are when they are content to be as nature
designed them.
Another kind of popular woman is the sympathetic woman, the
woman who gives instead of receiving. This kind is of variable
conditions. She may be old, she may be ugly; in fact, she is more
often both than neither; but she is a universal favourite
notwithstanding, and no woman is more sought after nor less
wearied of, although few can say why they like her. She may be
married; but generally she is either a widow or an old maid; for, if
she be a wife, her sympathies for things abroad are necessarily
somewhat cramped by the pressure of those at home;—and her
sympathies are her claim to popularity. She is sincere too, as well as
sympathetic, and she is safe. She holds the secrets of all her friends;
but no one suspects that any before himself has confided in her. She
has the art, or rather the charm, of perpetual spiritual freshness, and
all her friends think in turn that the fountain has been unsealed now
for the first time. This is not artifice; it is simply the property of deep
and inexhaustible sympathy. It is not necessary that she should be a
wise adviser to be popular. Her province is to listen and to
sympathize; to gather the sorrows and the joys of others into her
own breast, so as to soften by sharing or heighten by reduplication.
Most frequently she is not over rigid in her notions of moral
prudence, and will let a lovesick girl talk of her lover, even if the
affair be hopeless and has been forbidden; while she will do her best
to soothe the man who has had the misfortune to get crazed about
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
textbookfull.com