0% found this document useful (0 votes)
16 views

Visual C And Databases A Stepbystep Database Programming Tutorial Philip Conrod Lou Tylee pdf download

The document is a comprehensive tutorial on programming with Visual C# and databases, authored by Philip Conrod and Lou Tylee. It covers various topics including database structure, connection, queries using SQL, interface design, and database management. The tutorial is designed for beginners and includes practical examples and exercises to enhance learning.

Uploaded by

vayiakhoei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Visual C And Databases A Stepbystep Database Programming Tutorial Philip Conrod Lou Tylee pdf download

The document is a comprehensive tutorial on programming with Visual C# and databases, authored by Philip Conrod and Lou Tylee. It covers various topics including database structure, connection, queries using SQL, interface design, and database management. The tutorial is designed for beginners and includes practical examples and exercises to enhance learning.

Uploaded by

vayiakhoei
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 85

Visual C And Databases A Stepbystep Database

Programming Tutorial Philip Conrod Lou Tylee


download

https://ebookbell.com/product/visual-c-and-databases-a-
stepbystep-database-programming-tutorial-philip-conrod-lou-
tylee-50194514

Explore and download more ebooks at ebookbell.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Visual C And Databases A Stepbystep Database Programming Tutorial 15th


Edition Philip Conrod

https://ebookbell.com/product/visual-c-and-databases-a-stepbystep-
database-programming-tutorial-15th-edition-philip-conrod-6761504

Visual C And Mfc Programming Functionx

https://ebookbell.com/product/visual-c-and-mfc-programming-
functionx-5496986

Build Windows 8 Apps With Microsoft Visual C And Visual Basic Step By
Step Luca Regnicoli

https://ebookbell.com/product/build-windows-8-apps-with-microsoft-
visual-c-and-visual-basic-step-by-step-luca-regnicoli-5498642

Head First C 2ed A Learners Guide To Realworld Programming With Visual


C And Net Head First Guides Second Edition Andrew Stellman

https://ebookbell.com/product/head-first-c-2ed-a-learners-guide-to-
realworld-programming-with-visual-c-and-net-head-first-guides-second-
edition-andrew-stellman-2350182
Pro Visual Ccli And The Net 35 Platform Stephen Rg Fraser

https://ebookbell.com/product/pro-visual-ccli-and-the-net-35-platform-
stephen-rg-fraser-35754280

Pro Visual Ccli And The Net 20 Platform 2nd Edition Stephen R G Fraser
Auth

https://ebookbell.com/product/pro-visual-ccli-and-the-
net-20-platform-2nd-edition-stephen-r-g-fraser-auth-4390804

Programming With Visual C Concepts And Projects James Allert

https://ebookbell.com/product/programming-with-visual-c-concepts-and-
projects-james-allert-33555998

Mcad Developing And Implementing Web Applications With Visual Cnet And
Visual Studionet Exam 70315 Exam Cram 2 Kirk Hausman

https://ebookbell.com/product/mcad-developing-and-implementing-web-
applications-with-visual-cnet-and-visual-studionet-exam-70315-exam-
cram-2-kirk-hausman-924372

Mcad Developing Xml Web Services And Server Components With Visual C
Net And The Net Framework Exam Cram 2 Exam Cram 70320 Amit Kalani

https://ebookbell.com/product/mcad-developing-xml-web-services-and-
server-components-with-visual-c-net-and-the-net-framework-exam-
cram-2-exam-cram-70320-amit-kalani-2157304
Visual C#®
And Databases
A Computer Programming Tutorial
By
Philip Conrod & Lou Tylee

©2017 Kidware Software LLC

PO Box 701
Maple Valley, WA 98038

http://www.computerscienceforkids.com
http://www.kidwaresoftware.com
Copyright © 2017 by Kidware Software LLC. All rights reserved

Kidware Software LLC


PO Box 701
Maple Valley, Washington 98038
1.425.413.1185
www.kidwaresoftware.com
www.computerscienceforkids.com

All Rights Reserved. No part of the contents of this book may be reproduced or transmitted in any form or
by any means without the written permission of the publisher.

Printed in the United States of America

ISBN-13: 978-1-937161-66-8 (Electronic)


ISBN-13: 978-1-937161-74-3 (Printed)

Previous edition published as “Visual C# & Databases - 2012 Professional Edition”

Cover Design by Neil Sauvageau


Illustrations by Kevin Brockschmidt

This copy of “Visual C# and Databases” and the associated software is licensed to a single user. Copies of
the course are not to be distributed or provided to any other user. Multiple copy licenses are available for
educational institutions. Please contact Kidware Software for school site license information.

This guide was developed for the course, “Visual C# and Databases,” produced by Kidware Software,
Maple Valley, Washington. It is not intended to be a complete reference to the Visual Basic language.
Please consult the Microsoft website for detailed reference information.

This guide refers to several software and hardware products by their trade names. These references are for
informational purposes only and all trademarks are the property of their respective companies and owners.
Microsoft, Visual Studio, Small Basic, Visual Basic, Visual J#, and Visual C#, IntelliSense, Word, Excel,
MSDN, and Windows are all trademark products of the Microsoft Corporation. Java is a trademark product
of the Oracle Corporation.

The example companies, organizations, products, domain names, e-mail addresses, logos, people, places,
and events depicted are fictitious. No association with any real company, organization, product, domain
name, e-mail address, logo, person, place, or event is intended or should be inferred.

This book expresses the author’s views and opinions. The information in this book is distributed on an "as
is" basis, without and expresses, statutory, or implied warranties.
Neither the author(s) nor Kidware Software LLC shall have any liability to any person or entity with respect
to any loss nor damage caused or alleged to be caused directly or indirectly by the information contained in
this book.
About The Authors Philip Conrod has authored, co-authored and
edited numerous computer programming books for kids, teens and adults. Philip
holds a BS in Computer Information Systems and a Master's certificate in the
Essentials of Business Development from Regis University. He also holds a
Certificate in Programming for Business from Warren-Tech. Philip has been
programming computers since 1977. He has held various Information
Technology leadership roles in companies like Command Plus, BibleBytes
Software, Sundstrand Aerospace, Safeco Insurance Companies, FamilyLife,
Kenworth Truck Company, PACCAR and Darigold. In his spare time, Philip
serves as the President & Publisher of Kidware Software, LLC. He is the proud
father of three “techie” daughters and he and his beautiful family live in Maple
Valley, Washington.

Lou Tylee holds BS and MS degrees in Mechanical Engineering and a PhD in


Electrical Engineering. Lou has been programming computers since 1969 when
he took his first Fortran course in college. He has written software to control
suspensions for high speed ground vehicles, monitor nuclear power plants, lower
noise levels in commercial jetliners, compute takeoff speeds for jetliners, locate
and identify air and ground traffic and to let kids count bunnies, learn how to
spell and do math problems. He has written several online texts teaching Visual
Basic, Visual C# and Java to thousands of people. He taught a beginning Visual
Basic course for over 15 years at a major university. Currently, Lou works as an
engineer at a major Seattle aerospace firm. He is the proud father of five children
and proud husband of his special wife. Lou and his family live in Seattle,
Washington.
Acknowledgements

I want to thank my three wonderful daughters - Stephanie, Jessica and Chloe, who helped with various
aspects of the book publishing process including software testing, book editing, creative design and many
other more tedious tasks like finding errors and typos. I could not have accomplished this without all your
hard work, love and support. I want to also thank my best friend Jesus, who has always been there by my
side giving me wisdom and guidance. Without you, this book would have never been printed or published.

I also want to thank my multi-talented co-author, Lou Tylee, for doing all the real hard work necessary to
develop, test, debug, and keep current all the ‘beginner-friendly’ applications, games and base tutorial text
found in this book. Lou has tirelessly poured his heart and soul into so many previous versions of this
tutorial and there are so many beginners who have benefited from his work over the years. Lou is by far one
of the best application developers and tutorial writers I have ever worked with. Thank you Lou for
collaborating with me on this book project.
Contents
Course Description

Course Prerequisites

How to take the Course

Software Requirements

Hardware Requirements

Installing and Using the Downloadable Solution Files

Installing Visual C# & Databases

Foreword by David B. Taylor, Former College Professor & Dept Chair

1. Introducing Visual C# and Databases


Preview

Course Objectives

Course Requirements

What is a Database?

Where Does Visual C# Fit In?

Building a Visual C# Application

Structure of a Visual C# Application

Steps in Developing Application

Drawing the User Interface and Setting Properties

Setting Properties of Controls at Design Time


Setting Properties at Run-Time

How Names are Used in Control Events

Writing Code

Review of Variables

Visual C# Data Types

Variable Declaration

Example 1-1. Mailing List Application

Summary

2. Introduction to Databases
Review and Preview

Database Structure and Terminology

Relational Databases

Using SQL Server Databases

Sample Relational Database

Sample Database Structure

Virtual Database Tables

Creating a Database

Summary

3. Database Connection
Review and Preview
Data Object Preview

Connection Object

Connection Object – Access Database

Access Databases and 64 Bit Operating Systems

Connection Object – SQL Server Database

Example 3-1. Accessing the Books Database

Command Object

Command Object – Access Database

Command Object – SQL Server Database

