Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
100% found this document useful (1 vote)
4 views

Practical Database Programming with Visual Basic NET Second Edition Ying Bai(Auth.) download

The document provides links to download various ebooks and textbooks related to programming with Visual Basic and database management, including 'Practical Database Programming with Visual Basic .NET' by Ying Bai. It includes details about the book's content, structure, and sample databases, as well as information about the author and publication. Additionally, it highlights other related programming books available on the same website.

Uploaded by

singueavucan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
4 views

Practical Database Programming with Visual Basic NET Second Edition Ying Bai(Auth.) download

The document provides links to download various ebooks and textbooks related to programming with Visual Basic and database management, including 'Practical Database Programming with Visual Basic .NET' by Ying Bai. It includes details about the book's content, structure, and sample databases, as well as information about the author and publication. Additionally, it highlights other related programming books available on the same website.

Uploaded by

singueavucan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

Download the full version and explore a variety of ebooks

or textbooks at https://ebookultra.com

Practical Database Programming with Visual Basic


NET Second Edition Ying Bai(Auth.)

_____ Tap the link below to start your download _____

https://ebookultra.com/download/practical-database-
programming-with-visual-basic-net-second-edition-ying-
baiauth/

Find ebooks or textbooks at ebookultra.com today!


We have selected some products that you may be interested in
Click the link to download now or visit ebookultra.com
for more options!.

Practical Database Programming with Java 1st Edition Ying


Bai

https://ebookultra.com/download/practical-database-programming-with-
java-1st-edition-ying-bai/

Programming the Web with Visual Basic NET 1st Edition Lynn
Torkelson

https://ebookultra.com/download/programming-the-web-with-visual-basic-
net-1st-edition-lynn-torkelson/

Programming Microsoft Visual Basic NET Version 2003


Francesco Balena

https://ebookultra.com/download/programming-microsoft-visual-basic-
net-version-2003-francesco-balena/

An Introduction to Object Oriented Programming with Visual


Basic NET 1st Edition Dan Clark

https://ebookultra.com/download/an-introduction-to-object-oriented-
programming-with-visual-basic-net-1st-edition-dan-clark/
Programming Microsoft SQL Server 2000 with Microsoft
Visual Basic NET 1st edition Edition Rick Dobson

https://ebookultra.com/download/programming-microsoft-sql-
server-2000-with-microsoft-visual-basic-net-1st-edition-edition-rick-
dobson/

Programming with Microsoft Visual Basic 2012 6th Edition


Diane Zak

https://ebookultra.com/download/programming-with-microsoft-visual-
basic-2012-6th-edition-diane-zak/

Windows Game Programming with Visual Basic and DirectX 1st


Edition Freeze

https://ebookultra.com/download/windows-game-programming-with-visual-
basic-and-directx-1st-edition-freeze/

An introduction to programming using Visual Basic 2008


with Visual Studio Expression edition DVD Schneider

https://ebookultra.com/download/an-introduction-to-programming-using-
visual-basic-2008-with-visual-studio-expression-edition-dvd-schneider/

Visual C Net programming 1st Edition Harold Davis

https://ebookultra.com/download/visual-c-net-programming-1st-edition-
harold-davis/
Practical Database Programming with Visual Basic NET
Second Edition Ying Bai(Auth.) Digital Instant Download
Author(s): Ying Bai(auth.)
ISBN(s): 9781118249833, 1118249836
File Details: PDF, 9.98 MB
Year: 2012
Language: english
Practical Database
Programming with Visual
Basic.NET

ffirs01.indd i 4/25/2012 1:58:59 PM


IEEE Press
445 Hoes Lane
Piscataway, NJ 08854

IEEE Press Editorial Board


Lajos Hanzo, Editor in Chief

R. Abari M. El-Hawary S. Nahavandi


J. Anderson B. M. Hammerli W. Reeve
F. Canavero M. Lanzerotti T. Samad
T. G. Croda O. Malik G. Zobrist

Kenneth Moore, Director of IEEE Book and Information Services (BIS)

ffirs02.indd ii 4/25/2012 3:45:31 PM


Practical Database
Programming with Visual
Basic.NET
Second Edition

Ying Bai
Department of Computer Science and Engineering
Johnson C. Smith University
Charlotte, North Carolina

IEEE PRESS

A John Wiley & Sons, Inc., Publication

ffirs03.indd iii 4/25/2012 2:07:28 PM


Copyright © 2012 by the Institute of Electrical and Electronics Engineers, Inc.

Published by John Wiley & Sons, Inc., Hoboken, New Jersey. All rights reserved.
Published simultaneously in Canada.

No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or
by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted
under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written
permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the
Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 750-
4470, or on the web at www.copyright.com. Requests to the Publisher for permission should be addressed to
the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011,
fax (201) 748-6008, or online at http://www.wiley.com/go/permissions.

Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in
preparing this book, they make no representations or warranties with respect to the accuracy or
completeness of the contents of this book and specifically disclaim any implied warranties of merchantability
or fitness for a particular purpose. No warranty may be created or extended by sales representatives or
written sales materials. The advice and strategies contained herein may not be suitable for your situation. You
should consult with a professional where appropriate. Neither the publisher nor author shall be liable for any
loss of profit or any other commercial damages, including but not limited to special, incidental, consequential,
or other damages.

For general information on our other products and services or for technical support, please contact our
Customer Care Department within the United States at (800) 762-2974, outside the United States at (317)
572-3993 or fax (317) 572-4002.

Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not
be available in electronic formats. For more information about Wiley products, visit our web site at www.
wiley.com.

Library of Congress Cataloging-in-Publication Data:


Bai, Ying, 1956–
Practical database programming with Visual Basic.NET / Ying Bai. – 2nd ed.
p. cm.
ISBN 978-1-118-16205-7 (pbk.)
1. Microsoft Visual BASIC. 2. BASIC (Computer program language) 3. Microsoft .NET.
4. Database design. I. Title.
QA76.73.B3B335 2012
005.2'768–dc23
2011039947

Printed in United States of America.

10 9 8 7 6 5 4 3 2 1

ffirs04.indd iv 4/25/2012 1:59:01 PM


This book is dedicated to my wife, Yan Wang,
and my daughter, Xue Bai.

ffirs05.indd v 4/25/2012 1:59:02 PM


Contents

Preface xxv

Acknowledgments xxvii

Chapter 1 Introduction 1
Outstanding Features about This Book 2
Who This Book Is For 2
What This Book Covers 2
How This Book Is Organized and How to Use This Book 5
How to Use the Source Code and Sample Databases 6
Instructors and Customers Supports 8

Chapter 2 Introduction to Databases 10


2.1 What Are Databases and Database Programs? 11
2.1.1 File Processing System 11
2.1.2 Integrated Databases 12
2.2 Develop a Database 13
2.3 Sample Database 14
2.3.1 Relational Data Model 14
2.3.2 Entity-Relationship Model 17
2.4 Identifying Keys 17
2.4.1 Primary Key and Entity Integrity 17
2.4.2 Candidate Key 18
2.4.3 Foreign Keys and Referential Integrity 18
2.5 Define Relationships 19
2.5.1 Connectivity 19
2.6 ER Notation 21
2.7 Data Normalization 22
2.7.1 First Normal Form (1NF) 22
2.7.2 Second Normal Form (2NF) 23
2.7.3 Third Normal Form (3NF) 24
vii

ftoc.indd vii 4/25/2012 1:59:04 PM


viii Contents

2.8 Database Components in Some Popular Databases 26