Example 3-1 (Command Object). Accessing the Books Database

DataAdapter Object

DataAdapter Object – Access Database

DataAdapter Object – SQL Server Database

DataSet Object

DataTable Object

DataRow Object

Example 3-1 (Data Table). Accessing the Books Database

Data Bound Controls

Example 3-1 (Data Binding). Accessing the Books Database

CurrencyManager Object

Example 3-1 (Final Version). Accessing the Books Database


Data Wizards

Example 3-2 (Access Database). Books Database with Wizards

Example 3-2 (SQL Server Database). Books Database with Wizards

Using SQL Server Databases in Examples

Summary

Example 3-3. Northwinds Trader Database

Example 3-3. Using SQL Server Databases

4. Database Queries with SQL


Review and Preview

SQL Background

Basics of SQL

Where Does SQL Fit In Visual C#?

Example 4-1. SQL Tester

Example 4-1. Using SQL Server Databases

SELECT/FROM SQL Statement

ORDER BY Clause

WHERE Clause

Single Table WHERE Clause

Multiple Table WHERE Clause

INNER JOIN Clause

OUTER JOIN Clause


Functions with SQL (Access Databases)

Functions with SQL (SQL Server Databases)

SQL Aggregate Functions

SQL Construction Tools

SQL Statements with Access

SQL Statements with the Data Wizard

Building SQL Commands in Code

Example 4-2. Searching the Books Database

Example 4-2. Using SQL Server Databases

Summary

Example 4-3. Northwind Traders Database

Example 4-3. Using SQL Server Databases

5. Visual C# Interface Design


Review and Preview

Interface Design Philosophy

Example 5-1. Mailing List Revisited

Visual C# Standard Controls

Form Control

Button Control

Label Control

TextBox Control
CheckBox Control

RadioButton Control

GroupBox Control

Panel Control

PictureBox Control

Example 5-2. Authors Table Input Form

Example 5-2. Using SQL Server Databases

MessageBox Object

Example 5-3. Authors Table Input Form (Message Box)

Example 5-3. Using SQL Server Databases

Application State

Example 5-4. Authors Table Input Form (Application State)

Example 5-4. Using SQL Server Databases

Entry Validation

Key Trapping

Example 5-5. Authors Table Input Form (Entry Validation)

Example 5-5. Using SQL Server Databases

Input Validation

Example 5-6. Authors Table Input Form (Input Validation)

Example 5-6. Using SQL Server Databases

Error Trapping and Handling


Example 5-7. Authors Table Input Form (Error Trapping)

Example 5-7. Using SQL Server Databases

On-Line Help Systems

Creating a Help File

Starting the HTML Help Workshop

Creating Topic Files

Creating Table of Contents File

Compiling the Help File

HelpProvider Control

Example 5-8. Authors Table Input Form (On-Line Help)

Example 5-8. Using SQL Server Databases

Application Testing

Other Controls

MaskedTextBox Control

NumericUpDown Control

TabControl Control

Toolstrip (Toolbar) Control

ListBox Control

ComboBox Control

DataGridVIew Control

MonthCalendar Control
DateTimePicker Control

OpenFileDialog Control

SaveFileDialog Control

Summary

Example 5-9. Publisher Table Input Form

Build Interface

Add Message Box(es)

Code Application State

Perform Entry Validation

Perform Input Validation

Add Error Trapping and Handling

Add On-Line Help System

Application Testing

Example 5-9. Using SQL Server Databases

6. Database Management
Review and Preview

Database Management Tasks

Editing Database Records

Phone Contact Database

Example 6-1. Editing Database Records

Example 6-1. Using SQL Server Databases


Adding Database Records

Example 6-2. Adding Database Records

Example 6-2. Using SQL Server Databases

Deleting Database Records

Example 6-3. Deleting Database Records

Example 6-3. Using SQL Server Databases

Finding Records in a Database

Example 6-4. Finding Database Records

Example 6-4. Using SQL Server Databases

Modifying Records in Code

Example 6-5. Modifying Records in Code

Example 6-5. Using SQL Server Databases

Stopping a Database Application

Example 6-6. Stopping a Database Application

Example 6-6. Using SQL Server Databases

Example 6-7. Authors Table Input Form

Additional Navigation Capabilities

Editing Records

Adding Records

Deleting Records

Stopping the Application


Example 6-7. Using SQL Server Databases

Example 6-8. Publishers Table Input Form

Additional Navigation Capabilities

Editing Records

Adding Records

Deleting Records

Stopping the Application

Example 6-8. Using SQL Server Databases

Multiple Table Database Management

Database Keys

Database Modifications

Final Application

Example 6-9. Books Database Management System

Basic Book Titles Input Form

Finding Records

Navigation Information

Adding Publisher Name

Adding Publisher Editing

Modify Publishers Input Form

Modify Authors Input Form

Adding Author Names


Example 6-10. Database Detective – Author Search

Example 6-10. Using SQL Server Databases

Viewing Author Selections

Viewing Author Names

Saving Author Names

Adding Author Editing

Input Control Navigation

Entry and Input Validation

Titles Form On-Line Help

Example 6-9. Using SQL Server Databases

Summary

7. Database Reports
Review and Preview

PrintDocument Object

Printing Document Pages

Pen Object

Brush Object

Graphics Methods

PageSetupDialog Control

PrintDialog Control

PrintPreviewDialog Control
PrintDocument Object with Databases

Example 7-1. Database Report

Example 7-1. Using SQL Server Databases

Example 7-2. Titles Listing

Example 7-2. Using SQL Server Databases

Example 7-3. Book Publishers Listing

User Interface

Database Connection and Printing

Example 7-3. Using SQL Server Databases

Other Approaches to Database Reports

Summary

8. Distributing a Database Application


Review and Preview

Accessing Database Files in Code

Database File in Application Path

Example 8-1. Opening Database Files in Application Directory

Example 8-1. Using SQL Server Databases

Database File Location with OpenFile Dialog Control

Example 8-2. Opening Database Files with OpenFile Dialog Control

Example 8-2. Using SQL Server Databases

Distribution of a Visual C# Database Application


Application Icons

Custom Icons

Example 8-3. Visual C# Setup Wizard

Step 1. Welcome to the Setup Project Wizard

Step 2. Choose a project type

Step 3. Choose project outputs to include

Step 4. Choose files to include

Step 5. Create project

Building the Setup Program

Installing a Visual C# Application

Summary

9. Database Design Considerations


Review and Preview

Database Design

Database Modeling

Information Requirements

Table Requirements

Field Requirements

Field Types

Null Values

Database Design Implementation


Building Databases with the Microsoft Access

Example 9-1. KWSALES Database with Microsoft Access

Getting Started

Customers Table

Orders Table

Purchases Table

Products Table

Define Relationships

Building SQL Server Databases with Server Explorer

Example 9-2. KWSALES Database with Server Explorer

Getting Started

Customers Table

Orders Table

Purchases Table

Products Table

Define Relationships

Building Access Databases with Visual C#

Example 9-3. KWSALES Database with Visual C#

Adding Reference to ADOX Library

Create a Database

Create a Table
Add Fields to Table

Define Table Primary Key

Define Table Indexes

Define Table Relationships

Example 9-4. SQL Server Databases with Visual C#

Database Testing and Design Refinement

Summary

10. Sample Database Projects


Review and Preview

Overview of Database Projects

Example 10-1. Sales Order Form Project

Preliminaries

Order Information

Existing Customer Information

Adding a New Customer

Product Selection

Submitting an Order

Printing an Invoice

Suggested Improvements

Example 10-1. Using SQL Server Databases

Example 10-2. Home Inventory Project


Home Inventory Database

Preliminaries

Home Inventory Interface

Database Connection

Display Photo

Database Navigation

Editing Records

Load Photo

Adding Records

Deleting Records

Entry Validation

Input Validation

Inventory Report

Stopping the Application

Suggested Improvements

Example 10-2. Using SQL Server Databases

Example 10-3. Weather Monitor Project

Weather Monitor Interface

Record Weather Data Tab

Weather Monitor Database

Database Fields
Adding Date Values and Editing Features

Opening Database Files

Date Display Coordination

View Temperature Data Tab

Temperature Summary Statistics

Temperature Plot

View Precipitation Data Tab

Precipitation Summary Statistics

Precipitation Plot

Weather Monitor Printed Reports

Weather Data Report

Temperature Data Report

Precipitation Data Report

Weather Monitor Help System

Weather Monitor Icon

Weather Monitor Distribution Package

Suggested Improvements

Example 10-3. Using SQL Server Databases

Summary

11. Other Database Topics


Review and Preview
Exporting Database Data

Opening a Sequential File for Output

Writing Data to a Sequential File

Saving a Sequential File

Example 11-1. Exporting Database Data

Importing Database Data

Opening a Sequential File for Input

Reading Data from a Sequential File

Closing a Sequential File

Example 11-2. Importing Database Data

Other Database Types

ODBC Data Objects

Oracle Data Objects

Multi-User Considerations

Database Web Applications

Starting a New Web Applications

Web Form Controls

Building a Web Application

Example 11-3. Viewing Weather Data

Summary

Example 11-4. The Last Database Project