2.8.1 Microsoft Access Databases 26
2.8.1.1 Database File 27
2.8.1.2 Tables 27
2.8.1.3 Queries 27
2.8.2 SQL Server Databases 28
2.8.2.1 Data Files 28
2.8.2.2 Tables 29
2.8.2.3 Views 29
2.8.2.4 Stored Procedures 29
2.8.2.5 Keys and Relationships 30
2.8.2.6 Indexes 30
2.8.2.7 Transaction Log Files 30
2.8.3 Oracle Databases 31
2.8.3.1 Data Files 31
2.8.3.2 Tables 31
2.8.3.3 Views 32
2.8.3.4 Stored Procedures 32
2.8.3.5 Indexes 33
2.8.3.6 Initialization Parameter Files 33
2.8.3.7 Control Files 33
2.8.3.8 Redo Log Files 34
2.8.3.9 Password Files 34
2.9 Create Microsoft Access Sample Database 34
2.9.1 Create the LogIn Table 34
2.9.2 Create the Faculty Table 36
2.9.3 Create the Other Tables 38
2.9.4 Create Relationships among Tables 41
2.10 Create Microsoft SQL Server 2008 Sample Database 44
2.10.1 Create the LogIn Table 46
2.10.2 Create the Faculty Table 48
2.10.3 Create Other Tables 49
2.10.4 Create Relationships among Tables 54
2.10.4.1 Create Relationship between the LogIn and the Faculty Tables 54
2.10.4.2 Create Relationship between the LogIn and the Student Tables 57
2.10.4.3 Create Relationship between the Faculty and the Course Tables 58
2.10.4.4 Create Relationship between the Student and the
StudentCourse Tables 59
2.10.4.5 Create Relationship between the Course and the
StudentCourse Tables 60
2.11 Create Oracle 11g XE Sample Database 61
2.11.1 Create a New Oracle Customer User or User Account 63
2.11.2 Create New Customer Sample Database CSE_DEPT 65
2.11.3 Create the LogIn Data Table 69
2.11.4 Create the Faculty Data Table 71
2.11.5 Create Other Tables 74
2.11.6 Create the Constraints between Tables 78

ftoc.indd viii 4/25/2012 1:59:04 PM


Contents ix

2.11.6.1
Create the Constraints between the LogIn and Faculty Tables 78
2.11.6.2
Create the Constraints between the LogIn and Student Tables 81
2.11.6.3
Create the Constraints between the Course and
Faculty Tables 83
2.11.6.4 Create the Constraints between the StudentCourse
and Student Tables 83
2.11.6.5 Create the Constraints between the StudentCourse
and Course Tables 85
2.12 Chapter Summary 87
Homework 88

Chapter 3 Introduction to ADO.NET 91


3.1 The ADO and ADO.NET 91
3.2 Overview of ADO.NET 93
3.3 The Architecture of ADO.NET 94
3.4 The Components of ADO.NET 95
3.4.1 The Data Provider 95
3.4.1.1 The ODBC Data Provider 97
3.4.1.2 The OLEDB Data Provider 97
3.4.1.3 The SQL Server Data Provider 98
3.4.1.4 The Oracle Data Provider 98
3.4.2 The Connection Class 99
3.4.2.1 The Open() Method of the Connection Class 101
3.4.2.2 The Close() Method of the Connection Class 102
3.4.2.3 The Dispose() Method of the Connection Class 102
3.4.3 The Command and the Parameter Classes 103
3.4.3.1 The Properties of the Command Class 103
3.4.3.2 The Constructors and Properties of the Parameter Class 104
3.4.3.3 Parameter Mapping 105
3.4.3.4 The Methods of the ParameterCollection Class 107
3.4.3.5 The Constructor of the Command Class 108
3.4.3.6 The Methods of the Command Class 109
3.4.4 The DataAdapter Class 112
3.4.4.1 The Constructor of the DataAdapter Class 112
3.4.4.2 The Properties of the DataAdapter Class 112
3.4.4.3 The Methods of the DataAdapter Class 113
3.4.4.4 The Events of the DataAdapter Class 113
3.4.5 The DataReader Class 115
3.4.6 The DataSet Component 117
3.4.6.1 The DataSet Constructor 119
3.4.6.2 The DataSet Properties 120
3.4.6.3 The DataSet Methods 120
3.4.6.4 The DataSet Events 121
3.4.7 The DataTable Component 123
3.4.7.1 The DataTable Constructor 124
3.4.7.2 The DataTable Properties 125

ftoc.indd ix 4/25/2012 1:59:04 PM


x Contents

3.4.7.3 The DataTable Methods 126


3.4.7.4 The DataTable Events 126
3.4.8 ADO.NET Entity Framework 4.1 128
3.4.8.1 Advantages of Using the Entity Framework 4.1 130
3.4.8.2 The ADO.NET 4.1 Entity Data Model 132
3.4.8.3 Using the ADO.NET 4.1 Entity Data Model Wizard 136
3.5 Chapter Summary 145
Homework 146

Chapter 4 Introduction to Language Integrated Query (LINQ) 149


4.1 Overview of Language Integrated Query 149
4.1.1 Some Special Interfaces Used in LINQ 150
4.1.1.1 The IEnumerable and IEnumerable(Of T) Interfaces 150
4.1.1.2 The IQueryable and IQueryable(Of T) Interfaces 151
4.1.2 Standard Query Operators 152
4.1.3 Deferred Standard Query Operators 154
4.1.3.1 AsEnumerable (Conversion Purpose) 154
4.1.3.2 Cast (Conversion Purpose) 154
4.1.3.3 Join (Join Purpose) 154
4.1.3.4 OfType (Conversion Purpose) 156
4.1.3.5 OrderBy (Ordering Purpose) 156
4.1.3.6 Select (Projection Purpose) 157
4.1.3.7 Where (Restriction Purpose) 158
4.1.4 Nondeferred Standard Query Operators 158
4.1.4.1 ElementAt (Element Purpose) 158
4.1.4.2 First (Element Purpose) 159
4.1.4.3 Last (Element Purpose) 159
4.1.4.4 Single (Element Purpose) 159
4.1.4.5 ToArray (Conversion Purpose) 160
4.1.4.6 ToList (Conversion Purpose) 160
4.2 Introduction to LINQ Query 161
4.3 The Architecture and Components of LINQ 164
4.3.1 Overview of LINQ to Objects 165
4.3.2 Overview of LINQ to DataSet 165
4.3.3 Overview of LINQ to SQL 166
4.3.4 Overview of LINQ to Entities 167
4.3.5 Overview of LINQ to XML 168
4.4 LINQ to Objects 168
4.4.1 LINQ and ArrayList 169
4.4.2 LINQ and Strings 170
4.4.2.1 Query a String to Determine the Number of Numeric Digits 171
4.4.2.2 Sort Lines of Structured Text by any Field in the Line 172
4.4.3 LINQ and File Directories 175
4.4.3.1 Query the Contents of Files in a Folder 175
4.4.4 LINQ and Reflection 177

ftoc.indd x 4/25/2012 1:59:04 PM


Contents xi

4.5 LINQ to DataSet 179


4.5.1 Operations to DataSet Objects 179
4.5.1.1 Query Expression Syntax 180
4.5.1.2 Method-Based Query Syntax 182
4.5.1.3 Query the Single Table 184
4.5.1.4 Query the Cross Tables 186
4.5.1.5 Query Typed DataSet 189
4.5.2 Operations to DataRow Objects Using the
Extension Methods 192
4.5.3 Operations to DataTable Objects 196
4.6 LINQ to SQL 197
4.6.1 LINQ to SQL Entity Classes and DataContext Class 198
4.6.2 LINQ to SQL Database Operations 202
4.6.2.1 Data Selection Query 203
4.6.2.2 Data Insertion Query 205
4.6.2.3 Data Updating Query 206
4.6.2.4 Data Deletion Query 207
4.6.3 LINQ to SQL Implementations 210
4.7 LINQ to Entities 210
4.7.1 The Object Services Component 211
4.7.2 The ObjectContext Component 211
4.7.3 The ObjectQuery Component 211
4.7.4 LINQ to Entities Flow of Execution 211
4.7.4.1 Construct an ObjectQuery Instance 212
4.7.4.2 Compose a LINQ to Entities Query 212
4.7.4.3 Convert the Query to Command Trees 212
4.7.4.4 Execute the Query 213
4.7.4.5 Materialize the Query 214
4.7.5 Implementation of LINQ to Entities 214
4.8 LINQ to XML 215
4.8.1 LINQ to XML Class Hierarchy 215
4.8.2 Manipulate XML Elements 216
4.8.2.1 Creating XML from Scratch 216
4.8.2.2 Insert XML 218
4.8.2.3 Update XML 219
4.8.2.4 Delete XML 220
4.8.3 Manipulate XML Attributes 220
4.8.3.1 Add XML Attributes 220
4.8.3.2 Get XML Attributes 221
4.8.3.3 Delete XML Attributes 222
4.8.4 Query XML with LINQ to XML 222
4.8.4.1 Standard Query Operators and XML 223
4.8.4.2 XML Query Extensions 224
4.8.4.3 Using Query Expressions with XML 224
4.8.4.4 Using XPath and XSLT with LINQ to XML 225
4.8.4.5 Mixing XML and Other Data Models 225