More Self-Study or Instructor-Led Computer
Programming Tutorials by Kidware Software
Course Description: Visual C# and Databases is a tutorial that
provides a detailed introduction to using Visual C# for accessing and
maintaining databases. Topics covered include: database structure, database
design, Visual C# project building, ADO .NET data objects, data bound controls,
proper interface design, structured query language (SQL), and database reports.

Visual C# and Databases is presented using a combination of over 850 pages of


course notes and actual Visual C# examples. No previous experience working
with databases is presumed. It is assumed, however, that users of the course are
familiar with the Visual C# environment and the steps involved in building a
Visual C# application.
Course Prerequisites: To grasp the concepts presented in Visual C#
and Databases, you should possess a working knowledge of Microsoft
Windows. No previous experience working with databases is presumed. It is
assumed, however, that users of the course are familiar with the Visual C#
environment and the steps involved in building a Visual C# application (such
background can be gained from our Learn Visual C# course). You will also
need the ability to view and print documents saved in Microsoft Word. Finally,
and most obvious, you need to have Microsoft Visual Studio Community
Edition. This is a separate product that can be downloaded for free from
Micrososoft’s website: https://www.visualstudio.com/free-developer-offers/
How To Take the Course: Visual C# and Databases is a self-paced
course. Each chapter will require a different amount of time. The suggested
approach is to decide how much time you can spend each week working through
the notes. Print out the notes one chapter at a time. Then, work through the notes
at your own pace. Try to do each example as it is encountered in the notes. Work
through the projects. If you need any help, all completed projects are included in
the Code folder.
Software Requirements
Visual Studio 2017 will install and run on the following operating systems: •
Windows 10 version 1507 or higher: Home, Professional, Education, and
Enterprise (LTSB is not supported) • Windows Server 2016: Standard and
Datacenter
• Windows 8.1 (with Update 2919355): Basic, Professional, and Enterprise •
Windows Server 2012 R2 (with Update 2919355): Essentials, Standard,
Datacenter • Windows 7 SP1 (with latest Windows Updates): Home Premium,
Professional, Enterprise, Ultimate
Hardware Requirments
• 1.8 GHz or faster processor. Dual-core or better recommended
• 2 GB of RAM; 4 GB of RAM recommended (2.5 GB minimum if running on a
virtual machine) • Hard disk space: 1GB to 40GB, depending on features
installed
• Video card that supports a minimum display resolution of 720p (1280 by 720);
Visual Studio will work best at a resolution of WXGA (1366 by 768) or higher
Installing and Using the Downloadable Solution Files:

If you purchased this directly from our website you received an email with a
special and individualized internet download link where you could download the
compressed Program Solution Files. If you purchased this book through a 3rd
Party Book Store like Amazon.com, the solutions files for this tutorial are
included in a compressed ZIP file that is available for download directly from
our website (after registration) at:

http://www.kidwaresoftware.com/vcsdb2015-registration.html

Complete the online web form at the webpage above with your name, shipping
address, email address, the exact title of this book, date of purchase, online or
physical store name, and your order confirmation number from that store. We
also ask you to include the last 4 digits of your credit card so we can match it to
the credit card that was used to purchase this tutorial. After we receive all this
information we will email you a download link for the Source Code Solution
Files associated with this book.

Warning: If you purchased this book “used” or “second hand” you are not
licensed or entitled to download the Program Solution Files. However, you can
purchase the Digital Download Version of this book at a highlydiscounted price
which allows you access to the digital source code solutions files required for
completing this tutorial.
Installing Visual C# and Databases: The course notes and code
for Visual C# and Databases are included in one single ZIP file. Use your
favorite ‘unzipping’ application to write all files to your computer. The course is
included in the folder entitled VCSDB. This folder contains three other folders:
Databases, Notes and Code.

The Databases folder holds the sample databases used in the course. The Code
folder includes all the Visual C# projects developed during the course. The
applications are further divided into Class folders. Each class folder contains the
Visual C# and Databases project folders. As an example, to open the project
named Example 1-1 discussed in Class 1, you would go to this directory:
C:\VCSDB\Code\Class 1\Example 1-1\
Foreword By David B. Taylor, Former College
Professor & Department Chair

Most computer programs in use today require some interaction with information
stored in a database so learning to program with databases increases the
marketability of a developer exponentially.

This book is structured as a self-study guide but it is easily adapted to classroom


lectures and discussion. The content of the book is excellent. It starts with the
basics and graduates in small and clear but functional increments. It makes
database programming much easier to teach and learn.

“Visual C# and Databases” provides a complete, thorough, and easy to


understand explanation of database program development from two people who
came up through the ranks as software developers. Their examples reflect real-
world applications that will help new developers quickly master database
software development. Students can easily convert and expand the examples for
their own applications. For example, the Books Database in Chapter 4 could
easily be modified to search a similar database of cars, bikes, or passwords, etc.
Examples are created using Microsoft’s Access database management system
(DBMS) and SQL Server. This makes it easy for the student to compare their
capabilities and syntax.

I have sincerely enjoyed reading and working through the examples in, “Visual
C# and Databases”. The examples are clear and easy to follow. If I had any
questions or if my code did not work I could simply peek at the author’s
completed code examples to get back on track.

Throughout the book the authors bring attention to the importance of user
interface (UI) design. This is more important than may be obvious at first but
developers tend to focus on the code and forget about the UI but eventually
someone needs to use this program so a functional and attractive presentation of
the program can be the difference between success and failure of the end
product.
A major plus for this text is how the authors include additional and very useful
parallel topics such as the On-Line Help system created in HTML in Chapter 5
and the Graphics Methods in Chapter 7. The book is not about HTML or
graphics but the coincidental inclusion give the student a valuable glimpse at
other topics of importance. These are just two examples that didn’t have to be
included but they are added as part of other chapters and will ultimately benefit
the student. This took a lot of forethought by the authors and demonstrates the
real value of the book.

As a programmer, a long-time college professor, and as the former head of the


Computer, Engineering, and Business Department, I have reviewed countless
programming books for most of the popular programming languages. “Visual C#
and Databases” by Conrod and Tylee is my favorite text for helping developers
make the leap into the rewarding field of database development. I highly
recommend this book for anyone who is serious about becoming a professional
software developer/engineer.

David B. Taylor, B.S.E.T., M.A.Ed., Ed.S.


Former Professor and Department Chair
Computer, Engineering, and Business
Seminole State College
Sanford, Florida
1
Introducing Visual C# and Databases
Preview
In this first chapter, we will do a quick overview of what the course entails. We
will discuss what you need to complete the course.

We’ll take a brief look at what databases are, where they are used, and how
Visual C# is used with databases. And, we’ll review the Visual C# development
environment and the steps followed to build an application in Visual C#.
Course Objectives
⇒ Understand the benefits of using Microsoft Visual C# to build a ‘front-end’
interface as a database programming tool ⇒ Learn database structure,
terminology, and proper database design ⇒ Learn how to connect to a
database using Visual C# data objects ⇒ Learn the use of Visual C# data
bound controls ⇒ Learn to make database queries using SQL (structured
query language) ⇒ Understand proper database search techniques ⇒ Learn
how to ADOX (Active Data Object Extended) technology to create a database
⇒ Learn database management techniques ⇒ Learn to create and produce
database reports ⇒ Learn how to distribute a Visual C# database application
⇒ Understand connection to different types of databases and remote databases
⇒ Introduce other database concepts
Course Requirements An obvious requirement is a
Windows-based computer with Microsoft Windows as well as Visual Studio
2015 Community Edition. The student should be familiar with the basics of
using the Windows operating system.

No knowledge of databases or how to work with databases is presumed.


Adequate introductory material is presented. Even if you’ve worked with
databases before, it is suggested you read through this introductory information
to become acquainted with the nomenclature used by the author for databases
and their component parts.

This course does not teach you how to build a Visual C# application. It is
assumed that the reader has a basic understanding of the Visual C# development
environment and knows the steps involved in building a Visual C# application.
You should feel quite comfortable with building the example application at the
end of this first chapter. If not, our company, Kidware Software, offers several
tutorials that teach this information. Please visit our web site at:
http//www.kidwaresoftware.com
What is a Database?
A database is a collection of information. This information is stored in a very
structured manner. By exploiting this known structure, we can access and
modify the information quickly and correctly.

In this information age, databases are everywhere:

⇒ When you go to the library and look up a book on their computer, you are
accessing the library’s book database.
⇒ When you go on-line and purchase some product, you are accessing the
web merchant’s product database.
⇒ Your friendly bank keeps all your financial records on their database.
When you receive your monthly statement, the bank generates a database
report.
⇒ When you call to make a doctor appointment, the receptionist looks into
their database for available times.
⇒ When you go to your car dealer for repairs, the technician calls up your
past work record on the garage database.
⇒ At the grocery store, when the checker scans each product, the price is
found in the store’s database, where inventory control is also performed.
⇒ When you are watching a baseball game on television and the announcer
tells you that “the batter is hitting .328 against left-handed pitchers whose
mother was born in Kentucky on a Tuesday morning,” that useless
information is pulled from the team’s database (apologies to our foreign
readers who don’t understand the American game of baseball!).

You can surely think of many more places that databases enter your life. The
idea is that they are everywhere. And, each database requires some way for a
user to interact with the information within. Such interaction is performed by a
database management system (DBMS).

The tasks of a DBMS are really quite simple. In concept, there are only a few
things you can do with a database:
1. View the data 2. Find some data of interest 3. Modify the data 4. Add
some data 5. Delete some data

There are many commercial database management systems that perform these
tasks. Programs like Access (a Microsoft product) and Oracle are used
worldwide. In this course, we look at using Visual C# as a DBMS.

Examples where you might use Visual C# as a DBMS:

⇒ Implementing a new application that requires management of a database


⇒ Connecting to an existing database ⇒ Interacting with a database via a
server or the internet

In a DBMS, the database may be available locally on your (or the user’s)
computer, available on a LAN (local area network) shared by multiple users, or
only available on a web server via the Internet. In this course, we spend most of
our time looking at local databases, but access with remote databases is
addressed.

We will look at databases in more depth in the next chapter. You will see that
databases have their own vocabulary. Now, let’s take a look at how Visual C#
fits into the database management system.
Where Does Visual C# Fit In?
For database management, we say our Visual C# application acts as a front-end
to the database. This means the Visual C# application provides the interface
between the user and the database. This interface allows the user to tell the
database what he or she needs and allows the database to respond to the request
displaying the requested information in some manner.

A Visual C# application cannot directly interact with a database. There is a set of


intermediate components between the application and the database known as
ADO (ActiveX Data Object) .NET data objects:

The data objects are Visual C# components that allow connection to the
database, creation of data sets from the database and management of the
database contents. These objects are the conduit between the application and the
database, passing information back and forth between the two.

As mentioned earlier, there are many commercial products (Access, SQL Server,
Oracle) that do database management tasks. You may be asking why use Visual
C# as a database management system (DBMS) when these commercial products
are available? There are two primary advantages to using Visual C# as a DBMS
instead of Access:

1. Your users don’t need to have any commercial product installed on their
computers or know how to use such products. This saves the users money.

2. By building a custom front-end, you limit what your user can do with the
information within the database. Under normal operation, commercial
DBMS provide no such limits.

So, in this course, we will look at how to build Visual C# applications that
operate as front-ends to databases. Research has shown that over half of all
Visual C# applications involve working with databases. We will look at how to
make our applications into complete database management systems, being able
to view, search, modify, add, and/or delete database information.

Before going any further, let’s review the steps in building a Visual C#
application and then build a simple application for practice.
Building a Visual C# Application
In the remainder of this chapter, we will provide an overview of a Visual C#
application and how the Visual C# development environment is used to develop
an application. This should provide you with some idea of what knowledge you
need to possess to proceed in this course and introduce the terminology used by
the author to describe a Visual C# application.
Structure of a Visual C# Windows
Application Project

Application (Project) is made up of:

➢ Forms - Windows that you create for user interface ➢ Controls -


Graphical features drawn on forms to allow user interaction (text boxes,
labels, scroll bars, buttons, etc.) (Forms and Controls are objects.)
➢ Properties - Every characteristic of a form or control is specified by a
property. Example properties include names, captions, size, color,
position, and contents. Visual C# applies default properties. You can
change properties when designing the application or even when an
application is executing.
➢ Methods - Built-in methods that can be invoked to impart some action to
a particular control or object.
➢ Event Methods - Code related to some object or control. This is the code
that is executed when a certain event occurs. In our applications, this code
will be written in the C# language (covered in detail in Chapter 2 of these
notes).
➢ General Methods - Code not related to objects. This code must be
invoked or called in the application.
Steps in Developing Application
There are three primary steps involved in building a Visual C# application:

1. Draw the user interface


2. Assign properties to controls
3. Write code for event methods. Develop any needed general methods.

We’ll look at each step.


Drawing the User Interface and Setting
Properties Visual C# operates in three modes.
⇒ Design mode - used to build application ⇒ Running mode - used to run
the application ⇒ Debugging mode - application halted and debugger is
available We focus here on the design mode.

Several windows should appear when you start Visual C#. If any of these
windows do not appear, they may be accessed using the main window menu
View item.

⇒ The Main Window consists of the title bar, menu bar, and toolbar. The
title bar indicates the project name. The menu bar has drop-down menus
from which you control the operation of the Visual C# environment. The
toolbar has buttons that provide shortcuts to some of the menu options
(ToolTips indicate their function).

⇒ The Form Window is central to developing Visual C# applications. It is


where you draw your application.
⇒ The Toolbox is the selection menu for controls (objects) used in your
application.

The Properties Window serves two purposes. Its primary purpose is to establish
design mode (initial) property values for objects (controls). It can also be used to
establish event methods for controls. Here, we just look at how to work with
properties. To do this, click the Properties button in the task bar:

The drop-down box at the top of the window lists all objects in the current form.
Under this box are the available properties for the active (currently selected)
object. Two property views are available: Alphabetic and Categorized
(selection is made using menu bar under drop-down box). Help with any
property can be obtained by highlighting the property of interest and pressing
<F1>.

⇒ The Solution Explorer Window displays a list of all forms and other files
making up your application
As mentioned, the user interface is ‘drawn’ in the form window. There are four
ways to place controls on a form:

1. Click the tool in the toolbox and hold the mouse button down. Drag the
selected tool over the form. When the cursor pointer is at the desired upper
left corner, release the mouse button and the default size control will
appear. This is the classic “drag and drop” operation.
2. Double-click the tool in the toolbox and it is created with a default size on
the form. You can then move it or resize it.
3. Click the tool in the toolbox, then move the mouse pointer to the form
window. The cursor changes to a crosshair. Place the crosshair at the
upper left corner of where you want the control to be and click the left
mouse button. The control will appear at the clicked point.
4. Click the tool in the toolbox, then move the mouse pointer to the form
window. The cursor changes to a crosshair. Place the crosshair at the
upper left corner of where you want the control to be, press the left mouse
button and hold it down while dragging the cursor toward the lower right
corner. A rectangle will be drawn. When you release the mouse button, the
control is drawn in the rectangle.

To move a control you have drawn, click the object in the form (a cross with
arrows will appear). Now, drag the control to the new location. Release the
mouse button.

To resize a control, click the control so that it is selected (active) and sizing
handles appear. Use these handles to resize the object.

To delete a control, select that control so it is active (sizing handles will appear).
Then, press <Delete> on the keyboard. Or, right-click the control. A menu will
appear. Choose the Delete option. You can change your mind immediately after
deleting a control by choosing the Undo option under the Edit menu.
Random documents with unrelated
content Scribd suggests to you:
dispose of her dowry, and the man, on his side, cannot sell without his
wife’s signature. The société d’acquêts (common property of married
people) is a constant menace in a situation of this kind; one comes to think
that it is of no use for a couple to economise for the sake of their heirs, for,
when one of the two parties dies, the common property goes to the other.
Another case, also serious, may occur. If either husband or wife incurs
debts, these, under the law, become common to both, and it comes about
that the one who has not run into debt finds him or herself compelled to
meet the liabilities of the other!
What manifold complications, what openings for dissension, what
accumulated vexations! Widowhood, widowerhood, seems the only
deliverance from a desperate situation.
But there is something worse still. In a household completely at
variance, weary with strife, the children have to look on at scenes which
wound their belief in the love between husband and wife. In such a case
they suffer through the absence of divorce, both from the moral standpoint
and because they are deprived of property which should fall to them, since
through the société d’acquêts—that stern claimant—the children’s capital
cannot be increased.
If we pass from this array of facts to another, which concerns this
unnatural life of two people, the evil is no less great.
From the time when life together has become impossible, the husband
more or less openly substitutes illicit union for marriage, and most
frequently takes to live with him the woman he has chosen as his new
companion. Because the marriage contract remains unbroken, this is an
insult to the wife, for his house is still her home by law.
Although in a case of separation, the wife almost always acts with
greater circumspection and caution, she will find it difficult to prevent the
echo of any attention she may accept from reaching the ears of her husband,
or his knowledge that she gives willingly to another what she has yielded
with such aversion to himself.
Divorce prevents this gratuitous insult to marriage. The advantages it
offers exceed by far the disadvantages cited by the defenders of an
institution which to-day has grown weak because it has remained
unchanged in the midst of social evolution.
The enemies of divorce assert that it is the destroyer of the family. That
is not so, for there are no more families to destroy. Frankly, honestly, where
is the family of old, since the law of the majority has freed the child, since
compulsory education has lessened the moral authority of parents, without
perceptibly improving the mass of the people; since in the vast field of
higher education boys and girls, through school life, become strangers to
the authors of their being and are mainly indebted to the State for their
training?
If hypocrisy were not at the bottom of the whole matter, it would be
quickly seen that nothing remains of the family as a sacred institution.
Authority on the one side, submission on the other, are the exception; the
sacrifices, too, which parents made in the past, to the point of forgetting
their own well-being, have to-day no longer any reason for existing.
Yes, divorce is useful, necessary, moral. But it may, it should, become
more so, and undergo modification. Divorce by mutual consent must
become the remedy for evils which dishonour the human soul; victims of
unhappy marriages should be able to dissolve their union without the most
intimate details of two lives—poisoned by misunderstanding,
incompatibility of temper, excess, cruelty, and insult—being made a prey to
public curiosity, the malice of barristers, and the opinions of judges. Those
liberated from their matrimonial prison, and ripened by experience, must be
allowed to marry the beloved one who has loved, consoled, and helped
them through the battle of their days.
Nine times out of ten, these new marriages would be happy, because the
husband and wife would have had time to appreciate each other’s qualities,
because they would have obeyed the law of love, escaped convention and
not been guided, generally speaking, by interest, that chief and pernicious
element in conflict between the sexes.
Divorce, as at present established, does not afford enough solutions for
the melancholy problems resulting from marriage. It is inadmissible,
inhuman, even immoral, that one who has suffered patiently twenty years
“for the children’s sake” should be condemned, because he or she has left
the torture-chamber, to pass the remainder of life without the right to create
a new home and consecrate by marriage the affection and devotion which
have healed the old wounds, given back joy in living, and created for him or
her obligations at once moral and social.
The day when divorce shall become a law of justice, and no longer—as
it sometimes is now—a tacit agreement covering wrongdoing; the day when
divorce shall exist by the will of him or her who gives valid reasons for it,
and also by mutual consent; the day, finally, when lover and beloved, under
normal conditions, may marry, then true and rightful solutions will have
been brought to impossible situations, and a noble work done for the
individual and society at large.
THE FAMILY