ftoc.indd xi 4/25/2012 1:59:04 PM


xii Contents

4.9 Visual Basic.NET Language Enhancement for LINQ 227


4.9.1 Lambda Expressions 227
4.9.2 Extension Methods 229
4.9.3 Implicitly Typed Local Variables 232
4.9.4 Query Expressions 234
4.10 Chapter Summary 236
Homework 237

Chapter 5 Data Selection Query with Visual Basic.NET 241


Part I Data Query with Visual Studio.NET Design Tools and Wizards 242
5.1 A Completed Sample Database Application Example 242
5.2 Visual Studio.NET Design Tools and Wizards 245
5.2.1 Data Components in the Toolbox Window 245
5.2.1.1 The DataSet 246
5.2.1.2 DataGridView 247
5.2.1.3 BindingSource 248
5.2.1.4 BindingNavigator 248
5.2.1.5 TableAdapter 249
5.2.2 Data Source Window 249
5.2.2.1 Add New Data Sources 250
5.2.2.2 Data Source Configuration Wizard 251
5.2.2.3 DataSet Designer 255
5.3 Query Data from SQL Server Database Using Design Tools and Wizards 257
5.3.1 Application User Interface 257
5.3.1.1 The LogIn Form 258
5.3.1.2 The Selection Form 259
5.3.1.3 The Faculty Form 260
5.3.1.4 The Course Form 260
5.3.1.5 The Student Form 263
5.4 Add and Utilize Visual Studio Wizards and Design Tools 265
5.4.1 Add and Configure a New Data Source 265
5.5 Query and Display Data using the DataGridView Control 268
5.5.1 View the Entire Table 268
5.5.2 View Each Record or the Specified Columns 270
5.6 Use DataSet Designer to Edit the Structure of the DataSet 272
5.7 Bind Data to the Associated Controls in LogIn Form 274
5.8 Develop Codes to Query Data Using the Fill() Method 278
5.9 Use Return a Single Value to Query Data for LogIn Form 281
5.10 Develop the Codes for the Selection Form 284
5.11 Query Data from the Faculty Table for the Faculty Form 286
5.12 Develop Codes to Query Data from the Faculty Table 289
5.12.1 Develop Codes to Query Data Using the TableAdapter Method 289
5.12.2 Develop Codes to Query Data Using the LINQ to DataSet Method 291
5.13 Display a Picture for the Selected Faculty 292
5.13.1 Modify the Codes for the Select Button Event Procedure 292
5.13.2 Create a Function to Select the Matched Faculty Image 293

ftoc.indd xii 4/25/2012 1:59:04 PM


Contents xiii

5.14 Query Data from the Course Table for the Course Form 295
5.14.1 Build the Course Queries Using the Query Builder 296
5.14.2 Bind Data Columns to the Associated Controls in the Course Form 298
5.15 Develop Codes to Query Data for the Course Form 300
5.15.1 Query Data from the Course Table Using the TableAdapter Method 300
5.15.2 Query Data from the Course Table Using the LINQ to
DataSet Method 302
5.16 Query Data from Oracle Database Using Design Tools and Wizards 304
5.16.1 Introduction to dotConnect for Oracle 6.30 Express 305
5.16.2 Create a New Visual Basic.NET Project: SelectWizardOracle 305
5.16.3 Select and Add Oracle Database 11g XE as the Data Source 307
5.16.4 Modify the Codes to Access the Oracle Database 310

Part II Data Query with Runtime Objects 311


5.17 Introduction to Runtime Objects 312
5.17.1 Procedure of Building a Data-Driven Application Using
Runtime Object 314
5.18 Query Data from Microsoft Access Database Using Runtime Object 315
5.18.1 Query Data Using Runtime Objects for the LogIn Form 315
5.18.1.1 Declare Global Variables and Runtime Objects 316
5.18.1.2 Connect to the Data Source with the Runtime Object 317
5.18.1.3 Coding for Method 1: Using DataSet-TableAdapter
to Query Data 318
5.18.1.4 Coding for Method 2: Using the DataReader to Query Data 320
5.18.1.5 Clean up the Objects and Terminate the Project 321
5.18.2 Coding for the Selection Form 322
5.18.3 Query Data Using Runtime Objects for the Faculty Form 323
5.18.4 Query Data Using Runtime Objects for the Course Form 331
5.18.5 Query Data Using Runtime Objects for the Student Form 339
5.18.5.1 Coding for the Student Form_Load Event Procedure 341
5.18.5.2 Coding for the Select Button Click Event Procedure 342
5.19 Query Data from SQL Server Database Using Runtime Object 349
5.19.1 Migrating from Access to SQL Server and Oracle Databases 350
5.19.2 Query Data Using Runtime Objects for the LogIn Form 353
5.19.2.1 Declare the Runtime Objects 354
5.19.2.2 Connect to the Data Source with the Runtime Object 354
5.19.2.3 Coding for Method 1: Using the TableAdapter
to Query Data 356
5.19.2.4 Coding for Method 2: Using the DataReader
to Query Data 357
5.19.3 The Coding for the Selection Form 359
5.19.4 Query Data Using Runtime Objects
For the Faculty Form 359
5.19.5 Query Data Using Runtime Objects for the Course Form 362
5.19.6 Retrieve Data from Multiple Tables Using Tables JOINS 363
5.19.7 Query Data Using Runtime Objects for the Student Form 367

ftoc.indd xiii 4/25/2012 1:59:04 PM


xiv Contents

5.19.8 Query Student Data Using Stored Procedures 369


5.19.8.1 Create the Stored Procedure 370
5.19.8.2 Call the Stored Procedure 371
5.19.8.3 Query Data Using Stored Procedures for Student Form 372
5.19.8.4 Query Data Using More Complicated Stored Procedures 380
5.20 Query Data from Oracle Database Using Runtime Object 384
5.20.1 Install and Configure the Oracle Database 11g Express Edition 384
5.20.2 Configure the Oracle Database Connection String 385
5.20.3 Query Data Using Runtime Objects for the LogIn Form 386
5.20.3.1 Declare the Runtime Objects and Modify the ConnModule 387
5.20.3.2 Connect to the Data Source with the Runtime Object 388
5.20.3.3 Coding for Method 1: Using the TableAdapter to Query Data 389
5.20.3.4 Coding for Method 2: Using the DataReader to Query Data 390
5.20.4 The Coding for the Selection Form 392
5.20.5 Query Data Using Runtime Objects for the Faculty Form 392
5.20.6 Query Data Using Runtime Objects and LINQ to DataSet for
the Course Form 396
5.20.7 The Stored Procedures in Oracle Database Environment 397
5.20.7.1 The Syntax of Creating a Stored Procedure in the Oracle 398
5.20.7.2 The Syntax of Creating a Package in the Oracle 398
5.20.8 Create the Faculty_Course Package for the Course Form 400
5.20.9 Query Data Using the Oracle Package For the Course Form 405
5.21 Chapter Summary 411
Homework 413

Chapter 6 Data Inserting with Visual Basic.NET 417


Part I Data Inserting with Visual Studio.NET Design Tools and Wizards 418
6.1 Insert Data into a Database 418
6.1.1 Insert New Records into a Database Using the TableAdapter.Insert
Method 419
6.1.2 Insert New Records into a Database Using the TableAdapter.Update
Method 420
6.2 Insert Data into the SQL Server Database Using a Sample
Project InsertWizard 420
6.2.1 Create New Project Based on the SelectWizard Project 421
6.2.2 Application User Interfaces 421
6.2.3 Validate Data Before the Data Insertion 421
6.2.3.1 Visual Basic Collection and .NET Framework
Collection Classes 422
6.2.3.2 Validate Data Using the Generic Collection 422
6.2.4 Initialization Coding for the Data Insertion 425
6.2.5 Build the Insert Query 426
6.2.5.1 Configure the TableAdapter and Build the Data
Inserting Query 426
6.2.6 Develop Codes to Insert Data Using the TableAdapter.Insert
Method 427

ftoc.indd xiv 4/25/2012 1:59:04 PM


Contents xv

6.2.7 Develop Codes to Insert Data Using the TableAdapter.Update