The conditions of the modern family, in the northern countries particularly,


have in reality become almost artificial; and it seems probable that, in the
near future, the family will be completely disintegrated.
In France, especially amongst the bourgeoisie, the family appears to me
likely to remain for a long time what it has been heretofore, because it
constitutes an association the members of which, closely grouped, protect
their common interests, whether commercial or industrial.
This family, representing a society in the possession of property, will
exist as long as its members, in virtue of their fellowship, preserve intact
their old social conditions, each of them continuing to have an interest in
the success of their common enterprise.
In Spain, where the Moorish government has left so many traces of its
primitive organisation, the family still continues in a state of slavery, a state
wherein the woman glories.
But the question here is not of these two particular cases, where the
maintaining of the family group serves the interests of the man, the head,
the master; for the family differs according to different centres, countries,
customs, and castes.
To come to more general statements, we must first go back to the
fountain-head, and consider the family in its evolution through the course of
civilisation.
The family, as it first appears in the history of humanity, was a
patriarchal association formed of the father, mother and children. There was
no binding marriage, but repeated unions. The conditions were such that the
women were for all men indiscriminately, and the children knew no father
in particular. This state of things in many cases continued so long that the
Christian Church was obliged, at its birth, to wink at this communism.
Herodotus tells us that the children of the Lycians bore the name of their
mother; Varro assures us that it was the same in Athens, and that the
woman, being the producer of wealth, was the only one to inherit.
When polygamy began, the woman was reduced to a state of seclusion
and often of slavery. Her part consisted principally in bringing children into
the world, and her care of them was more through instinct than love.
As for the man, he sought nothing, as regarded the woman, but his own
gratification, and concerned himself not at all about fatherhood.
Later on, through the growth of civilisation, monogamy decided the
limits of the family and formed class groups; but gradually, these groups
becoming mixed and losing their old characteristic of brotherhood, the
conditions of the family became much modified.
The causes of this slow process of breaking up accumulated, according
to the particular centre and to social degrees. In one place
primogenitureship began to take to itself privileges; in another the paternal
power lessened the mother’s authority over her daughters; everywhere there
was a tendency towards emancipation, and, finally, in our own day, at the
two poles of society, family conditions have become almost artificial.
The home peace is troubled, and even where there is no rupture between
the husband and wife, there is mental friction between parents and children,
between brothers and sisters, through the clash of opinion, mutual
intolerance, and the collision of personal interests; it is rarely that harmony
prevails in the household.
It must be said that the reasons for marriage are not the same as they
were in the old days, when the bond was indissoluble, based on the instinct
of ownership, on the government of a community. Besides, the marriage for
love, the only one worthy of respect, has destroyed the original idea of the
association, and, unable to guarantee its own continuance, calls for an
adjustment of responsibilities by means of the law, so that the man shall no
longer be the brutal master, and the woman—though she be more moral,
more virtuous, and more temperate than he—humiliated and degraded. It
has been said that it is enough for a woman to be beautiful and to be a
mother. That is altogether absurd nonsense. The woman has a right to the
complete development of her faculties, a right to bring into play all the
resources of her being. Noble women have proved that, quite apart from
maternity, they are fit to walk in the immortal footsteps of heroes, artists
and thinkers, and every day we see women
THE INFANTA EULALIA
Photograph by Baumann, Munich.

becoming, in talent, energy, and patient determination, rivals of scientists,


poets, and all who devote themselves to enterprise in the world of mind.
But, it may be said, such claims are contrary to the idea of the family.
Not at all. The family, essentially modified, each member subject to the
determinism of thought and ensuring the observance of mutual rights and
duties, will only become a more beautiful institution than before, its
children born of sincere love and no longer the product of undesirable or
questionable unions based upon the interests of the strongest.
THE COMPLETE INDEPENDENCE OF WOMAN

To this question squarely put: “Why does a man arrogate to himself the
right to live as he chooses, and why should a woman submit to a prohibitive
moral code?”—men answer that in marriage the virtue of the wife and the
legitimacy of her children are absolutely and supremely essential.
This touches one point merely, and only applies to married women. In all
that concerns “free” women, by what right are they condemned to abstain
from making full use of their independence, as most men do? “Woman’s
life, like man’s,” says Miramont, “is a harmonious evolution, by which
every phase is developed, and which thus brings into play a succession of
forms and aspects of existence. Daughter, mother and grandmother;
dreamer, fighter, thinker—woman, like man, passes through many
transformations in the course of life, and is always progressive.”
By the same fact of social evolution, thanks to her participation in the
battle of life, and also to a rational education, it has long been proved that
woman is not an inferior creature, of no use save for the propagation of the
species.
We are far removed, happily, from the theories of Schopenhauer, who
declared that woman was afflicted with intellectual shortness of sight, that
she was childish, futile and narrow, inferior to man in everything
concerning rectitude and scrupulous honesty; that she was lacking in sense
and reflection, incapable of taking any unbiased view, etc. etc.
If woman’s characteristic feature be that nature has destined her for
motherhood, it is none the less true that, just as she has a fine skin and
quick sensibilities, her intellect is prompt to seize details, and that she
possesses a brain as well furnished as that of man.
Her apparent inferiority comes from the fact that woman is oppressed by
the law and ill-treated by the moralist, whence result her native timidity and
diffidence. The truth is that man, desiring to keep the supremacy attributed
to him, does not care to see in woman the qualities of courage and
independence. He will not admit the immanent struggle between two beings
inspired by the same needs and the same desires. Men would like women to
remain tied down to household cares, while thinking women who have
ceased to resign themselves to this wish their sex to profit by all the rights
of men.
The partisans of absolute feminism desire that there should be no
difference between men and women, in the name of biological equality
which incites them to claim social equality.
Without going so far as this, it is certain that women should now enjoy
more independence and be authorised, without losing caste in the eyes of
moralists, to prove the strength of their personal faculties.
Unfortunately, as a modern thinker has observed: “Kept apart from
magnificent realities ... maintained continually in a state of moral
independence worse than physical slavery, only quitting the maternal yoke
to fall under that of a husband, trained entirely with a view to marriage,
which is to transform at a stroke the child into the wife, the wife into the
mother, educated according to the prejudices of their set at the sacrifice of
expansion of their own personality, women do not develop normally, except
by finding a kindred soul, according to the ideal formed in their dim
consciousness. And as social conventions do not permit them to seek this
ideal, which is falsified and made vague, too, by novel-reading,
enlightenment usually comes to them too late to destroy the effect of a
narrow existence accepted through timidity, ignorance, or chagrin, and
moulded by the dictates of society; so they live, for the most part, either like
children broken in to their destiny, or like rebels in search of visionary
compensations: in any case misunderstood.”
I have nothing better to add. For centuries, man has denied to woman her
finest qualities, which are fearlessness and presence of mind, and the
majority of women have come to be convinced themselves that these
qualities are unwomanly and to be reckoned faults.
Now, if tenderness be woman’s most beautiful attribute, it should be
recognised that true tenderness is especially found amongst those women
who are courageous, strong and endowed with shrewd sense. The
acceptance of servitude does not admit of real tenderness, such as
influences, for instance, the conception and carrying out of works of art, as
incites to noble action, and produces wonderful results in every degree of
the social scale.
For years, in many countries, the attention of thinkers has been fixed
upon the liberation of woman. Many mistakes have been made. Against one
John Stuart Mill a crowd of philosophers like Nietzsche have arisen, but the
idea is gaining ground in scientific centres, and, with the help of rational
Socialism, the work of woman’s emancipation is being steadily pursued.
Reverting to old times, we find that in many primitive races, the males
were chosen by the females for their valour, physical strength, or natural
beauty. This selection having led to the progressive development of the
male in the majority of races, resulted in an ideal female type also.
But when the woman became the “property” of the man, the slave
destined to work for the male, the development of the race stopped short;
the salutary effect of the woman’s free choice having ceased.
In a new state of society, when woman, duly trained for her part, shall
recover her complete freedom, we shall see the triumph of affinities, and the
power of a feminine ideal will ensure for the future a new and vigorous
race.
THE WAR AGAINST FEMINISM

It is incomprehensible that so many intellectual, sensible men, claiming to


be logical, should be hostile to modern feminism. I say “modern” to mark
the actual state of conflict, for eternal feminism is contemporaneous with
the eternal feminine, as Lucien Muhlfeld says. Following Schopenhauer and
Strindberg, who strove to demonstrate the inferiority of woman, our
detractors, in making war upon feminism, show themselves to be very
inconsistent. As woman, is, in their eyes, an inferior being, they are either
fighting what they have no reason to fear, which shows lack of courage on
their part; or, by admitting that under present conditions woman plays an
important part in everyday life, they recognise in her a certain value, which
shows a lack of sincerity.
On the day woman first recognised the fact that she could earn her living
by taking up the employments hitherto reserved for men, she made good her
claim to a share of instruction and training by means of which to put an end
to her mental inequality.
Unable to escape from the subordinate position in the family thrust upon
her by the Civil Code, she determined to free her mind first, and gain
recognition of her rights in the domain of intellect. This seemed
inadmissible, even in respect of the principles of science.
Now, in times gone by, women worked as much as, and often more than,
men, thus gaining recognition of their physical strength. When man was
still a barbarian, hunting and fighting for mere subsistence, woman hunted
and fought with him; just as his comrade, she carried the slain beast over
her shoulder. Later, she spun flax to clothe her family; she was obliged, in
her enslaved condition, to turn to common uses her intellect and devotion,
and when, later still, the family was placed on a legal footing, she was
obliged to give all her faculties to manual labour.
Long centuries passed. Man had no longer to fight for his daily bread.
One invention after another had gradually modified the conditions of his
life; he had become educated, had attained to different trades and
professions, developed his power and authority, while woman remained the
same dependent creature, tied to her duties as wife and mother. A time came
when woman, too, learnt trades which she made her own. Man took them
from her, possessed himself of her needle, of clothes-making, hairdressing,
cookery. This is why, in the eighteenth century, women attempted an inroad
into letters and the arts. This is why, helped by the Revolution, they sought
to claim common rights. To-day, trained at school and college, women
know that they can utilise their faculties more nobly than hitherto. They no
longer live in an epoch when, men having absorbed everything, they have
to resign themselves to being married, whilst hardly more than children, for
a livelihood.
Consider how sad was the lot of the woman when, devoid of the means
to free herself honestly from slavery, she was compelled to sell herself, by
legal marriage or otherwise.
Whatever certain philosophers and anti-feminists may say, the reason
why the personality of the woman weakened in the course of ages, was that
her physical force had been exhausted, which entailed mental inferiority.
But through the progress of science, innovations of all kinds, economic
and social evolution, daily events; throughout the complexities of a new
life, woman began to make her influence felt, became conscious of her
powers, strengthened by study, system and experience.
Strindberg, the misogynist, when he declared that “woman is incapable
of acquiring complete knowledge in any branch of study whatsoever,” said
a foolish thing. In proof of the contrary, in the university, in the art schools,
in law, women are said to be, if not superior to men, at least their equal.
It must be remembered that it is less than a century since woman, even in
the most advanced countries, was first allowed to receive the same training
as man. Taking into consideration how far behind her rival in intellect she
then was, the results she has obtained give a flat contradiction to those who
opposed her equality, which, originally a law of nature, has, under modern
social conditions, become a law of existence.
If it be true that it takes several generations to perfect a race from a
physical point of view, it is equally true that several generations are needed
for the development of the moral and intellectual qualities. If only through
the consciousness of her ego, woman is called to take a more important
place in the life of nations.
From the dependent that she once was, woman will become the agent
required by her times. If she no longer receives from her comrade, as in old
Teutonic days, the cuirass, helmet, and sword, that she may fight by his
side, she will none the less endeavour to equal him in the field of intellect.
The start which man has gained and still keeps in the realms of Science
and Art does not justify him in boasting over the inferiority of woman.
To sum up, woman claims no more than her right to-day when she
demands knowledge of all the occupations in which man is employed and
reserves for himself; when she desires to exercise her judgment and prove
both her skill and taste.
“Whereas in men,” says Louis Dimier, “taste, which is a power of the
mind, precedes and commands skill, which is organic aptitude; in women,
on the other hand, it seems to be skill which determines and commands
taste. One might say literally that with a woman the feeling for the beautiful
is in her fingers. All women, too, some more and some less, but without
exception, make use of their powers of action; but a man cannot rely all his
life on the possession of his capacity for judgment.”
Yes, woman is, fundamentally, man’s equal. Belittled as she has been till
recently by conditions which made her a nonentity, she is now, thanks to the
spread of education, the mingling of classes, and social changes, becoming
a respected worker and a valued being. Born into a new life, she will no
longer be the jealous rival of man, but his useful fellow-worker, as she has
always been his generous comrade, sharing his joys and sorrows.
THE EQUALISING OF CLASSES BY EDUCATION

The education which is the progressive adaptation of humanity to the


conditions of social life has been, in a general way, so greatly developed by
our modern civilisation, that it has, if not created the complete equalisation
of the classes, at least brought the aristocracy, the middle classes, and the
people together in a common effort towards individual action.
It cannot be denied that a very curious phenomenon exists in the
equalisation so far effected, the causes of which are manifold, and amongst
which the most noticeable and obvious are the partition of large fortunes,
the importance assumed by Labour Syndicalism, and the competition
established in all trades and professions.
Scarcely anything remains now of the ancient conditions of nations; the
abolition of slavery has transformed the idea of servitude; compulsory
education has raised the level of the lower classes, and by this means the
first stone of the Socialistic edifice has been laid. But humanity, in attaining
to a higher degree of self-consciousness, to a new ideal, has developed a
spirit on new lines, and created for itself needs with which the old instincts
have nothing to do. Capitalists, manufacturers, merchants, labour leaders,
workpeople of all kinds, find themselves arrayed against one another in a
new perception of their rights (if not always of their duties), and all, in the
light of newly discovered needs, are jostling one another in life in this all-
pervading struggle.
The mass of the people, whose one instinct in former times was the bare
preservation of life, is on the way to emancipation; the pressure from
beneath is mounting like a wave, leaping upward to the social strata where
hitherto the monopoly of lucre and jobbery has been jealously held; the
workmen’s associations, in their war against capital, want themselves to
capitalise; members of the working class, with growing improvement in
education, are entering the professional field; the middle classes are
struggling for the attainment of public offices, and, by an inevitable
reaction, the aristocracy, mulcted of some of its ancestral rights and
privileges, is turning its eyes towards manufacture and commerce.
This does not mean that the balance has become even, for I am of Jean
Lahor’s opinion: “The plutocrats may be preparing for the masses of the
future a still more crushing yoke, with more falsity and more deadening
effect—by the suggestions of the Press, which they have completely in their
power—than has ever been the case with aristocracies or autocracies, whose
authority had its origin at least in the finer human energies, in a noble desire
for power.”
It must nevertheless be recognised that, in order that the relations
between man and man should no longer be in the hands of those devoid of
conscience and feeling, a certain equality, a meeting on common ground for
action, has been already established in modern society; if the lower classes
have climbed the ladder far enough to attain to that domain which seemed
bound to remain in the hands of the higher, the latter, on the other hand,
have not hesitated to leave the heights to which class prejudice might have
held them, and invade the territory of trade and commerce.
A man of high position will no longer lose caste by becoming the head
of a motor factory; a nobleman may take part in commercial enterprise, a
prince of the blood sell, in his own name, the products of his vineyards and
lands.
It is the same from the point of view of women. As they think more, as
they become carried away by the desire to prove their value and the need
for individual effort, the middle-class woman is reaching towards higher
and higher branches of education. Great ladies, even princesses, do not
disdain to draw profit from the industrial arts, from painting and literature.
These new social conditions could not continue but by the spread and
improvement of education and the growing sense of justice as understood
by Herbert Spencer; that is to say, the responsibility of the individual taken
in connection with the need for social co-operation.
Complete equality will never exist; comparative equality must be based
on such liberty as, by its exercise, cannot infringe upon the liberties of
others.
It must not be forgotten that social harmony is the result of the
adjustment of conflicting rights and duties. One has to-day to take into
consideration the fact that the humblest artisan is working for the good of
society just as is the most famous engineer, the greatest inventor, the noblest
writer, or the most celebrated statesman. Therefore, being “morally equal in
duty, they are morally equal in rights.”
Education, that leveller of castes, dispenser of good, justice, and
harmony, is the outcome of the experience of each utilised for the good of
all. It should come from ourselves as well as from others, and pass through
the way of reason.
“It is through the combined working of all systems of education and
hygiene,” says the author of Pessimisme Heroïque, “it is through the
combined energy of all educators and hygienists, that we shall with
certainty obtain some day fundamental reforms, and immense progress in
the physical, intellectual, and moral life of humanity.”
SOCIALISM

Opposed to Individualism, Socialism is the idea of social equality in