Method 430
6.2.8 Insert Data into the Database Using the Stored Procedures 435
6.2.8.1 Create the Stored Procedure Using the TableAdapter Query
Configuration Wizard 436
6.2.8.2 Modify the Codes to Perform the Data Insertion Using the Stored
Procedure 436
6.3 Insert Data into the Oracle Database Using a Sample
Project InsertWizardOracle 441

Part II Data Insertion with Runtime Objects 442


6.4 The General Runtime Objects Method 442
6.5 Insert Data into the SQL Server Database Using the Runtime
Object Method 444
6.5.1 Insert Data into the Faculty Table for the SQL Server Database 444
6.5.1.1 Develop the Codes to Insert Data into the Faculty Table 444
6.6 Insert Data into the Microsoft Access Database Using the
Runtime Objects 453
6.6.1 Modify the Imports Commands and the ConnModule 454
6.6.2 Modify the Database Connection String 454
6.6.3 Modify the LogIn Query Strings 455
6.6.4 Modify the Faculty Query String 456
6.6.5 Modify the Faculty Insert String 458
6.6.6 Modifications to Other Forms 459
6.7 Insert Data into the Oracle Database Using the Runtime Objects 461
6.7.1 Add the Oracle Driver Reference and Modify the
Imports Commands 462
6.7.2 Modify the Database Connection String 463
6.7.3 Modify the LogIn Query Strings 464
6.7.4 Modify the Faculty Query String and Query Related Codes 466
6.7.5 Modify the Faculty Insert String and Insertion Related Codes 466
6.7.6 Modifications to Other Forms 468
6.7.6.1 Modify the Codes in the Selection Form 469
6.7.6.2 Modify the Codes in the Course Form 469
6.7.6.3 Modify the Codes in the Student Form 470
6.7.6.4 Modify the Codes in the SP Form 470
6.8 Insert Data into the Database Using Stored Procedures 471
6.8.1 Insert Data into the SQL Server Database
Using Stored Procedures 471
6.8.1.1 Develop Stored Procedures of SQL Server Database 471
6.8.1.2 Develop Codes to Call Stored Procedures to Insert Data
into the Course Table 474
6.8.2 Insert Data into the Oracle Database Using Stored Procedures 478
6.8.2.1 Develop Stored Procedures in Oracle Database 479
6.8.2.2 Develop Codes to Call Stored Procedures to Insert Data
into the Course Table 483

ftoc.indd xv 4/25/2012 1:59:04 PM


xvi Contents

6.9 Insert Data into the Database Using the LINQ to DataSet Method 486
6.9.1 Insert Data Into the SQL Server Database Using the LINQ
to SQL Queries 488
6.10 Chapter Summary 488
Homework 489

Chapter 7 Data Updating and Deleting with Visual Basic.NET 493


Part I Data Updating and Deleting with Visual Studio.NET Design
Tools and Wizards 494
7.1 Update or Delete Data Against Databases 495
7.1.1 Updating and Deleting Data from Related Tables in a DataSet 495
7.1.2 Update or Delete Data Against Database Using TableAdapter DBDirect
Methods: TableAdapter.Update and TableAdapter.Delete 496
7.1.3 Update or Delete Data Against Database Using
TableAdapter.Update Method 497
7.2 Update and Delete Data for Microsoft SQL Server Database 498
7.2.1 Create a New Project Based on the InsertWizard Project 498
7.2.2 Application User Interfaces 499
7.2.3 Validate Data before the Data Updating and Deleting 499
7.2.4 Build the Update and Delete Queries 499
7.2.4.1 Configure the TableAdapter and Build the Data
Updating Query 499
7.2.4.2 Build the Data Deleting Query 500
7.2.5 Develop Codes to Update Data Using the
TableAdapter DBDirect Method 502
7.2.5.1 Modifications of the Codes 502
7.2.5.2 Creations of the Codes 502
7.2.6 Develop Codes to Update Data Using the TableAdapter.Update
Method 503
7.2.7 Develop Codes to Delete Data Using the TableAdapter DBDirect
Method 505
7.2.8 Develop Codes to Delete Data Using the TableAdapter.Update
Method 507
7.2.9 Validate the Data after the Data Updating and Deleting 508
7.3 Update and Delete Data for Oracle Database 511
7.4 Update and Delete Data for Microsoft Access Database 512

Part II Data Updating and Deleting with Runtime Objects 512


7.5 The Runtime Objects Method 513
7.6 Update and Delete Data for SQL Server Database Using
the Runtime Objects 514
7.6.1 Update Data Against the Faculty Table for
the SQL Server Database 515
7.6.1.1 Develop Codes to Update the Faculty Data 515
7.6.1.2 Validate the Data Updating 516

ftoc.indd xvi 4/25/2012 1:59:04 PM


Exploring the Variety of Random
Documents with Different Content
Sir Charles Wager, Knt.
Sir George Walter, Knt.
Edward Walpole, Esq;
James West, Esq;
Francis Whitworth, Esq;
Lawrence Williams, Esq;
Charles Hanbury Williams, Esq;
Watkins Williams Wynn, Esq;
William Wilmer, Esq;
Mr. John Williams.
Mr. Timothy Wyld.
The Rev. Mr. John Wyatt, Master of Felsted School, in Essex.

The Right-Honourable Sir William Yonge, Bart.

N A M E S O M I T T E D.
The Right Honourable the Lord Petre.
The Right Honourable the Lord Sherard Manners.
The Honourable Sir John Eyles, Bart. Postmaster General.
Papillion Ball, Esq;
John Carew, Esq;

Mr. Thomas Hyam, Merchant.


Mr. Andrews Jelfe.
Charles Peers, Esq;
William Roope, Esq;
AN

ACCOUNT
OF THE

SPANISH INVASION

In the Year mdlxxxviii.

T HE Defeat of the Spanish Armada being the most glorious Victory


that was ever obtained at Sea, and the most important to the
British Nation, every Method deserves some Praise, that may in a
suitable Manner propagate the Memory of it. Our Ancestors, that
were personally interested in it, were so careful it should not pass
into Oblivion, that they procured the Engagements between the two
Fleets to be represented in ten curious Pieces of Tapestry, with the
Portraits of the several English Captains, taken from the Life, worked
in the Borders, which are now placed, some in the Royal Wardrobe,
some in the House of Lords, the most august Assembly of the
Kingdom, there to remain as a lasting Memorial of the Triumphs of
British Valour, guided by British Counsels. But because Time, or
Accident, or Moths may deface these valuable Shadows, we have
endeavoured to preserve their Likeness in the preceding Prints,
which, by being multiplied and dispersed in various Hands, may meet
with that Security from the Closets of the Curious, which the
Originals must scarce always hope for, even from the Sanctity of the
Place they are kept in.
Thus far we have been able to go within our own Province; but as
a more particular Detail of the Circumstances of this glorious
Expedition, which lye blended in our Histories with other Matters,
may not be altogether unacceptable, we shall beg Leave to offer the
following brief Account of it, collected from the most authentic
Writers and Manuscripts.
SECT. I.

T HE Author and Undertaker of this ever memorable Expedition was