utilising the power, capital, property, labour, etc., of the community. The
generalisation of the term means a social compact, a contract between the
members of a society.
Born in the eighteenth century, with the theory of good to be shared by
the community, Socialism, which should be a united inherent organisation
of the social classes, and of the relations of different classes to one another,
has become divided into several hostile cliques. Each has its partisans; there
is Possibilist Socialism, the Socialism of Marx, Agrarian Socialism,
Parliamentary Socialism, English Municipal Socialism, Collectivist
Socialism, State Socialism, Christian Socialism, Pulpit Socialism—and
more for aught I know.
The very splitting up of the initial idea which aimed at the regulation of
the needs of society, proves that it is a very difficult thing to create, in its
entirety, a new social machine, capable of satisfying everyone.
It is above all a question, in my opinion, of discovering a form of
association which shall defend and protect by its collective force the person
and property of each of its members, and through which each one, while
united to all, is answerable only to himself (apart from obligations agreed
upon), and remains free in his actions.
It should guarantee that no one should be rich enough to take anyone
into bondage, and that no one should be poor enough to be compelled to sell
himself.
Again, no man should be able to say: “I am hungry, I do not know how
to get food: I am cold, I have no means of warming myself: I am homeless,
I do not know where to rest my head.” No woman must need to make
merchandise of herself to escape starvation.
Man being no longer obliged to sell his physical strength or intellect,
woman no longer constrained to throw herself into the market, security of
life would exist for all, and a sort of equality would be established.
But is not this equality a chimera, and can it exist in practice? Are not
abuses inevitable? How can the feelings and duties of everyone be subject
to rule, in such a way as to restrict the great as to their wealth and power
and the small as to their avarice and covetousness?
Socialism would have to impose a sort of economic equality which
would satisfy everyone; so that he who had climbed a few rungs of the
social ladder need not envy him who is already at the top. It must, in short,
do away with every cause of discontent, envy, and revenge, between the
classes who are compelled to have constant dealings with one another. Thus
would great social disorder be avoided. But it would be necessary to keep
clear of side issues, to take as the base of Socialism the “simplifying of
life,” always keeping an intellectual and spiritual ideal as the end in view.
“The characteristic of social organisation,” says Nicati, “is to be the
means of information; a faithful medium between the individuals from
whom primarily all activity emanates, and with whom it ends: just as the
personal intellect intervenes in the emotional domain, between impressions
and the impulses to which they give rise.
“The function of this natural organisation conforms to the religious
principles regulating its formation and acts.
“Its ultimate object is to maintain harmony between men, as the intellect
maintains harmony amongst the emotions, and to unite them in a common
desire for equalisation, balance.
“The doctrine of the cultivation of an intellectual and spiritual ideal,
then, may be defined as a natural social organisation having for aim the
religious pursuit of good, remembering that we understand by ‘religious’
that which is consistent with the natural fabric of social relationship; and by
‘good’ the necessary and natural result of all harmony, balance.”
In reality, however, it appears to me that social equilibrium is no better
established now than it was before. The weight which tipped one side of the
scale is now on the other. The drawbacks of the lack of stability have not
yet disappeared.
Why, for instance, should it be thought advantageous that one class, now
in possession, be completely despoiled to profit another class, which would
then take its place? Whether the inequality existed as from the heights
downwards or from the depths upwards, would not the results be exactly the
same? Is not the supreme power as dangerous in the hands of the many as in
the hands of the privileged?
If it be true that man has a natural right to all that he needs, it is none the
less true that his “right” should not exceed the limits of the needful.
In spite of all theories, the social organisation of humanity is not in
existence yet, and will not exist so long as society fails to comprehend that
its aim is to satisfy the needs of each one, in the order in which they become
manifest.
THE WORKING CLASSES

The part played by the working man in modern society is of extreme


importance. This producer of national wealth is the artery which keeps the
heart of a country beating.
Jean Lahor says: “The wealth, power, and glory of the country are, in
great part, the work of the humblest of her children—of the artisan, the
worker, the common soldier, of unknown heroes of whom no one speaks,
never will speak; silent whilst in life as they will be when dead.”
Lord Avebury, too, says: “It is an interesting illustration of the Unity of
Man, and an encouragement to those of us who have no claims to genius,
that though, of course, there have been exceptions, still, on the whole,
periods of progress have generally been those when a nation has worked
and felt together; the advance has been due not entirely to the efforts of a
few great men, but of their countrymen generally; not to a single genius, but
to a national effort.”
Then, since the working man is the great factor in national greatness, it is
but just that he should be an object of consideration for the thinkers. This is
a truth: the education received by the working man is not consistent with
the place which he occupies in the State.
I have in mind, for the children of the working class, schools specially
adapted to that class, where the child should be taught his rôle in life as a
sort of religion; his employer of the future appearing as a kind of protective
deity. The child destined to become an artisan should be made to
understand, from the most tender age, not to regard himself as a mere tool,
but as the most active element in society. He should be inculcated with
pride in his condition, not have his temper embittered and be taught to hate
the upper classes, which are, from another point of view, a vital element
equally with his own class. The working classes—and this is a point which
Socialism and Evolutionism have failed to recognise—should form a
majority set apart in the nation, not for the purpose of excluding them from
the common good, but, on the contrary, for their advantage, as being the
most active and least fortunate.
In all countries which recognise wherein their strength consists, the
working man should be the object of constant care on the part of the
administration; he should be recompensed according to his merits, and
receive help in his needs. The entire health of a country depends so much
on that of the working population, that dwellings built in accordance with
the most perfect sanitary conditions, public baths and wash-houses, national
parks as in America, and institutes where he could educate himself to a
higher mental life, should be guaranteed to the working man.
It is very strange that, in democratic countries, the most urgent reforms
are generally delayed, that they put off the amelioration of the wretched
conditions prevailing amongst the humblest—yet, by numbers and activity,
the strongest—class; amelioration which is first carried out in aristocratic
countries, such as England.
When French hospitals, for instance, are compared with those in
England, Germany, and Russia, a clear idea is gained of the great
difference, which does honour to the latter countries.
It is said that the first idea of working men’s dwellings originated in
France. I admit it; but they only came into existence there after England and
Belgium had set the example.
Where in the great French centres will you find the garden cities of
England and Germany? Even in the matter of food, from the point of view
of price and quality, the French artisan has reason to envy his English
neighbour.
The artisan is too cramped by material conditions and constant labour,
too much cut off from men superior in mental training to himself; he needs
to be taken out of his sordid environment, allowed to acquire property of his
own, to give him a taste for home life.
When legislators and rulers, teachers and employers, have taught the
working man to recognise his own character and claim respect for his value
to society, a thousand rational reforms will spring into being spontaneously.
It seems to me that in manufacturing centres every house should be a
temple of fraternity. I will give an illustration: An artisan marries. His wife
and he live in a very small house, which, after the birth of their children
becomes too cramped for them, and inadequate from a hygienic point of
view. Close by, there is an artisan living in a much larger house, as he has
had a large family. The children, having grown up, have left their parents,
and for this reason the house has become much too large for them. The
couple whose family have gone take the little dwelling, and the houseful of
children move into the large one. In this way a kindly interchange is made
in response to particular requirements; hence, a share of happiness for
everyone, and health for all.
Utopia! someone will say. Why? There is really nothing simpler. But
then, unfortunately, the simple is always hostile to reason.
DOMESTIC SERVICE

Since the disappearance of slavery, domestic service has taken on new