Philip II. King of Spain, eldest Son of the renowned Emperor
Charles V. In the Year 1554, he married Mary I. Queen of England,
with a View of uniting, by this Marriage, the English Dominions to
those large and noble Territories of which he was Heir-Apparent. But
all his Projects were defeated by a False-Conception the Queen had
in 1555; and especially by her Death, which happened on Novemb.
17, 1558.—In 1555, October 25, he became King of Spain, and the
Dominions and Territories thereunto belonging, upon the voluntary
Resignation of his Father Charles V.
As to King Philip’s real Views and Motives in this Expedition, they
seem to have been these:
I. A firm Hope and certain Prospect as he imagin’d, of easily
acquiring so considerable an Addition to his Dominions, as the
flourishing Kingdoms of England and Ireland. Kingdoms whose
Advantages and Excellencies he was well acquainted withal; and
from whence he could be continually supplied with Tin, Lead, Wool,
and many other useful, necessary, and profitable Commodities.
II. He was also excited by another Motive, which is generally
sufficient for Conquerors; and it was this: England and Ireland stood
very convenient for him, as being near his Dominions in the Low-
Countries; and might, by their advantageous Situation, and the many
good Harbours they abound with, have rendered him Master of the
Trade and Navigation of these Northern Parts of the World; and,
what is more, they would have enabled him to carry it on throughout
all North and South-America, exclusively of all others; which is such
an Advantage as cannot well be expressed.
III. Moreover these Islands had proved, and might always prove a
grievous Thorn in his Side. For, by reason of their Situation, the
English could, at any Time, almost totally obstruct the Navigation of
the Netherlands, and destroy all their Traffick by Sea. Because, as it
must unavoidably be carried on almost within Sight of the British
Coasts, so long as the Inhabitants of those Islands remained
independent of him[1], and were Masters at Sea, they could seize,
with the utmost Ease, the Shipping sent from the Ports of Flanders to
the several Parts of the World. What lay therefore so convenient, and
was in other Hands so dangerous a Neighbour, must be purchas’d at
any Rate.
IV. Revenge may be assigned as another Motive of this Expedition.
Queen Elizabeth had assisted all along the States of the United
Provinces, in their several Attempts to shake off the Spanish Yoke.
Now, that surely was a very great Provocation: And Forgiveness of
Injuries, it is well known, was then, no more than at present, a
Spaniard’s Virtue. To be revenged therefore of such a constant
Enemy as Elizabeth had been, may well be suppos’d to have been an
additional Inducement to this Undertaking.
V. This other important Motive is assigned by Hakluyt[2]: “King
Philip deemed this to be the most ready and direct Course, to
recover his hereditary Possession of the Low-Countries. For, having
with little Advantage, for above twenty Years together, waged War
against the Netherlands, after mature Deliberation, he thought it
most convenient to assault them once more by Sea, which had been
fruitlessly attempted several Times before for want of sufficient
Forces. And he thought good to begin with England, being
persuaded, that the Conquest of that Island was less difficult than
the Conquest of Holland and Zealand. Moreover, the Spaniards were
of Opinion, that it would be far more behoveful for their King to
conquer England and the Low-Countries at once, than to be
constrained continually to maintain a warlike Navy, to defend his East
and West-India Fleets from the English.”

These (with a Desire of restoring the Roman-Catholick Religion)


seem to have been the real and true Motives of this great Expedition.
The Reasons alleged by Philip were these[3]:

I. That Elizabeth had, from the first assisted his rebellious Subjects
in the Netherlands, with Men and Money, and spirited them up
against him, her greatest Friend and Benefactor; whom she was
indebted to for her Life, when her Sister Queen Mary and Gardiner
were for removing her out of the Way.
II. Drake, and others of her Subjects, had committed several
Depredations in Spain and America.
III. She had been so unnatural as to stop his Money, when, for
fear of Pirates, it had been landed in her Dominions; and had put an
Embargo on the Vessels employed to carry it to the Low-Countries:
(As is related by Camden, under the Year 1568.)
IV. She had acknowledged his Enemy Don Antonio King of
Portugal, and armed him against Spain.
V. That it was by her Instruction and Advice the Duke of Alençon
had been crowned King of Brabant.
VI. And, moreover, she herself had accepted the Sovereignty of the
Low-Countries, and sent the Earl of Leicester thither with
considerable Forces; which was an open Declaration of War.
VII. That he undertook it, to revenge the Death of the innocent
Queen of Scots.
VIII. And in Compliance with the Holy Father Innocent VIII.’s
earnest Injunctions, who ceased not to exhort and importune him, to
abolish Heresy in England, and replant the Roman-Catholick Religion
there.