forms—variable, oppressive—and now it seems likely to disappear
altogether. The terms, Liberty, Equality, Fraternity, misunderstood by some,
misconstrued by others, have created great disquietude in society. The
servant of former days—the wage-earning man or woman—who formed an
integrant part of the family, exists no longer, and those succeeding have
changed the old ways and manners to the point of rendering them
unacceptable—from the time when attachment disappeared before a false
conception of liberty. So that to-day, amongst people of only moderate
means, the lack of servants is becoming a serious problem, although
changing fashions and the competition in “special lines of work” secures us
assistance in much of our daily business.
We occupy ourselves with workmen’s dwellings, have honestly sought to
secure better conditions for the poor; why should we not consider the case
of those blocks of flats where the closeness of the quarters has become one
of the principal hindrances to the “good and loyal service” so much
appreciated by our forbears?
Servants in these days consider themselves as employees of a special
kind, able to dictate their own terms and exempt from various duties. Their
service, continuous and dearly paid, is no longer suitable except in palaces
and large private houses.
In these they form a community of their own which is not, each member
of it individually, every moment of the day in direct contact with the master
and mistress. In such cases as these one scarcely realises the irritating
position of servants with regard to their employers, and vice versa.
The question to be considered is that of small establishments and blocks
of dwellings in large towns where, for the sake of greater accommodation,
the employers’ and the servants’ quarters are close together, perhaps only
divided by glass doors and thin partitions. Now, to ensure respect for the
master and mistress in their private life, and willing obedience from the
servants, distance in point of fact should be in proportion to distance in
point of position and education.
“No great man is a hero to his valet,” says the proverb. This proverb is
unfortunately true. It describes an evil which has grown to such a degree as
to make domestic service in apartments impossible.
In America this question is almost completely settled. In England the
example set by the United States is beginning to be followed. The Continent
in its turn should evolve some practical expedient for the independence of
both employer and employee.
To this end there should be a system of “service by the hour.” This will
have to be arranged in view of the fear that we may find ourselves
servantless. It does not imply that the service now extant will disappear
entirely.
Like all innovations, my suggestion will at first alarm some and bring a
smile to others; it will seem paradoxical in spite of its simplicity. However,
I will explain my idea.
It is not to be denied that we have become servants to our domestics, for
they dictate terms on entering our service, and we are compelled to accept
their conditions for fear of finding ourselves boycotted and unable to get
them at all. In America—I quote typical cases—people have ceased to have
their meals at home on Sunday because the chef or cook spends that day in
the country. In England ladies’ maids refuse to wait up for their mistresses’
return from evening parties. (I knew an unmarried lady who was compelled
to sleep one night dressed as she was because her maid, having locked
herself into her room, declined to get up to unfasten her dress for her!) In
Germany the servants make it a condition that they shall spend so many
evenings at masked balls; in France a weekly or fortnightly “day off” is one
of the least inconveniences created by domestic service.
Is it not the truth that in flats, if one had a woman in in case of need, and
a sort of watchman to guard against burglars, nothing more would be
needed?
“Service by the hour” would have the advantage of providing regular
attendance, and the servants themselves would earn more; they would not
be obliged to listen to the voice of command from the same master or
mistress all day long; they could choose the kind of service they preferred,
just as the employer could choose his employees. There would be more
freedom on both sides: the one party would work more conscientiously, the
other enjoy greater peace of mind. There would be less friction, more
justice, all round. In the absence of close proximity there would be no more
irritating surveillance, no fear of gossip, no ill-temper over work ill-done or
neglected.
If you have a masseur or masseuse, even a “bath attendant,” a
hairdresser, a manicurist, a packer, a “vacuum cleaner,” and a floor polisher,
what remains for you to ask of your servants?
If a woman can come and fetch your dresses to be ironed or “freshened,”
and a man do the same with your coats, and someone else come and polish
your boots, is not that all-important?
Companies for “service by the hour” would have to be established in
different districts. According to one’s needs he would telephone to one of
these establishments for a bath attendant, for someone to truss poultry, for
housework, etc.
And then how delightful it would be to be alone again, no longer spied
upon, to be one’s own master—without any servants!
“But the expense!” someone will say. If you calculate what the servants
living in your house cost you in one way and another, you will come to the
conclusion that there would be less expense for the employer and certain
profit for the servants, whose service by the hour would be better paid.
In some of these modern blocks of dwellings there is but one common
kitchen. It would be sufficient to mention the hour for meals and the
number to be served to ensure regular attendance.
“Service by the hour” would do away with a thousand annoyances, some
merely irritating by their frequency, but others serious, as in England, for
instance, where the evidence of servants has so much weight in cases of
divorce.
With “service by the hour” there would be no more spying, no more
mean revenges, no more dishonourable compromises. As the lower classes
have shaken off the yoke of their slavery, why should we still be the victims
of a new state of things in matters domestic?
There is no perfect happiness without real independence. Let us aim at
independence for everyone.
In doing good in a new way the human end in view has not changed. Let
us bear in mind that good for all is only found in individual freedom.
INTERNATIONAL SCHOOLS

Now that the different peoples fraternise over science, commerce, and
industry, now that they are jointly liable, in the name of economic relations,
now that collective work, free from “national etiquette,” is instrumental in
producing material and moral progress for all, international schools ought to
be founded in the different civilised countries.
These nurseries of the intellect and will would bring pupils together by
one single rational system of training; the pupils would be subject to the
same examinations; and there would be effected between the different
countries an exchange of individualities, destroying race hatred in the idea
of rights common to all and the rightful administration of collective
communities.
Armed peace, costly as it is for every nation, is a benefit in these modern
times. Each nation, by preserving the integrity of its own territory, is more
at liberty for intercourse with its neighbours, and for the development of the
high ideals which are urging the peoples towards economic unity.
In former times, taking France as an example, the various provinces
detested one another, and were at variance through all kinds of conflicting
interests. They were separated by the barrier of opposite temperaments,
dissimilar customs; each of them preferring to remain a stranger to the rest,
though they all spoke the same language. But by means of gradual changes,
they were at length drawn together, each province grew to feel a certain
oneness of thought with the others, until finally the rigid barriers broke
down, and to-day the whole race aims at the training in international feeling
of every individual, desiring that future generations, free from too local a
patriotism, should attain to what I may call geographical fraternity. For this
object nothing would be so valuable as the creation of international schools,
by which the tide of different ideas may enter, and thus solve the great
problem of comparative education.
Let us imagine similar schools in every country. Young men and girls,
sent abroad to follow up the course of study they have begun in their own
country, would find the completion of their education in the mental
intercourse offered by contact with the boys and girls of the foreign school.
They would by this means widen the horizon of their ideas, they would
become cosmopolitan without effort, reap such advantages from foreign life
as would greatly add to the force of their own personality, and return home
with an equipment of sound judgment and self-possession. In addition, they
would have learnt the foreign languages so necessary to the pursuit of
commerce, manufacture, letters, and the arts.
The young man and the girl thus educated in the idea of world-
relationship would hold their own in the circles to which they belonged, and
would be certain to do their country good service at an age when, in the
ordinary course of things, they might dream of going abroad for the sake of
seeing the world, without any ability to profit by that exchange of ideas and
comparison of manners which the international school would secure to
them just at the impressionable age.
When one considers how useless in most cases, and how invariably
costly to parents, travelling is in the case of young men destined for
professional or even commercial careers, when undertaken after their
education is completed, one must acknowledge the advantage which would
result from the exchange between the countries of young, amenable pupils,
quick to assimilate all the elements needed for complete training.
Of course each student sent abroad would have professors of his own
tongue and race to continue the course of study he was pursuing at home.
But from the very fact that they were living in a foreign land, they would be
able to learn the new language outside the classroom without any trouble,
and become initiated in new ways and ideas, acquiring all sorts of useful
knowledge, which would help to mature their minds. So would each one,
without losing contact with his own land, profit by the constant recurrence
of matters for comparison and analysis.
Sainte-Beuve had conceived the project of such a state of things when,
on the eve of the Franco-German War in 1870, he said: “War is being
prepared between the two greatest peoples in Europe.... It would be better to
found two schools, one in Berlin and one in Paris. The flower of our youth
would go and strengthen their minds in the laboratories of Berlin, which are
richer than ours; the Prussians would come here and be moulded to our
French grace.” The real difficulty between nations is that of mutual
understanding. Whether it be a question of medicine, manufacture,
commerce, or education, there are many efforts made which, in the first
instance, are unknown in neighbouring countries, and thereby progress is
hindered. By means of international schools, a solution would be found to
problems common to all, for instruction would pass from one to another.
In commercial and industrial matters, especially, dealings between one
country and another would be carried out more easily, and on a larger scale.
Through uniformity of customs, and harmony in feeling and ideas,
brought into play for the good of all, peace would be assured, while rivalry,
on which progress depends, would still exist. Autocracy, democracy,
imperialism, all would be merged in the common desire for improved
conditions.
On the day when harmonious endeavour shall become the rule between
people and people, the wealth of the world will increase tenfold, simply
through the working of all intelligence for the good of every nation.
THE NECESSITY OF RELIGION, AND ITS
INFLUENCE OVER THE PEOPLE

Religion is neither a collection of natural laws nor a philosophic dogma.


It is higher in dignity than teachers of to-day represent it, and it will be
understood if we consider the meaning of the word “religion” as applied to
the life of the individual. In the words of Dr. Nicati,” ... applied to an
individual, it denotes the allied operations of the spirit upon which rests his
judgments and actions. As applied to society, it is the symbol of the facts
which determine the relations between individuals; it embraces in one
common term the principles of social harmony.”
In giving us this definition of religion, Dr. Nicati is not considering any
creed in particular, but all religions, each of which, taken separately, is a
moral code.
The religious idea, which French governments of to-day set aside as
useless, is, on the contrary, of obvious utility, primarily for all those whose
brains, ill-supplied with mental nourishment, need both spiritual food and
also a curb. What a strong restraining force is the fear of eternal
punishment; what an encouragement the desire of endless reward!
In vain have all our orators striven, our materialists shown their
contempt; it is none the less true that the wiser spirits—men like Littré,
Taine, and Renan—have maintained in spite of all that “the people must
have a religion, a religion considered purely as an idea inculcating
morality.”
I will not embark upon the study of the evolution of religions, of the
Roman Catholic religion in particular, which, from its origin, remains the
moral authority of the Latin peoples. I will simply state that, compulsory
education notwithstanding, criminality in France has increased in alarming
proportion, whereas in England, as the noble thinker Lord Avebury
remarked some time ago, “prisons have had to be closed for want of
prisoners.”
Let us make no mistake. French criminality is in exact proportion with
the lowering of the moral level; the absence of criminality in England
Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.

More than just a book-buying platform, we strive to be a bridge


connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.

Join us on a journey of knowledge exploration, passion nurturing, and


personal growth every day!

ebookbell.com

You might also like