In short therefore, the Aim and Design of the King of Spain in this
great Expedition, was to conquer England, in order to come more
easily at the revolted Netherlands, and facilitate their Reduction to
his Obedience; as also, for the Sake of so meritorious an Action, as
the bringing this Island back to the Catholick Religion: And to be
revenged, at the same Time, for the Disgrace, Contempt, and
Dishonour, he had, at several Times, received from the English
Nation; and for divers others real or pretended Injuries, which had
made a deep Impression on his proud and revengeful Spirit.
Animated and spurred on by these Motives, King Philip made such
vast Preparations for his intended Conquest, as had hardily ever been
known before in any Age, or Nation: Whether we consider the Time
spent about them; or the prodigious Strength and Quantity of the
Materials of all Kinds that were provided.
As for the Time spent about these Preparations; King Philip seems
to have form’d this Design as early as the Year 1583. [4]For, in that
Year, he ordered Alexander Duke of Parma, Governor of the Low-
Countries, to procure an exact Account and Description of the
Harbours, Castles, Rivers, and Roads belonging to England, and
transmit them to him; which was accordingly done: And in this
Francis Throckmorton appears to have been concerned. But,
according to Rapin, [5]this Project was formed by Philip only from the
Time Mary Queen of Scots had been persuaded to convey to him her
Right to England, as being the only Means to restore the Catholick
Religion[6]: According to the received Maxim in the Church of Rome,
That an Heretick is unworthy and incapable of enjoying a Crown;
Philip thought he might justly claim that of England, as being the
next Catholick Prince descended from the House of Lancaster;
namely, from Catharine Daughter of John of Ghent Duke of
Lancaster, married in 1389 to Henry, then Prince, and afterwards
King, of Castile. Upon this Descent therefore, and the Queen of Scots
Conveyance and Will, he had projected the Conquest of England.
However it be, or whenever these Preparations were begun, it is
certain that King Philip assembled so powerful a Fleet, and so well
furnished with all kinds of Provisions and Ammunition, that, thinking
it unconquerable by human Power, he gave it the Title of the
Invincible Armada.
[7]
This Fleet consisted of one hundred and thirty two Ships,
(besides twenty Caravels for the Service of the Army, and ten Salves
with six Oars apiece,) containing fifty nine thousand one hundred,
and twenty Tons; three thousand, one hundred, and sixty five
Cannons; eight thousand, seven hundred, and sixty six Sailors; two
thousand and eighty eight Galley-Slaves, and twenty one thousand,
eight hundred, and fifty five Soldiers; besides Noblemen and
Voluntiers[8]. For there was not a Family in Spain of any Note, but
what had a Son, a Brother, or a Kinsman in the Fleet[9]. Of these
Voluntiers there were two hundred and twenty four; attended by four
hundred and fifty six Servants bearing Arms.
There were also two hundred and thirty eight Gentlemen more,
maintained by the King; with one hundred and sixty three Servants.
An hundred and seventy seven Persons, with two Engineers, one
Physician, one Surgeon, and thirty Servants belonging to the
Artillery; eighty five Physicians and Surgeons for the Hospital-Ships;
three and twenty Gentlemen belonging to the Duke of Medina-
Sidonia’s Court, and fifty Servants; seventeen Superintendants
General of the Army; and one hundred Servants more, belonging to
them, or to the Officers of Justice, who were twenty in Number[10].
Nay even there were in it one hundred and eighty Capuchins,
Dominicans, Jesuits, and Mendicant Friars; with Martin Alarco, Vicar
of the Inquisition.
And because none were allowed to have Wives or Concubines on
board, some Women had hired Ships to follow the Fleet; two or three
of which Ships were driven by the Storm on the Coast of France[11].
Most of the Ships of this Armada[12] were of an uncommon Size,
Strength, and Thickness, more like floating Castles than any thing
else; and they were cased above Water with thick Planks to hinder
the Cannon-Balls from piercing their Sides. The Masts also were
braced round with strong pitched Ropes, to save them from being
soon shatter’d or broke by the Shot.
Then as to Ammunition, [13]this Fleet had a very great Number of
Cannons, double Cannons, Culverins, and Field-Pieces for Land-
Service; seven thousand Muskets and Calievers; ten thousand
Halberts and Partizans; one hundred and twenty thousand Cannon-
Balls; [14]one hundred Quintals of Lead for Bullets (each Quintal being
a hundred weight,) twelve thousand Quintals of Match; fifty six
thousand Quintals of Gunpowder; and also, Waggons, and other
Carriages; Horses, Mules, and other Instruments and Necessaries for
Conveyance by Land; Torches, Lanthorns, Canvas, Hides, Lead;
Chains, Whips, Butchering-Knives, Halters, and other Instruments of
Death and Slavery[15]; and Spades, Mattocks, Baskets, and every
thing else requisite for Pioneers Work; as also eight hundred Mules
for drawing the Ordnance and Carriages.
Proportionable to these Forces was their great Store of Provisions
of every Sort: [16]for, besides Raisins in great abundance, they had
eight thousand Quintals of Fish; three thousand Quintals of Rice; six
thousand three hundred and twenty [17]Septiers of Beans, Pease, &c.
eleven thousand three hundred and ninety eight Pounds of Olive-Oyl;
thirty three thousand eight hundred and seventy Measures of
Vinegar; ninety six thousand Quintals of Biscuit; three thousand four
hundred and fifty eight Quintals of Goats Cheese; six thousand five
hundred Quintals of Bacon; one hundred and forty seven thousand
Pipes of Wine; twelve thousand Pipes of Water, &c.—Provisions in a
word they had for six Months; and so well furnished were they, that
Sir Francis Drake observes, in a Letter of his, [18]they had Provisions
of Bread and Wine sufficient to maintain forty thousand Men for a
whole Year.
The whole Fleet, in general, is said[19] to have contained thirty two
thousand Persons, and cost every Day thirty thousand Ducats[20].
The General of the Land Forces, and the Commander in Chief in
the whole Expedition, was Don Alfonso Perez de Guzman, Duke of
Medina Sidonia; and the Admiral was Don Juan Martinez de Recalde.
But it was not in Spain only, that such great Preparations were
carrying on, for the Invasion of England. For, Alexander Duke of
Parma was also making on his Side prodigious and amazing
Preparations, to assist in this grand Design.
He gathered together out of Spain, France, Savoy, Italy, Naples,
Sicily, Germany, and even out of America, a very considerable and
choice Army; [21]consisting of about forty thousand Foot, and three
thousand Horse; out of which he selected thirty thousand Foot, and
eighteen hundred Horse, that were to be ready to pass into England.
These Troops were quarter’d as follows: [22]Near Nieuport there lay
ready thirty Companies of Italians; ten of Walloons; and eight of
Scots, and as many of Burgundians: At Dixmude were eighty
Companies of Netherlanders; sixty of Spaniards; sixty of Germans;
and above seven hundred fugitive English, Scots, and Irish, under
the Command of Sir William Stanley, and Charles Nevil Earl of
Westmoreland. There were moreover four thousand Men posted at
Corrick, and nine hundred at Watene.
For the Transportation of these Forces, the Duke of Parma prepar’d
Ships at Nieuport, Dunkirk, Antwerp, and other Places; and caused
some new ones to be built with such Expedition, that they seem’d, as
Strada expresses it, [23]to be transform’d in a Moment, from Trees
into Ships.
More particularly: [24]In the River of Watten he caused seventy flat-
bottom’d Boats to be built, each of which could carry thirty Horses;
and to each of them were Bridges fitted for the convenient Shipping,
or Landing of the Horses. There were in most of them, two Ovens for
baking Bread, with a great Quantity of Saddles, Bridles, Harness, and
a good Number of Draught-Horses, to draw the Engines, Cannons,
and other Ammunition, after the Spaniards should be landed. Of the
same Form he had provided two hundred other Vessels at Nieuport,
but not so large. And at Dunkirk he had assembled thirty eight Men
of War; for the navigating of which, he had hired Sailors from
Bremen, Hamburgh, Emden, and Genoa. In their Ballast he had put a
great Quantity of Beams, or thick Planks, sharpned at the Ends, and
covered with Iron; but full of Clasps and Hooks on the Sides, that
they might be easily joined together. At Graveling, he had provided
twenty thousand Casks, which might in a short Time be fastened
together with Nails and Cords, and reduced into the Form of a
Bridge. Whatever, in a Word, was necessary for making Bridges, or
for choaking up the Mouths of Havens and Rivers, was by him got in
readiness. And he had even caused a great Pile of wooden Faggots
to be laid near Nieuport, for erecting a Mount or Rampart. Whilst he
was thus furnishing himself with all proper Vessels and other
Necessaries, he caused the shallow and sandy Places of Rivers to be
cleared; and had deep Channels cut in proper Places, from Ghent to
Ysendyck, Sluys, and Nieuport, on purpose to convey the Ships built
at Antwerp, Ghent, &c. into the Sea. Finally, he assembled at Bruges
above one hundred Hoys loaden with Provisions, which he designed
to bring into the Ports of Flanders, either by the Way of Sluys, or
through the forementioned Channels.
The Duke of Guise had also twelve thousand Men on the Coast of
Normandy, ready to land in the West of England as soon as the
Spanish Armada had enter’d the Channel[25]; but the Spaniards coming
two Months later than they intended, (or for some other Reasons)
the Duke dismissed his Forces about the End of June.
And that this famous Expedition might be supported with spiritual
as well as temporal Weapons[26], Pope Sixtus V created William Allen,
a seditious English Priest, Cardinal; and sent him as his Legate into
the Low-Countries, with a Bull; wherein, after enumerating the
several Causes of Complaint the See of Rome had against Queen
Elizabeth, (namely her suppressing the Catholic Religion, her putting
the Queen of Scots to Death, &c.) he renewed and confirmed the
Sentence of Excommunication pronounced against her by his
Predecessors Pius V and Gregory XIII, deprived her, as illegitimate,
and an Usurper, from all Princely Dignity, and Dominion over the
Kingdoms of England and Ireland; absolved her Subjects from their
Allegiance; and strictly enjoined them, upon Pain of God Almighty’s
Displeasure, not to lend her any Help or Assistance, but to join the
Spanish Army, and the Duke of Parma’s Forces, as soon as they
should be landed: Promising withal a plenary Indulgence and the
Pardon of all their Sins, to as many as would engage in so laudable
an Undertaking.

Such were the extraordinary Preparations made by the Spaniards


for invading England. Preparations so great and so dreadful, that all
Europe was alarmed at them. Most Sovereigns expected for some
Time, with the utmost Horror and Astonishment, where the
threatening Storm, which had been so long gathering, would at last
fall. But this, though kept as a great Secret, did not long escape the
great Sir Francis Walsingham’s Sagacity. [27]He had Intelligence from
Madrid, that King Philip had told his Council, he had dispatched an
Express to Rome with a Letter writ with his own Hand to the Pope,
acquainting him with the true Design of his Preparations, and asking
his Blessing upon it; which for some Reasons he would not yet
disclose to them, ’till the Return of the Courier. The Secret being thus
lodg’d with the Pope, Walsingham, by the means of a Venetian Priest
retain’d at Rome as his Spy, got a Copy of the original Letter, which
was stolen out of the Pope’s Cabinet by a Gentleman of the Bed-
Chamber, who took the Keys out of the Pope’s Pocket whilst he slept.
Upon this Intelligence Walsingham found a Way to retard the Spanish
Invasion for a whole Year, by getting the Spanish Bills protested at
Genoa, which should have supplied them with Money to carry on
their Preparations.
Queen Elizabeth, it may well be supposed, could not help being
extremely anxious about the issue of the great and dreadful
Preparations that were going on, to deprive her of her Crown and
Dignity, and perhaps of her [28]Life. This inclined her more readily to
embrace some Overtures of Peace, made to her by the Spaniard[29]:
But it being soon found out that they were intended only to lull her
asleep, and induce her, by depending upon a Peace, to be careless of
her own Defence; and moreover, Henry III King of France sending
her Word, [30]she ought to stand upon her Guard; she did not
therefore rely much on the Negociations in hand, but took all proper
Measures for securing herself, and protecting her Dominions.
Her Situation was indeed very melancholy, and her Fears well
grounded: For she was without so much as one Ally abroad, except
the United-Provinces, which themselves wanted Assistance; and at
home she had a factious and discontented Party, ready to join with
the Enemy: But, by the Assistance of Heaven, by her good
Management, and the sincere Affection of the Generality of her
People, she surmounted all Difficulties, and came off Conqueror.
When she was sure the Spaniards Preparations were design’d
against her, that she might not be taken unprovided, she fitted out as
strong a Fleet as she possibly could; and herein so great was the
Diligence of her Subjects, [31]that though her Preparations were
begun but about the 1st of November 1587, yet her Fleet was ready
to put to Sea by the 20th of December the same Year.
Charles Lord Howard of Effingham, High Admiral of England, a
[32]

Person of great Prudence and Bravery, was appointed Commander in


Chief of this whole Fleet. His Instructions were, To repair to the
Westward, in conjunction with Sir Francis Drake Vice-Admiral, and
Captain John Hawkins, and Captain Martin Frobisher Rear-Admirals:
At the same Time, the Lord Henry Seymour, second Son of the late
Duke of Somerset, had Orders to lye on the Coast of Flanders, with
forty English and Dutch Ships (the latter under the Command of
Justin of Nassau, Admiral of Zealand) to prevent the Duke of Parma’s
putting out to Sea with his Forces.
For Land Service, there were disposed along the Southern Coasts
of England twenty thousand Men. Besides which, two Armies were
raised of choice, well-disciplin’d, and experienced Men; one (under
the Command of Robert Dudley Earl of Leicester, consisting of one
thousand Horse, and twenty two thousand Foot,) was encamped at
Tilbury, near the Thames Mouth, for the Safeguard of the City of
London; because it was given out that the Spaniards, after having
joined the Duke of Parma, intended to come up the Thames, in order
to make themselves Masters of the Metropolis of the Kingdom. The
other Army, under the Command of Henry Carey Lord Hunsdon,
consisted of thirty four thousand Foot, and two thousand Horse, and
was destined to guard the Queen’s Person.
Arthur Lord Grey, Sir Francis Knolles, Sir John Norris, Sir Richard
Bingham, and Sir Roger Williams, Knights, and excellent Soldiers,
were chosen to consult about the best Way of managing the War at
Land. After mature Deliberation, they thought fit that the most
convenient Landing-Places for the Enemy, as well out of Spain as out
of the Low-Countries, should be well mann’d and fortify’d, namely
Milford-Haven, Falmouth, Plymouth, Portland, the Isle of Wight,
Portsmouth, the open Coast of Kent called the Downs, the Thames
Mouth, Harwich, Yarmouth, Hull, &c. that the Train’d Bands, all along
the Maritime Counties, should meet in Arms upon a Signal given, to
defend the said Ports, and do their best to prevent the Enemy’s
landing; and, in Case of their landing, that they should lay all the
Country waste round about, and leave neither Booty nor Forage for
them; that they should annoy them Night and Day with continual
Alarms, so as to give them no Rest; but not venture the Hazard of a
Battle, ’till more Commanders with their Companies should come up;
of whom one in every Shire was nominated Chief.
Moreover, the active Queen, in order to quicken the Zeal and
Diligence of her Subjects, especially of those who lay near the Sea-
Coasts, caused Letters to be sent to the chief of them: Wherein,
after putting them in mind of the common and imminent Danger the
whole Nation was in, she told them, that she “expected on this
extraordinary Occasion, a larger Proportion of Furniture, both for
Horsemen and Footmen; thereby to be in their best Strength against
any Attempt whatsoever, to be employed, whether about her own
Person, or otherwise. And the Number she required them to signify
to her Privy-Council[33].” She required moreover the Nobility in the
several Counties, to provide themselves, and their Servants and
Dependants in like manner, with Horses and Armour, to be ready to
repair upon Summons to the Queen, for Defence of her Person: And
to this Purpose Letters were address’d to them from the Lords of the
Council, by her Command.
Such were the Directions given. [34]And accordingly Cities,
Counties, Towns, and Villages, the Cinque-Ports, and all other Havens
of England, manifested as great Forwardness in their zealous Love
and Duty, as either Subjects could perform, or Prince expect. The
City of London, in particular, being requested by the Privy-Council, to
find five thousand Men, and fifteen Ships, they willingly and
cheerfully furnished thirty Ships provided with all Necessaries, and
ten thousand able Men, well armed and trained; besides which, they
kept in readiness thirty thousand Men more, prepared to march
wherever there should be Occasion[35]; and also lent the Queen fifty
one thousand nine hundred Pounds, in ready Money.
Then, as to the rest of the Nation: [36]As soon as it was reported
that the Queen was come near London, and the Spanish Fleet
appeared in the Channel, the greatest Part of the Nobility, except
those that were obliged to stay in each County on account of their
Offices, repaired to London, to preserve the Queen’s Person; bringing
with them goodly Bands of Horsemen, about five thousand in all, and
maintaining them at their own Charge ’till the Spanish Navy was
known to be passed beyond Scotland: These were the Lord
Chancellor Hatton, the Earls of Lincoln, Warwick, Leicester, Essex,
Worcester, and Hereford; the Lord Viscount Montacute; the Lords
Burghley, Compton, Morley, Rich, Dacres, Windsor, Audley, Sandes,
Mordaunt, Lumley, Mountjoy, Stourton, and Darcy.
In a Word, all Persons throughout England in general, unanimously
concurred to be ready to serve for the Defence of the Queen and
Kingdom[37]: In this there was no Difference between the Catholic
and the Protestant, but herein appeared a perfect Sympathy,
Concourse, and Consent of all Sorts of Persons, without respect of
Religion. By this hearty Zeal, seconded with suitable Endeavours, it
came to pass, that some Counties were able to bring into the Field
twenty thousand, and others even forty thousand able fighting Men:
The Maritime Counties, in particular, on the South and East of
England, from Cornwall to Lincolnshire, were so well furnished with a
stout and well regulated Militia, that there was no Place for landing
foreign Forces, but within eight and forty Hours there could resort to
that Place above twenty thousand fighting Men, with Ordnance and
other suitable Provisions.
And that the Popish discontented Party at home might neither join
the Enemy, nor favour their Descent, the Queen caused the most
obnoxious of them to be imprisoned in Wisbich-Castle in the Isle of
Ely.
She also directed [38]Sir William Fitz-Williams, Lord Deputy of
Ireland, what to do, in case the Enemy should land in any Part of his
Government, and pointed out to him what Precautions he should use
to hinder the Irish from rising.
There remained only the King of Scots, of whom Queen Elizabeth
had most Reason to be afraid; since she had newly given him an
unpardonable Provocation, namely, in causing his Mother to be
publickly beheaded, who was a Sovereign Princess, independent of
her. This was sufficient to dispose him, out of a Principle of Revenge,
to favour the Descent of the Spaniards in one Extremity of the
Kingdom, by making a Diversion in the other. With that View he had
been tampered with by the Duke of Parma, and had received from
him Offers of Assistance[39]: But the politic Queen so effectually
caress’d him, made him such advantageous Proposals, and so plainly
convinc’d him, that the Loss of England would not fail of being
attended with that of Scotland[40]; that he, sensible of the common
Danger wherewith he was threatened, declar’d the Spaniards
Enemies, and made Preparations against them with great
Chearfulness and Alacrity: [41]Giving a strict Charge upon all the Sea-
Coasts, that the Spaniards should not be suffered to land in any Part,
but that the English might land, and be reliev’d of any Wants: [42]He
moreover offer’d Queen Elizabeth his Forces, his Person, and all that
he could command, to be employed against the common Enemy:
And he humourously observ’d upon this Occasion[43], That he look’d
for no other Favour from the Spaniards, than what Polyphemus
promis’d Ulysses, that he should be reserv’d for the last Morsel.

After this general Account, the Reader will undoubtedly be pleased


to see a particular List of the Fleets on both Sides, which I have
accordingly subjoined hereunto.
SECT. II.

A complete List of the Spanish Fleet, called


the Invincible Armada[44].

The Squadron of Portuguese Galleons, &c. under the particular


Command of the Generalissimo, the Duke of Medina Sidonia.
Number Number
of of
Ships. Burden Guns. Mariners. Soldiers.
Tuns.
The St. 1000 50 177 300
Martin,
Captain
General of
all the
Fleet,
St. John, 1050 50 170 231
Admiral
General,
St. Mark, 792 117 292
St. Philip, 800 40 117 415
St. Lewis, 830 40 116 376
St. Matthew, 750 40 50 177
St. James, 520 30 100 300
Galleon of 961 52 100 300
Florence,
St. 352 30 90 300
Christopher,
St. Bernard, 352 30 100 280
Zabra 166 13 55 55
Augusta,
Zabra Julia, 166 14 50 60
7739 389 1242 3086

The Fleet of Biscay, commanded by Don Juan Martinez de Recalde,


Captain General.
St. Ann, Admiral, 768 30 114 323
Grangrina, Admiral, 1160 36 100 300
St. James, 660 30 102 250
Conception of Zubelzu, 468 20 70 100
Conception of Juan del Cavo, 418 24 70 164
Magdalena de Juan 330 22 70 200
Francesco d’ Ayala,
St. John, 350 24 80 130
Mary, 165 24 100 180
Manuel, 520 16 54 130
St. Mary de Monte Majore, 707 30 50 220
Mary of Aguiare, 70 10 23 30
Isabella, 71 12 23 30
Michael de Susa, 96 12 24 30
St. Stephen, 78 12 26 30
5861 302 906 2117

The Fleet of Castile, commanded by Don Diego Florez de Valdez,


General.
The St. Christopher 700 40 120 205
Galleon, General,
St. John Baptist Galleon, 750 30 140 250
St. Peter Galleon, 530 40 140 130
St. John Galleon, 530 30 120 170
St. James the Great 530 30 132 230
Galleon,
St. Philip and St. James 530 30 116 159
Galleon,
Ascension Galleon, 530 30 114 220
Galleon of our Lady del 130 30 108 170
Barrio,
Galleon of St. Medel and 530 30 110 170
Celedon,
St. Anne Galleon, 250 24 80 100
Ship, Our Lord of Vigonia, 750 30 130 190
Trinity, 780 30 122 200
St. Katherine, 862 30 160 200
St. John Baptist, 659 30 130 200
Pinnace of our Lady della 24 25 30
Rosaria,
St. Anthony of Padua 16 46 300
Pinnace,
8054 474 1793 2924

The Andalusian Squadron, commanded by Don Pedro de Valdez,


General.
The General-Ship, 1550 50 118 304
St. Francis Admiral, 915 30 60 230
St. John Baptist Galleon, 810 40 40 250
St. Gargeran, 569 20 60 170
Conception, 862 25 65 200
Duquesa St. Ann, 900 30 80 250
Trinity, 650 20 80 200
St. Mary de Juncar, 730 30 80 240
St. Katherine, 730 30 80 259
St. Bartholomew, 730 30 80 225
Holy Ghost Pinnace, 10 33 40
8692 315 776 2359

The Squadron of Guypuscoa, commanded by Don Mighel de


Oquenda.
St. Ann, General, 1200 50 60 300
Ship, Our Lady of the Rose, 945 30 64 230
Admiral,
St. Saviour, 958 30 50 330
St. Stephen, 936 30 70 200
St. Martha, 548 25 70 180
St. Barba, 525 15 50 160
St. Bonaventura, 369 15 60 170
Mary, 291 15 40 120
Santa Cruce, 680 20 40 150
Ursa doncella Hulk, 500 18 40 160
Annunciation Pinnace, 60 12 16 30
St. Barnaby, 60 12 16 30
Magdalene, 60 12 16 30
Pinnace, Our Lady of 60 12 16 30
Guadalupe,
7192 296 608 2120

The Eastern Fleet of Ships, called Levantiscas, commanded by Don


Martinez de Vertendona.
The Ragazone, General, 1294 35 90 350
Rama, Admiral, 728 30 80 210
Rata, St. Mary, crowned, 820 40 90 340
St. John of Cecilia, 880 30 70 290
Trinity Valencera, 1000 41 90 240
Annunciation, 730 30 90 200
St. Nicolas, Prodaveli, 834 30 84 280
Juliana, 780 36 80 330
St. Mary of Pison, 666 22 80 250
Trinity Escala, 900 25 90 302
8632 319 844 2792

The Fleet of Ships, called Urcas, or Hulks, commanded by Don Juan


Lopez de Medina.
Great Griffin, General, 650 40 60 240
St. Saviour, Admiral, 650 30 60 230
Sea Dog, 200 10 30 80
White Falcon, 500 18 40 160
Black Castle, 750 25 50 250
Bark of Hamburg, 600 25 50 250
House of Peace, 600 25 50 250
St. Peter the Greater, 600 25 50 250
Sampson, 600 25 50 250
St. Peter the Less, 600 25 50 250
Bark of Dantzick, 450 26 50 210
White Falcon, Mediana, 300 18 30 80
St. Andrew, 400 15 40 160
Little House of Peace, 350 15 40 160
Flying Raven, 400 18 40 210
White Dove, 250 12 30 60
Adventure, 600 19 40 60
Santa Barba, 600 19 40 60
Cat, 400 9 30 50
St. Gabriel, 280 9 25 50
Esayas, 280 9 25 50
St. James, 600 19 40 60
Peter Martin, 200 30 30 80
10860 466 950 4170

Pataches and Zabras commanded by Don Antonio de Mendoza.


Our Lady del Pilar de 300 12 50 120
Saragossa,
English Charity, 180 12 36 80
St. Andrew of Scotland, 150 12 30 51
Crucifix, 150 8 30 50
Our Lady of the Port, 150 8 30 50
Conception of Caraffa, 70 8 30 50
Our Lady of Begova, 70 8 30 50
Conception of Capitillo, 60 8 30 50
St. Hieronymus, 60 8 30 60
Our Lady of Grace, 60 8 30 60
Conception of Francis 60 8 30 60
Lastero,
Our Lady of Guadalupe, 60 8 30 60
St. Francis, 60 8 30 60
Holy Ghost, 60 8 30 60
Our Lady of Frenesda, 60 8 30 60
Zabra of the Trinity, 60 8 30 60
Zabra of our Lady del 60 8 30 60
Castro,
St. Andrew, 60 8 30 60
Conception, 60 8 30 60
Conception of Sommariba, 60 8 30 60
Santa Clara, 60 8 30 60
St. Katherine, 60 8 30 60
St. John de Caraffa, 60 8 30 60
Assumption, 60 8 30 60
2090 204 746 1103

The four Galleasses of Naples, commanded by Don Hugo de


Moncada.
St. Laurence General, 50 130 270
Patrona, 50 112 180
Girona, 50 120 170
Neopolitana, 50 115 124
200 477 744
These four Galleasses had Slaves 1200.

The four Gallies of Portugal, commanded by Don Diego de Medrana.


The Capitana, 50 106 110
Princess, 50 106 110
Diana, 50 106 110
Vazana, 50 106 110
200 424 440
In these four Gallies were Slaves 888.

The List of the English Fleet[45].

Ships. Tuns. Sailors. Captains.


The Ark Raleigh, 800 425 The Lord Charles Howard,
Lord High Admiral.
Elizabeth 600 250 The Earl of Cumberland.
Bonaventure,
Rainbow, 500 250 The Lord Henry Seymor.
Golden Lion, 500 250 The Lord Thomas Howard.
White Bear, 1000 500 The Lord Edmund Sheffield.
Vanguard, 500 250 Sir William Winter.
Revenge, 500 250 Sir Francis Drake, Vice-
Admiral.
Elizabeth Jonas, 900 500 Sir Robert Southwell.
Victory, 800 400 Sir John Hawkins, Rear-
Admiral.
Antelope, 400 160 Sir Henry Palmer.
Triumph, 1100 500 Sir Martin Forbisher.
Dreadnought, 400 200 Sir George Beeston.
Mary-Rose, 600 250 Edward Fenton.
Nonpareil, 500 250 Thomas Fennar.
Hope, 600 250 Robert Cross.
Galley Bonavolta, 250 William Buroughs.
Swift-sure, 400 200 Edward Fennar.
Swallow, 300 160 Richard Hawkins.
Foresight, 300 160 Christopher Baker.
Aid, 250 120 William Fennar.
Bull, 200 100 Jeremy Turner.
Tyger, 200 100 John Bostock.
Tramontana, 150 70 Luke Ward.
Scout, 120 70 Henry Ashley.
Achates, 100 60 George Rigges.
Charles, 70 40 John Roberts.
Moon, 60 40 Alexander Clifford.
Advice, 50 40 John Harris.
Spy, 50 40 Ambrose Ward.
Martin, 50 35 Walter Gower.
Sun, 40 30 Richard Buckley.
Signet, 30 20 John Shrive.
Brigantine, 35 Thomas Scot.
George Hoye, 120 24 Richard Hodges.
11850 6279

2. Ships serving by Tunnage with the Lord Admiral.


White Lion, 140 50 Charles Howard.
Disdain, 80 45 Jonas Bradbery.
Lark, 50 30 Thomas Chichester.
Edward of Malden, 180 30 William Pierce.
Marigold, 30 20 William Newton.
Black Dog, 20 10 John Davis.
Catherine, 20 10
Fancy, 50 20 John Paul.
Poppin, 20 8
Nightingal, 160 16 John Doate.
750 239

3. Ships serving with Sir Francis Drake.


The Galleon 400 160 George Fennar.
Leicester,
Merchant Royal, 400 160 Robert Flyke.
Edward 300 120 James Lancaster.
Bonaventure,
Roebuck, 300 120 Jacob Whitton.
Golden Noble, 250 110 Adam Seigar.
Griffin, 200 100 William Hawkins.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookultra.com

You might also like