SlideShare a Scribd company logo
Programming Microsoft SQL Server 2000 with Microsoft
Visual Basic NET 1st edition Edition Rick Dobson
download pdf
https://ebookultra.com/download/programming-microsoft-sql-
server-2000-with-microsoft-visual-basic-net-1st-edition-edition-rick-
dobson/
Visit ebookultra.com today to download the complete set of
ebook or textbook!
Here are some recommended products for you. Click the link to
download, or explore more at ebookultra.com
Programming Microsoft Visual Basic NET Version 2003
Francesco Balena
https://ebookultra.com/download/programming-microsoft-visual-basic-
net-version-2003-francesco-balena/
Programming with Microsoft Visual Basic 2012 6th Edition
Diane Zak
https://ebookultra.com/download/programming-with-microsoft-visual-
basic-2012-6th-edition-diane-zak/
Microsoft SQL Server 2012 T SQL 1st Edition Tom Coffing
https://ebookultra.com/download/microsoft-sql-server-2012-t-sql-1st-
edition-tom-coffing/
Sams Teach Yourself Microsoft SQL Server 2000 in 21 Days
2nd Edition Richard Waymire
https://ebookultra.com/download/sams-teach-yourself-microsoft-sql-
server-2000-in-21-days-2nd-edition-richard-waymire/
Microsoft SQL Server 2008 Administration with Windows
PowerShell 1st Edition Ananthakumar Muthusamy
https://ebookultra.com/download/microsoft-sql-
server-2008-administration-with-windows-powershell-1st-edition-
ananthakumar-muthusamy/
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/
Inside Microsoft SQL Server 2008 T SQL Querying 1st
Edition Itzik Ben-Gan
https://ebookultra.com/download/inside-microsoft-sql-
server-2008-t-sql-querying-1st-edition-itzik-ben-gan/
Mastering Microsoft Visual Basic 2008 Evangelos Petroutsos
https://ebookultra.com/download/mastering-microsoft-visual-
basic-2008-evangelos-petroutsos/
The Microsoft Data Warehouse Toolkit With SQL Server 2008
R2 and the Microsoft Business Intelligence Toolset 2nd
edition Edition Kimball
https://ebookultra.com/download/the-microsoft-data-warehouse-toolkit-
with-sql-server-2008-r2-and-the-microsoft-business-intelligence-
toolset-2nd-edition-edition-kimball/
Programming Microsoft SQL Server 2000 with Microsoft Visual Basic NET 1st edition Edition Rick Dobson
Programming Microsoft SQL Server 2000 with Microsoft
Visual Basic NET 1st edition Edition Rick Dobson Digital
Instant Download
Author(s): Rick Dobson, Paul Cornell
ISBN(s): 9780735615359, 0735615357
Edition: 1st edition
File Details: PDF, 10.60 MB
Year: 2002
Language: english
Programming Microsoft SQL Server 2000 with Microsoft Visual Basic NET 1st edition Edition Rick Dobson
Programming Microsoft® SQL Server™ 2000 with Microsoft Visual
Basic® .NET
Foreword
Acknowledgments
Introduction
Who’s the Book For?
What’s Special About This Book?
How’s the Book Organized?
System Requirem ents
Sample Files
Support
1. Getting Started with Visual Basic .NET for SQL Server 2000
Visual Studio .NET, the Visual Basic .NET IDE
An Overview of ADO.NET Capabilities
A Starter ADO.NET Sam ple
Using Query Analyzer
2. Tables and Data Types
Chapter Resources
Data Types for Tables
Scripting Tables
3. Program m ing Data Access with T-SQL
I ntroduction to Data Access with T-SQL
Aggregating and Grouping Rows
Processing Dates
Joins and Subqueries
4. Program m ing Views and Stored Procedures
I ntroduction to Views
Creating and Using Views
Views for Remote and Heterogeneous Sources
I ntroduction to Stored Procedures
Creating and Using Stored Procedures
Processing Stored Procedure Outputs
I nserting, Updating, and Deleting Rows
Programm ing Conditional Result Sets
5. Program m ing User-Defined Functions and Triggers
I ntroduction to User-Defined Functions
Creating and I nvoking Scalar UDFs
Creating and I nvoking Table-Valued UDFs
I ntroduction to Triggers
Creating and Managing Triggers
6. SQL Server 2000 XML Functionality
Overview of XML Support
XML Formats and Schemas
URL Access to SQL Server
Template Access to SQL Server
7. SQL Server 2000 Security
Overview of SQL Server Security
I ntroduction to Special Security I ssues
Samples for Logins and Users
Samples for Assigning Perm issions
8. Overview of the .NET Fram ework
An I ntroduction to the .NET Fram ework
An Overview of ASP.NET
XML Web Services
9. Creating Windows Applications
Getting Started with Windows Forms
Creating and Using Class References
I nheriting Classes
Programm ing Events
Exception Handling for Run-Tim e Errors
10. Programm ing Windows Solutions with ADO.NET
An Overview of ADO.NET Objects
Making Connections
Working with Command and DataReader Objects
DataAdapters , Data Sets, Forms, and Form Controls
Modifying, Inserting, and Deleting Rows
11. Programm ing ASP.NET Solutions
Review of ASP.NET Design I ssues
Creating and Running ASP.NET Solutions
Session State Management
Data on Web Pages
Validating the Data on a Web Page
12. Managing XML with Visual Basic .NET
SQL Server Web Releases
Overview of XML Technologies
Generating XML Documents with the .NET Framework
Dynam ically Setting an XML Result Set
The I nterplay Between XML and Data Sets
Creating HTML Pages with XSLT
13. Creating Solutions with XML Web Services
Overview of Web services
A Web Service to Return a Com puted Result
A Web Service to Return Values from Tables
The SQL Server 2000 Web Services Toolkit
More on Populating Controls with Web Services
About the Author
Forew ord
During m y five years at Microsoft, I ’ve been helping developers understand
technologies such as Microsoft Visual Studio, Microsoft SQL Server, and Microsoft
Office Developer. During the past two years, I have worked on the Microsoft
Office XP Visual Basic Language Reference, and now, the MSDN Office Developer
Center. I n the m onthly column on MSDN, Office Talk, I have written articles to
help Office developers understand the .NET platform and how it affects their
current and future development efforts.
As I write this foreword to Rick Dobson’s book on programm ing Microsoft SQL
Server solutions with Microsoft Visual Basic .NET, I think back to my own
experiences developing software applications with Visual Basic. My first
experience with Visual Basic was learning the language using version 3.0. I
rem ember picking up m y first Visual Basic beginner’s book and being excited as I
developed my first few “Hello, World” applications. I couldn’t believe how quick
and easy it was to develop software applications that operated sim ilarly to other
popular shareware program s of that tim e.
However, during that time I also discovered som e of the shortcom ings of Visual
Basic as an enterprise-level development language. It was then that I turned my
attention to C+ + . I rem ember being very frustrated at trying to learn the
language, trying to understand concepts such as pointers, m em ory allocation,
and true object-oriented programm ing. I took classes on C+ + at the local
university, but I got even m ore frustrated having to wait m onths until I was
taught how to create the sim plest Microsoft Windows form, something I did in
just a couple of m inutes using Visual Basic. I n my frustration, I gave up trying to
learn C+ + and have been using Visual Basic to develop software applications ever
since.
As each new version of Visual Basic was released, I readied myself to learn new
software developm ent technologies. First it was ActiveX control development.
Then it was calling the Windows API . Next it was DHTML Applications. Then it was
database developm ent using Microsoft SQL Server. I t always seem ed as though I
had to learn a new language and a new developm ent paradigm for every new
technology that came along. I kept thinking that there had to be an easier and
more unified approach.
Well, now we’ve reached the advent of the Microsoft .NET platform , and with it, a
revolution in the Visual Basic language, Microsoft Visual Basic .NET. I believe that
Visual Basic .NET will provide software developers with new opportunities for
quickly and easily designing integrated software applications that connect
businesses and individuals anytime, anywhere, and on virtually any software
device. With advances in the Visual Basic .NET language, Visual Basic .NET
developers will finally be on a par with their C+ + and C# counterparts,
participating in many high-end developm ent projects. With Visual Studio .NET
features such as cross-language debugging, along with Visual Basic .NET
conformance to the com mon type system and the com mon language runtime,
organizations can drive down their development costs by tapping into the wide
range of skills that Visual Basic .NET developers now possess.
True object-oriented programm ing is now available in Visual Basic .NET, including
features such as inheritance and m ethod overloading. I t’s now simpler to call the
Windows API by using the .NET Fram ework Class Libraries. Web application
developm ent is now as easy as developing Windows form s–based applications.
Database application developm ent is made easier by uniting disparate data object
libraries such as DAO, RDO, OLE DB, and ADO under ADO.NET, utilizing the
power of XML to consume and transm it relational data over com puter networks.
And a new technology, XML Web services, allows Visual Basic .NET developers to
host their software applications’ logic over the Web. Additionally, a big issue for
software developers today is that of software application deploym ent and
versioning. I f you don’t agree, just ask any software developer about “DLL hell,”
and you’re bound to get an earful. For m any .NET applications, the .NET platform
features “copy and paste” or XCOPY deploym ent. (Users simply copy your
application files from the source media to any single directory and run the
application.) And because .NET no longer relies on the registry, virtually all DLL
compatibility issues go away.
With this book, Rick aim s to give you the skills you need to program SQL Server
solutions with Visual Basic .NET. I know you will find Rick’s book helpful. Rick
brings his experience to bear from three previous books: Programm ing Microsoft
Access Version 2002 (Microsoft Press, 2001), Program m ing Microsoft Access 2000
(Microsoft Press, 1999), and Professional SQL Server Development with Access
2000 (Wrox Press I nc., 2000). Rick also brings his experience of leading a
successful nationwide sem inar tour. More important, I know you will enjoy Rick’s
book because of his deep interest in Visual Basic .NET and SQL Server, and in
helping you, the professional developer, understand and apply these technologies
in your daily software application developm ent projects.
Paul Cornell MSDN Office Developer Center
http: / / msdn.m icrosoft.com/ officeMicrosoft Corporation February 2002
Acknow ledgm ents
This section offers me a chance to say thank you to all who helped make this
book possible. I wish to offer special recognition to five support resources.
First, the folks at Microsoft Press have been fantastic. Dave Clark, an acquisitions
editor, selected me to write the book just months after I completed another book
for Microsoft Press. Dick Brown, m y project editor, staunchly stood up for his
perception of how to m ake the book’s organization and content clear to you
without being petty or boring to m e. Dick also lightened my load substantially by
showing a real knack for editing my text without distorting the original intent.
When Dick was especially busy, he handed off some of his load to Jean Ross, who
also did an adm irable job. Others at Microsoft Press who contributed to my well-
being in one way or another include Aaron Lavin and Anne Hamilton.
Second, I had excellent working relations with several professionals within
Microsoft. Paul Cornell, a widely known technical editor at Microsoft, was kind
enough to share his insights on how to present .NET concepts compellingly. I
want to thank Paul especially for writing the Foreword to this book. Karthik
Ravindran served as the MSXML Beta Product Lead Engineer at Microsoft Product
Support Services during the time that I wrote this book. He provided valuable
technical content about the SQL Server 2000 Web releases. Other Microsoft
representatives providing moral and technical support for this book include
Richard Waym ire and Jan Shanahan.
Third, I want to express m y appreciation to the many readers, sem inar
attendees, and site visitors who took the time to tell m e what I did right or wrong
for them, and also to those who shared their technical support questions with me.
It is through this kind of feedback that I am able to know what’s important to
practicing developers. I encourage you to visit my m ain Web site
(http: / / www.programm ingmsaccess.com) and sign the guest book. The entry
form includes space for you to leave your evaluation of this book or your question
about a topic covered in the book. I prom ise to do my best to reply personally. I n
any event, I definitely read all m essages and use them so that I can serve you
better with future editions of this, and other, books.
Fourth, I want to tell the world how grateful I am to my wife, Virginia. Without
Virginia’s warm support, love, and care, this book would be less professional. She
relieves m e of nearly every responsibility around the house when I undertake a
book project. In addition, she offers strategic advice on the issues to address and
their style of coverage. When I run out of tim e, she even pitches in with the
proofreading.
Fifth, it is important for me to give praise and glory to my Lord and Savior, Jesus
Christ, who I believe gave m e the strength and wisdom to write this book. I n
addition, He gave m e health during the long gestation period that resulted in the
birth of this book. I t is my prayer that the book prove to be a blessing to you.
I ntroduction
Anyone who buys a book—or considers buying it—wants to know who the book is
for, what sets it apart from others like it, and how the book is organized. This
introduction covers those three questions, and it also discusses system
requirem ents, sample files, and support.
• First, w ho is the book for? There are at least two answers to this
question. One answer is that the book targets professional developers
(and others aspiring to be professional developers). The second group the
book addresses is those who want to build full-featured, secure SQL
Server solutions with Visual Basic .NET.
• Second, w hat’s special about the book? I hope you com e to believe
that the m ost important answer to this question is that the book
considered quality and depth of coverage more important than rushing to
market. The book will arrive on bookshelves m ore than three months after
the official release of the .NET Framework. I t is my wish that you derive
value from the extra time taken to develop the m any code samples and
the in-depth discussions of advanced topics, such as class inheritance,
ASP.NET, and XML Web services.
• Third, how is the book organized? The short answer is that there are
two main sections. One section introduces SQL Server concepts as it
dem onstrates T-SQL (Transact SQL) programming techniques. After
conveying SQL Server basic building blocks in the first part, the second
part reveals how to put those parts together with Visual Basic .NET and
related technologies into SQL Server solutions for handling common
database chores.
The three support item s include a brief description of the book’s companion CD
and how to use it, Microsoft Press Support I nformation for this book, and a
summary of system and software requirem ents for the sample code presented in
the book.
W ho’s the Book For?
This book targets professional Visual Basic and Visual Basic for Applications
developers. From my seminar tours and Web sites
(http: / / www.programm ingmsaccess.com and http: / / www.cabinc.net), I know
that these professionals are driven by a passion to deliver solutions to their
clients through applying the m ost innovative technologies their clients will accept.
In-house developers are the go-to persons for getting results fast— particularly for
custom in-house systems and databases. I ndependent developers specialize in
serving niche situations that can include under-served business needs and work
overflows. I n both cases, these professionals need training m aterials that address
practical business requirem ents while showcasing innovative technologies without
wasting their tim e. This book strives to serve this broad need in two specific
areas.
This book is for developers looking for code samples and step-by-step instructions
for building SQL Server 2000 solutions with Visual Basic .NET. The book focuses
on the integration of SQL Server 2000 with .NET technologies tapped via Visual
Basic .NET. I t is my firm belief that you cannot create great SQL Server solutions
in any programm ing language without knowing SQL Server. Therefore, this book
goes beyond traditional coverage of SQL Server for Visual Basic developers. You’ll
learn T-SQL program m ing techniques for data access, data manipulation, and
data definition. A whole chapter equips you to secure your SQL Server solutions.
In addition, there’s plenty of content in this book on Visual Basic .NET and related
technologies, such as ADO.NET, ASP.NET, XML (Extensible Markup Language),
and XML Web services. The presentation of these technologies demonstrates
coding techniques and explores concepts that equip you to build better solutions
with SQL Server 2000 databases. I n addition, the book highlights innovations
introduced through the Web releases for SQL Server 2000 that integrate SQL
Server 2000 tightly with Visual Basic .NET.
This isn’t a book about XML, but three of the book’s 13 chapters focus in whole or
in part on XML. Therefore, those seeking practical dem onstrations of how to use
XML with SQL Server and Visual Basic .NET will derive value from this book. I f
you have looked at any of the computer magazines over the past couple of years,
you know that XML is coming to a solution near you. However, the rapid pace of
XML innovation m ay have dissuaded som e from jum ping on the bandwagon while
they wait to see what’s going to last and what’s just a fad. I n the book’s three
chapters on XML technology, you’ll learn about XML documents, fragm ents, and
formatting as well as related technologies, such as XPath (XML Path Language)
queries, XSLT (Extensible Stylesheet Language Transformation), and WSDL (Web
Services Description Language).
W hat’s Special About This Book?
There are several features that make this book stand apart from the flood of
books on .NET. One of the m ost important of these is that this book didn’t rush to
market but rather shipped m onths after the release of the .NET Framework. This
allowed me enough tim e to filter, exam ine, and uncover what were the m ost
useful and innovative features for Visual Basic .NET developers building SQL
Server solutions. For example, the book includes a whole chapter on creating
solutions with XML Web services. That chapter includes two major sections on the
SQL Server 2000 Web Services Toolkit, which didn’t ship until the day of the .NET
Framework release.
The .NET Framework content is at a professional level, but it isn’t just for techies.
This book doesn’t assume any prior knowledge of the .NET Framework. I t does
assume that you get paid for building solutions programmatically and that at least
some of those solutions are for SQL Server databases. Therefore, the book
explains basic .NET concepts and dem onstrates how to achieve practical results
with those concepts through a huge collection of .NET code samples.
This book is about building solutions for SQL Server 2000. I include coverage of
the many special features that tie Visual Basic .NET and SQL Server 2000 closely
to one another. Although there is coverage of general .NET database techniques,
this book dives deeply into T-SQL programm ing techniques so that you can create
your own custom database objects, such as tables, stored procedures, views,
triggers, and user-defined functions. I n addition, there is separate coverage of
the XML features released with SQL Server 2000 as well as separate coverage of
the XML features in the first three Web releases that shipped for SQL Server
2000. There are num erous code samples throughout the book. These will equip
you to build solutions with Visual Basic .NET, T-SQL, and combinations of the two.
Finally, this book is special because of the unique experiences of its author, Rick
Dobson. I have trained professional developers in Australia, England, Canada,
and throughout the United States. This is my fourth book in four years, and you
can find my articles in popular publications and Web sites, such as SQL Server
Magazine and MSDN Online. As a Webmaster, my main site
(http: / / www.programm ingmsaccess.com) serves hundreds of thousands of
sessions to developers each year. I constantly exam ine their viewing habits at the
site to determ ine what interests them. I n addition, my site features scores of
answers to technical support questions subm itted by professional developers. My
goal in offering answers to these questions is to stay in touch with practicing
developers worldwide so that my new books address the needs of practicing,
professional developers.
How ’s the Book Organized?
There are two main parts to this book tied together by an introductory part. Part
II , the first main part, dwells on SQL Server techniques. Part I II builds on the
SQL Server background as it lays a firm foundation in .NET techniques for Visual
Basic .NET developers. Part I, the introductory part, demonstrates ways to use
SQL Server and Visual Basic .NET together.
Part I , I ntroduction
Part I , which includes only Chapter 1, has three main goals. First, it acquaints you
with the basics of Visual Basic .NET within Visual Studio .NET. You can think of
Visual Basic .NET as a major upgrade to the Visual Basic 5 or 6 that you are
probably using currently. This first section introduces some concepts that you will
find useful as you initially learn the landscape of Visual Basic .NET. The second
goal of Chapter 1 is to introduce ADO.NET. I f you think of Visual Basic .NET as a
major upgrade to Visual Basic 6, ADO.NET is m ore like a major overhaul of ADO.
In two sections, you get an introduction to ADO.NET classes— particularly as they
relate to SQL Server— and you get a chance to see a couple of beginner sam ples
of how to create SQL Server solutions with Visual Basic .NET and ADO.NET. The
third goal of the introductory part is to expose you to Query Analyzer. This is a
SQL Server client tool that ships with all comm ercial editions of SQL Server 2000.
You can think of it as an IDE for T-SQL code. Most of the book’s first part relies
heavily on T-SQL, and therefore having a convenient environment for debugging
and running T-SQL code is helpful. The final section of Chapter 1 addresses this
goal.
Part I I , SQL Server
Part I I consists of six relatively short chapters that focus substantially on
programm ing SQL Server 2000 with T-SQL. Chapter 2 and Chapter 3 introduce T-
SQL and SQL Server data types. I f you are going to program SQL Server and
create efficient, fast solutions, you m ust learn SQL Server data types, which is
one of the main points conveyed by Chapter 2. Many readers will gravitate to
Chapter 3 because it introduces core T-SQL program m ing techniques for data
access. You’ll apply the techniques covered in this chapter often as you select
subsets of rows and colum ns in data sources, group and aggregate rows from a
table, process dates, and join data from two or more tables. Chapter 3 also
considers special data access topics, such as outer joins, self joins and
subqueries.
The next pair of chapters in Part I I , Chapter 4 and Chapter 5, take a look at
programm ing database objects that you will use for data access and data
manipulation, such as views, stored procedures, user-defined functions, and
triggers. These database objects are im portant for many reasons, but one of the
most important is that they bundle T-SQL statements for their easy reuse. I t is
widely known that the best code is the code that you don’t have to write.
However, if you do have to write code, you should definitely write it just onc, and
then reuse it whenever you need its functionality. Stored procedures are
particularly desirable database objects because they save compiled T-SQL
statements that can deliver significant speed advantages over resubm itting the
same T-SQL statement for compilation each tim e you want to perform a data
access or data manipulation task. Chapter 4 and Chapter 5 are also important
because they convey T-SQL syntax for using parameters and conditional logic
that support dynam ic run-tim e behavior and user interactivity.
One of the m ost important features of SQL Server 2000 is its XML functionality.
Because XML as a topic is changing so rapidly, Microsoft adopted a strategy of
upgrading the SQL Server 2000 XML functionality through Web releases. Although
those with SQL Server 2000 can download the Web releases without charge from
the Microsoft Web site, the Web releases are fully supported. Chapter 6
introduces core XML functionality introduced with SQL Server 2000 as well as
functionality from the first two Web releases. I n particular, you can learn in this
chapter about I IS virtual directories as well as form ats for XML docum ents and
schemas. You also learn about templates in virtual directories that facilitate data
access and data manipulation tasks over the Web.
Chapter 7 closes out the SQL Server part of the book with an in-depth look at
programm ing SQL Server security. I n these tim es, security has grown into a
monum ental topic, and this chapter can keep you out of trouble by blocking
hackers from getting into or corrupting your database. You learn such topics as
how to create and manage different types of login and user accounts and how to
control the perm issions available to individual accounts as well as groups of
accounts. By learning how to script accounts and perm issions with T-SQL, you
simplify revising and updating security as conditions change (for exam ple, when
users leave the company or when new, sensitive data gets added to a table).
Part I I I , .NET
Chapter 8 starts the .NET part of the book with a review of selected .NET topics
that are covered in the initial look Chapter 1 offered at the .NET Fram ework. This
chapter provides an overview of the architecture for .NET solutions, and it drills
down on two topics: ASP.NET and XML Web services. The general purpose of this
chapter is the same as Chapter 1, which is to introduce concepts. The emphasis
in Chapter 8 isn’t how you do som ething, but rather what are the major
technologies enabling you to do som ething. Chapter 1 and Chapter 8 are both
relatively short chapters, but you may find them invaluable if you are the kind of
person who benefits from high-level overviews of a collection of topics.
Chapter 9 starts with a close exam ination of how to use Windows Form s with
Visual Basic .NET. I t then shifts its focus to a review of traditional class
processing concepts via Visual Basic .NET as an introduction to class inheritance,
a new object-oriented feature that makes its first appearance in Visual Basic with
Visual Basic .NET. Next the treatm ent of classes progresses to the handling of
built-in events as well as the raising of custom events. Finally the chapter closes
with an exam ination of the new exception handling techniques for processing run-
time errors.
Chapter 10 is a how-to guide for solutions to typical problems with ADO.NET.
Before launching into its progression of sam ples showing how to perform all kinds
of tasks, the chapter starts with an overview of the ADO.NET object m odel that
covers the main objects along with selected properties and m ethods for each
object. The how-to guide focuses on data access tasks, such as selecting rows
and columns from SQL Server database objects, as well as data manipulation
tasks, such as inserting, updating, and deleting rows in a table. Working through
the samples in the how-to guide offers a hands-on feel for using the
System .Data.SqlClient namespace elem ents to perform typical tasks.
Chapter 11 switches the focus to the Web by addressing the creation and use of
ASP.NET solutions. This chapter starts by introducing basic elem ents that you
need to know in order to use ASP.NET to create great Web solutions with Visual
Basic .NET. These include learning what happens as a page does a round-trip
from a browser to a Web server and back to the browser— particularly for data
associated with the page. Other prelim inary topics that equip you for building
professional Web solutions include running the same page in m ultiple browser
types and sniffing the browser for cases in which you want to send a page
optim ized for a specific kind of browser type. Managem ent of session state is a
major topic in the chapter, and you learn how to use enhancem ents to Session
variables for Web farms as well as the new view state variables, a non-server-
based technique for managing state in ASP.NET solutions. The last two sections in
the chapter deal with ADO.NET topics in ASP.NET solutions and the new
autom atic data validation features built right into ASP.NET.
The last two chapters in the book explore how XML interplays with Visual Studio
.NET and SQL Server 2000. For example, Chapter 12 exam ines special tools in
Visual Studio .NET to facilitate the design and editing of XML docum ents and
schemas. I n addition, you learn how to designate XPath queries that accept run-
time input for returning SQL Server result sets inside Visual Basic .NET programs.
The chapter dem onstrates techniques for processing the XML document
associated with all ADO.NET data set objects. I n the chapter’s last section, I
present a couple of code sam ples that illustrate how to program static HTML
pages based on XML documents with XSLT.
Chapter 13 drills down on XML Web services by dem onstrating several different
approaches for creating Web services as well as consum ing XML output from Web
services. Web services behave somewhat like COM objects in that you can set up
server applications for client applications. The server applications expose m ethods
to which the client applications can pass param eters. XML comes into play with
Web services in a couple of areas. First, Web services represent their inputs and
outputs via WSDL, an XML-based language that form ally describes an XML Web
service. Second, Web services return data to their clients as XML documents or
document fragm ents.
System Requirem ents
The requirem ents for this book vary by chapter. I developed and tested all
samples throughout this book on a com puter equipped with Windows 2000
Server, SQL Server Enterprise Edition, and the Enterprise Developer Edition of
Visual Studio .NET, which includes Visual Basic .NET. To use this book, you’ll need
to have Visual Basic .NET or Visual Studio .NET installed on your computer. (See
Chapter 1 for m ore information on versions of Visual Basic .NET and Visual Studio
.NET.) I n addition, you’ll need SQL Server 2000, and for som e of the chapters,
you’ll need SQL Server 2000 updated with Web releases 1, 2, and 3. Chapter 6
gives the URLs for downloading Web releases 1 and 2. Chapter 12 gives two
different URLs for downloading Web Release 3— one with the SQL Server 2000
Web Services Toolkit and the other without it.
For selected chapters, you can run the samples with less software or different
operating systems than the one that I used. For example, chapters 2 through 5
will run on any operating system that supports a comm ercial version of SQL
Server 2000, such as Windows 98 or a m ore recent Windows operating system.
Chapter 7 requires an operating system that supports Windows NT security, such
as Windows 2000 or Windows XP Professional. Chapter 6, Chapter 11, and
Chapter 13 require Microsoft I nternet Inform ation Services (I I S). I n addition,
Chapter 6 requires the installation of Web releases 1 and 2. For Chapter 11, your
system needs to m eet the m inim um requirem ents for ASP.NET. (See a note in the
“How Does ASP.NET Relate to ASP?” section of Chapter 8.) Several of the
samples in Chapter 1 3 require Web Release 3 and its associated SQL Server
2000 Web Services Toolkit.
Sam ple Files
Sample files for this book can be found at the Microsoft Press Web site, at
http: / / www.m icrosoft.com/ m spress/ books/ 5792.asp. Clicking the Com panion
Content link takes you to a page from which you can download the sam ples.
Supplem ental content files for this book can also be found on the book’s
companion CD. To access those files, insert the companion CD into your
computer’s CD-ROM drive and make a selection from the menu that appears. I f
the AutoRun feature isn’t enabled on your system (if a m enu doesn’t appear when
you insert the disc in your computer’s CD-ROM drive), run StartCD.exe in the root
folder of the com panion CD. I nstalling the sam ple files on your hard disk requires
approximately 15.3 MB of disk space. I f you have trouble running any of these
files, refer to the text in the book that describes these programs.
Aside from the sample files that this book discusses, the book’s supplem ental
content includes a stand-alone eBook installation that will allow you to access an
electronic version of the print book directly from your desktop.
Support
Every effort has been m ade to ensure the accuracy of this book and the contents
of the companion CD. Microsoft Press provides corrections for books through the
World Wide Web at the following address:
http: / / www.m icrosoft.com/ m spress/ support
To connect directly to the Microsoft Press Knowledge Base and enter a query
regarding a question or an issue that you may have, go to:
http: / / www.m icrosoft.com/ m spress/ support/ search.asp
If you have comments, questions, or ideas regarding this book or the companion
content, or questions that are not answered by querying the Knowledge Base,
please send them to Microsoft Press via e-mail to:
mspinput@m icrosoft.com
Or via postal mail to:
Microsoft Press Attn: Programm ing Microsoft SQL Server 2000 with Microsoft
Visual Basic .NET Editor One Microsoft Way Redm ond, WA 98052-6399
Please note that product support is not offered through the above mail address.
For product support information, please visit the Microsoft Support Web site at:
http: / / support.m icrosoft.com
Chapter 1. Getting Started w ith Visual
Basic .NET for SQL Server 2 00 0
This book aims to give professional developers the background that they need to
program SQL Server applications with Microsoft Visual Basic .NET. This overall
goal implies three guidelines:
• First, the book targets practicing developers. I n my experience, these are
busy professionals who need the details fast. These individuals already
know how to build applications. They buy a book to learn how to build
those applications with a specific set of tools.
• Second, the book is about building applications for SQL Server 2000. This
focus justifies in-depth coverage of SQL Server program m ing topics— in
particular, T-SQL, Microsoft’s extension of the Structured Query Language
(SQL).
• Third, the book illustrates how to program in Visual Basic .NET, but with
particular emphasis on database issues for SQL Server 2000. Special
attention goes to related .NET technologies, such as the .NET Fram ework,
ADO.NET, ASP.NET, and XML Web services.
My goal in this chapter is to equip you conceptually for the rest of the book.
Therefore, this chapter includes material that acquaints you with application
developm ent techniques and topics for SQL Server 2000 and Visual Basic .NET.
The discussion of the samples in this chapter generally aim s to convey broad
approaches instead of how to run the sample. All the remaining chapters except
for Chapter 8, another conceptual chapter, have sam ples with instructions aim ed
at professional developers.
I believe that the overwhelm ing majority of professional Visual Basic developers
have no hands-on fam iliarity with Visual Basic .NET and its related technologies.
If you already knew Visual Basic .NET, it wouldn’t make any sense to buy a book
describing how to use it. This chapter therefore focuses on how to get started
with Visual Basic .NET and one of its core related technologies for those building
SQL Server applications— ADO.NET. I also believe that m ost Visual Basic
developers don’t have an intimate knowledge of SQL Server— especially for
creating user-defined objects, such as tables, views, and stored procedures. This
capability can em power you to build m ore powerful and more secure applications.
As you learn about database objects and how to create them in Chapter 2
through Chapter 7, reflect back on the Visual Basic .NET coverage in this chapter
and how to marry database creation techniques and Visual Basic .NET
developm ent techniques. One of the best tools to build database objects is SQL
Server 2000 Query Analyzer. This chapter’s closing section conveys the basics of
Query Analyzer that you need to follow the sam ples in Chapter 2 through Chapter
7.
Visual Studio .NET, the Visual Basic .NET I DE
Visual Studio .NET is the new m ultilanguage integrated developm ent environm ent
(I DE) for Visual Basic, C# , C+ + , and JScript developers. I f you are developing
solutions for Visual Basic .NET, I definitely recom mend that you use Visual Studio
.NET as your developm ent environm ent. This section dem onstrates how to get
started using Visual Studio .NET for developing solutions with Visual Basic .NET.
Visual Basic .NET is available as part of Visual Studio .NET in four editions:
• Professional
• Enterprise Developer
• Enterprise Architect
• Academ ic
All four editions of Visual Studio .NET include Visual Basic .NET, Microsoft Visual
C# .NET, Microsoft Visual C+ + .NET, and support for other languages. I n
addition, Microsoft offers Visual Basic .NET Standard, which doesn’t include Visual
C# .NET or Visual C+ + .NET.
Because this book targets professional Visual Basic developers creating SQL
Server applications, it uses the Enterprise Developer Edition of Visual Studio
.NET. You may notice some differences if you’re using another edition.
Visual Studio .NET can be installed on computers running one of five operating
system s: Windows 2000, Windows NT, Windows XP, Windows ME, and Windows
98. Not all the .NET Framework features are available for each operating system.
For example, Windows 98, Windows Me, and Windows NT don’t support
developing ASP.NET Web applications or XML Web services applications. The
samples for this book are tested on a computer running Windows 2000 Server,
which does support all .NET Fram ework features.
Starting Visual Studio .NET
To open Visual Studio .NET, click the Start button on the Windows taskbar,
choose Programs, and then choose Microsoft Visual Studio .NET. Visual Studio
displays its integrated developm ent environm ent, including the Start Page (unless
you previously configured Visual Studio to open differently). From the Start Page,
you can configure Visual Studio to work according to your developm ent
preferences, and you can start new solutions as well as open existing projects.
Configuring Visual Studio .NET for Visual Basic .NET
Use the links on the left side of the Start Page to begin configuring Visual Studio
.NET for developing solutions in Visual Basic .NET. Click the My Profile link to
open a pane in which you can specify an overall profile as well as individually
indicate your preferences for Keyboard Schem e, Window Layout, and Help Filter.
You also can designate the initial page that Visual Basic .NET displays. When you
are beginning, it m ay be particularly convenient to choose Show Start Page. As a
Visual Basic developer who has worked with Visual Basic 6, you m ight feel m ost
familiar with a layout that reflects your prior developm ent environm ent. Figure 1-
1 shows these My Profile selections.
Figure 1 -1 . My Profile selections for starting Visual Studio .NET for a
Visual Basic developer.
Using the Start Page
After setting your profile, you can return to the initial Start Page pane by
choosing the Get Started link from the menu on the left border. I f you had
created previous solutions, the last four m odified projects would appear on the
Projects tab of the Start Page. The tab shows project nam es along with date last
modified. I f a project you want to view doesn’t appear on the list, you can click
the Open Project link to display the Open Project dialog box and then navigate to
a directory containing the previously created solution. Select the project’s folder
that you want to open in the I DE, and double-click the solution file (.sln) for the
project. The next section illustrates this process in the context of a sample
project.
To create a new solution, click the New Project link to open the New Project
dialog box. I f you saved preferences such as those shown in Figure 1-1, the
dialog will automatically select Visual Basic Projects in the Project Types pane of
the New Project dialog box. On the right, you can select a template for launching
a project. Table 1-1 shows the project template nam es along with a brief
description available from the Enterprise Developer Edition of Visual Studio .NET.
Choosing a template (by clicking OK after selecting a template) opens a project
ready for creating the type of solution that you want to develop. When Visual
Studio .NET saves the tem plate to start a new project, it specifies either a file
folder or a Web site for the template’s files; you can override the default nam es
for the file folder and Web site.
Note
Not all the project template types in Table 1-1 are available
with the non-Enterprise (or Standard) editions of Visual
Studio .NET. In addition to the empty projects, the Standard
editions make available the Windows Application, ASP.NET
Web Application, ASP.NET Web Service, and Console
Application templates.
7DEOH9LVXDO%DVLF1(73URMHFW7HPSODWH7SHV
7HPSODWH1DPH UHDWHV$
Windows
Application
Windows application with a form
Class Library Windows application suitable for a library of classes without a
form
Windows Control
Library
Project for developing custom reusable form controls for
Windows applications
ASP.NET Web
Application
Web application on a Web server
ASP.NET Web
Service
XML Web service on a Web server
Web Control Library Project for developing custom reusable controls for Web
applications
Console Application Command line application that operates in an MS-DOS–style
window (the Console)
Windows Service Windows service, form erly NT service, application that runs
in the background without its own custom user interface
Em pty Project Local project with no custom style
Em pty Web Project Web project with no custom style
New Project I n
Existing Folder
Blank project in an existing folder
There are two main categories of templates: Web projects and local projects. Web
projects perm it a browser to serve as the client for a project. Web projects are
optim ized for form processing on the Web server. Local projects offer custom
form user interfaces with the capability of processing on a local workstation. Local
projects can provide richer environments more conducive to client-side
programm ing, but local projects don’t offer the wide accessibility of solutions
running from a Web server.
Creating and Running a Console Application
When you select a Console Application template and click OK to launch a new
project, Visual Studio .NET responds by opening a project with a blank module. I n
addition to the Module window, Visual Studio displays Solution Explorer and the
Properties window. You can enter code directly into the Module window, which
appears as a tab that you can select alternately with the Start Page. Figure 1-2
shows a code sam ple in the Main subroutine that prompts for a first and second
nam e before com bining them and displaying them in the Console (the computer’s
monitor). The code is also available as MyNam eIsFrom Console in the Chapter 1
folder on the companion CD for this book. Although Visual Basic developers didn’t
previously have Console applications routinely available, this sample should be
very easy to follow. The final two lines present an instruction and cause the
window to remain open until the user responds to the instruction. This allows the
user to view the full name in the Console window.
Figure 1-2. A Console application for displaying a full nam e based on user
input for first and second nam es.
To the right of the Module window are two other windows. The top one of these is
Solution Explorer. I t shows the file structure for the solution. Solution Explorer
indicates in its first line that the solution consists of just one project. Below that
line appears the name of the project, MyNam eI sFrom Console. Within the project
are three entries: one each for the References, AssemblyI nfo.vb, and Module1.vb
elem ents within the solution’s project. By default, the Properties window is below
Solution Explorer. I n the Full Path property text box is an excerpt showing the
path to Module1.vb on my computer. When you click the project name in Solution
Explorer, the Project Folder text box in the Properties window displays the path of
the directory holding the solution’s files. It is this directory that you copy to
deploy your solution on another computer with the .NET Fram ework installed. The
solution won’t run without the com mon language runtime on the computer to
which you copy the directory containing the .NET Fram ework solution. See
Chapter 8 for m ore detailed coverage of the .NET Fram ework, including the
runtime and distributing .NET Fram ework solutions as assemblies of files in
folders.
You can test run the application by choosing Start from the Debug m enu, or by
pressing F5. This opens the Console window with a prompt to enter a first nam e.
After you close your application and save any changes to it, your solution appears
on the Start Page for recent solutions. I f you start Visual Studio .NET and the
solution you want to open doesn’t appear on the Projects tab of the Start Page,
you can also open the solution by clicking Open Project. I n the Open Project
dialog box, choose the file with the .sln extension and the solution’s nam e
(MyNam eIsFromConsole). A solution can contain just one .sln file, but it can
contain m ultiple projects.
You also can run the solution and open the Console window directly from
Windows Explorer without using Visual Studio .NET. Open the bin subdirectory
within the directory containing the assembly folder for the solution. Then double-
click the MyNameIsFrom Console.exe file. This opens the Console window with the
prompt for a first nam e.
An Overview of ADO.NET Capabilities
ADO.NET encapsulates the data access and data manipulation for the .NET
Framework. This section gives you an overview of the topic that equips you for a
starter sam ple in the next section. Microsoft chose the nam e ADO.NET for the
.NET Framework data access com ponent to indicate its association with the earlier
ADO technology for data access. While there are som e sim ilarities in syntax
between ADO.NET and ADO (particularly for connection strings), many will find
the differences are m ore obvious than the sim ilarities. These differences
substantially upgrade ADO.NET over ADO in two key areas— scalability and XML
(Extensible Markup Language) interoperability. As a result, you will be able to
create database applications with ADO.NET that serve m ore users and share m ore
data than you did with ADO. See Chapter 10 for a m ore intensive examination of
ADO.NET. Chapter 12 explicitly explores interoperability between ADO.NET and
XML.
.NET Data Provider Types
Your .NET Fram ework solutions require .NET data providers to connect to data
sources. These providers are different from those used with ADO, but there are
distinct similarities in some of the ways you use them. With .NET data providers,
your solutions can connect, read, and execute commands against data sources.
The .NET providers also offer selected other functions, such as the m anagement
of input and output parameters, security, transactions, and database server
errors.
Visual Studio .NET ships with two .NET data providers— the SQL Server .NET data
provider and the OLE DB .NET data provider. In addition, you can download an
ODBC .NET data provider from the Microsoft MSDN download site
(http: / / msdn.m icrosoft.com/ downloads/ default.asp).
Note
As I write this chapter, the ODBC .NET data provider just became
available with the rollout of the shipping version of Visual Studio
.NET. You can download it from
http: / / msdn.microsoft.com/ downloads/ default.asp?url= / downloads/ s
ample.asp?url= / msdn-files/ 027/ 001/ 668/ msdncompositedoc.xml.
The URLs for resources sometimes change. You can always search
for the ODBC .NET data provider at the MSDN download site to
obtain its current download location.
The three providers taken together offer fast, highly focused access to selected
data sources as well as general access to a wide range of possible data sources.
The SQL Server .NET data provider is optim ized for SQL Server 7.0 and SQL
Server 2000. This data provider connects directly to a SQL Server instance.
The OLE DB .NET data provider connects to OLE DB data sources through two
intermediate layers— the OLE DB Service Component and the classic OLE DB
provider introduced along with ADO. The OLE DB Service Component m anages
connection pooling and transaction services. The classic OLE DB provider, in turn,
directly connects to a database server. Microsoft explicitly tested the OLE DB .NET
data provider with SQL Server, Oracle, and Jet 4.0 databases. Use the OLE DB
.NET data provider to connect to the SQL Server 6.5 version and earlier ones.
This provider is also good for connecting to your Microsoft Access solutions based
on the Jet 4.0 engine.
The OLE DB .NET data provider definitely doesn’t work with the OLE DB provider
for ODBC data sources (MSDASQL). Because the .NET OLE DB data provider
doesn’t connect to ODBC data sources, you require the ODBC .NET data provider
for connecting to ODBC data sources from your .NET Framework solutions.
There are four main .NET data provider classes for interacting with a rem ote data
source. The nam es of these classes change slightly for each type of provider, but
each .NET data provider has the sam e four kinds of classes. The names for the
SQL Server .NET data provider classes for interacting with SQL Server instances
are SqlConnection, SqlCommand, SqlDataReader, and SqlDataAdapter. You can
use the SqlDataReader class for read-only applications from a SQL Server data
source. Two especially convenient ways to display results with a SqlDataReader
class are in a m essage box or the Visual Studio .NET Output window. The
SqlDataAdapter class acts as a bridge between a remote SQL Server data source
and a DataSet class instance inside a Visual Basic .NET solution.
A data set in a Visual Studio solution is a fifth type of ADO.NET class. A data set
can contain m ultiple tables. A sixth ADO.NET class is the DataView class, which
acts like a view based on a table within a DataSet object. Windows Forms in
Visual Basic .NET applications can bind only to tables within a DataSet object and
DataView objects. I examine the DataSet object later in this section. Chapter 10
includes a systematic summary of all six ADO.NET classes that reviews selected
properties and m ethods of each class. The overview of ADO.NET classes in
Chapter 10 is supported by num erous code samples that illustrate how to
manipulate instances of the classes programmatically.
Note
In order to use abbreviated names, such as those listed in
this section for the SQL Server .NET data provider class
instances, your application needs a reference to the SqlClient
namespace. You can create such a reference with an Imports
System.Data.SqlClient statement just before a Module
declaration.
SqlConnection Class
An instance of the SqlConnection class can interface directly with a SQL Server
data source. Use a constructor statement to instantiate a SqlConnection object
from the SqlConnection class. The constructor statement is a new type of sy-ntax
for .NET Fram ework solutions. This type of statement perm its you to declare,
instantiate, and pass startup param eters to an object based on a class. With the
SqlConnection constructor statem ent, you can specify a connection string as an
argum ent for the constructor statem ent. Alternatively, you can assign the
connection string to the SqlConnection object after its instantiation with a
property assignm ent statement for the ConnectionString property. The following
line shows the syntax to instantiate a new SqlConnection object, MySQLCnn1,
with a connection string designating integrated security to the m ydb database on
the myserver instance of SQL Server. You don’t have to explicitly indicate a
provider because the constructor statem ent reveals the type of provider through
its reference to the SqlConnection class.
Dim MySQLCnn1 As New _
SqlConnection(“Integrated Security=SSPI;  _
Data Source=myserver;Initial Catalog=mydb)
After instantiating a SqlConnection object, you need to invoke its Open method
before the object can link another object based on one of the other SQL Server
.NET data provider classes, such as SqlCommand, SqlDataAdapter, or
SqlDataReader, to a SQL Server instance. I nvoke the Close m ethod to recover the
resources for a SqlConnection object when your solution no longer needs it. The
Close m ethod rolls back any pending transactions and releases the connection to
the connection pool. The Dispose m ethod is also available for removing
connections, but it invokes the Close m ethod and performs other .NET
adm inistrative functions. Microsoft recomm ends the Close m ethod for removing a
connection. Unclosed connections aren’t returned to the connection pool.
SqlCom m and and SqlDataReader Classes
One way to put a connection to use is to employ it along with the SqlCom mand
and SqlDataReader objects. A SqlDataReader object can maintain an open
forward-only, read-only connection with a SQL Server database. While the
SqlDataReader using a SqlConnection object is open, you cannot use the
SqlConnection object for any other purpose except to close the connection.
Closing a SqlDataReader object releases its associated SqlConnection object for
other uses. The SqlDataReader class doesn’t have a constructor statement. You
declare the SqlDataReader object with a Dim statement and assign a result set
from a SqlCommand object to a SqlDataReader with the ExecuteReader method
of the SqlCommand object. Finally, invoke the SqlDataReader object Read
method to open a row from the result set in the SqlDataReader.
The SqlCommand object can serve multiple functions, including processing a T-
SQL statem ent against a connection. When used in this fashion, the SqlCommand
can take two argum ents. The first can be a T-SQL data access statement, such as
SELECT * FROM MyTable . The second SqlCom m and argum ent designates the
source connection for the T-SQL statem ent. For example, you can use the name
of a SqlConnection object, such as MySQLCnn1.
Figure 1-3 shows the route from a SQL Server data source to a SqlDataReader
object. Although the SqlConnection and SqlCom mand objects support two-way
interaction with a data source, the SqlDataReader object allows read-only access
to the result set from the T-SQL statem ent serving as an argum ent for a
SqlCommand constructor. Because a SqlDataReader object cannot specify its own
data source, a SqlDataReader object must link to a SqlConnection object through
an intermediate SqlCom mand object.
Figure 1 -3 . A schem atic illustrating the route by w hich a SqlDataReader
object returns values to an application.
Random documents with unrelated
content Scribd suggests to you:
The earliest record of the punishment being actually carried out is
found in the Book of Numbers (xxv.), on the occasion of the
Israelites having sacrificed to the gods of the Moabites at Baal-peor,
when Moses received and put into effect the Divine command to
hang the leaders in the acts of idolatry.
Later, when a famine was raging in the land of Israel, David
handed over to the Gibeonites seven of the sons of Saul, whom they
hanged.
Another instance of punishment by hanging is found in the Book
of Esther (ix.), when King Ahasuerus condemned the ambitious and
unprincipled Haman to be hanged on the gallows he had prepared
for the Jew Mordecai; and at the request of Queen Esther the same
punishment was meted out to his ten sons.
Hanging was regulated by law by Henry i., but the earliest
recorded use of the rope in England can be traced to the days of
Henry ii. This questionable distinction belongs to the town of
Malden, which, in the year 1167, “was amerced three marks for
having hanged a robber without such view,” that is to say, the
approval of the King’s Sergeant.
Eight years later, Andrew Bucquinte, a thief, who had carried out
numerous robberies in the City of London, was sentenced to be
hanged, “which was done, and the Citie became more quiet”; while
the later chroniclers give full details, which had been passed on to
them, of the death in 1196 of William FitzOsbert, or “Longbeard.”
Matthew Paris, Stow, and Hollinshed all name “the Elms” as the
place of hanging. Roger de Wendover records that Longbeard was
drawn to the gallows “near Tyburn,” and there hanged with nine of
his followers.
This would seem to be the first authentic account of an execution
by hanging at Tyburn, though, in fact, it is very doubtful—Roger de
Wendover notwithstanding—if Longbeard met his fate at Tyburn.
“The Elms” was the name given to the hanging-place at Smithfield
long before the law’s last penalty was demanded at Tyburn, and at
the “Elms, at Smithfield,” a century after Longbeard’s death, William
Wallace was hanged and quartered in 1305.
The name seems to have been carried to Tyburn when hangings
were transferred there, and for a time the two execution-grounds
flourished simultaneously.
Longbeard was the first of a line of romantic impostors who
attracted admirers by hundreds, and ended their days under the
gallows. He represented to Richard i. that the wealthy citizens of
London were oppressing the poor; he preached to the masses,
proclaiming that he was their saviour, and that to him they must look
for deliverance. Richard listened to his story. This so encouraged him
that he “had gotten two and fiftie thousand persons readie to have
taken his part,” and all rich people went in fear of their lives.
Summoned to appear before the Archbishop of Canterbury for
inciting to rebellion, Longbeard was accompanied by so many
followers that the Prelate dared not deliver sentence. He then
retired, with his paramour, to the Tower of St. Mary-le-Bow, which he
had previously provisioned and fortified. Ignoring all the Archbishop’s
commands to appear, it was only when the church had been
assaulted and set on fire that, driven out by smoke and flames, he
surrendered. He was dragged to the Tower, and thence to the final
scene.
Longbeard was a man of evil life, but the poor looked upon him as
a martyr, and, Stow says, “pared away the earth that was be-bled
(sprinkled) with his blood, and kept the same as holy reliques to
heale sicknesse.” It would therefore appear that he was not only
hanged, but drawn and quartered as well.
This custom of carrying away trophies from the gibbet was a
superstition, and Brand, in his edition of Bourne’s Antiquitates
Vulgares, writes:
“Chips of gallows and Places of Execution are used for Amulets
against Agues. I saw lately some Saw-dust, on which Blood was
absorbed, taken for some such purpose from off the Scaffold on the
beheading of one of the rebel lords, 1746.”
Possibly the added information that the crowd stole “the gibbet” is
a misconception by the chronicler to whom the tradition is handed
down. The passage is not without difficulty. So early in our history
“Tyburn” meant merely the Ty-bourne, or brook, where it flowed
from Hampstead towards the Thames, not necessarily the common
place of execution which afterwards took to itself the distinctive
name of Tyburn. What the “Elms” represented has never, so far as
can be gathered, been satisfactorily cleared up. It is reasonably
supposed that rows of trees stood on the banks of the burn where it
passed through the forest and marshes, and probably their branches
afforded convenient means for hanging prisoners.
With so much growing timber about, it would have been useless
expense and labour to bring carpenters to construct a gallows, and
to people of the thirteenth century a quite unnecessary refinement.
“The Elms” near Tyburn was the scene of many executions after that
of Longbeard. If, in fact, the hanging-place at “the Elms” was on
trees growing beside the bourne, then, owing to its course, the
execution-ground must have been some few hundred yards farther
eastward than the Tyburn of later days.
King John not only hanged some Welsh rebels at Nottingham in
1212, but nine years later Constantine Fitz-Arnulph and two
confederates were hanged for raising a tumult at Westminster, so by
this time hanging as a method of capital punishment had become an
accepted institution. The records tell of twelve pirates hanged in
Hampshire in Henry iii.’s reign, and of eighteen Lincoln Jews
suffering the same fate a few years later. In London also great strife
between the goldsmiths and tailors led to the imprisonment of many
rioters, thirteen of whom were hanged for the trouble they had
caused in the City.
As if London had not enough horrors of its own, the custom was
established in the reign of Edward I. of bringing offenders from the
provinces to the capital for execution, and taking wrongdoers of
London to certain towns in the country for the same purpose. Jews
at Northampton being accused of having crucified a Christian boy on
Good Friday, many “Jewes at London after Easter were drawne at
horse tailes and hanged”; and such wholesale punishments of that
persecuted tribe were of frequent occurrence.
Although “the Elms” is not actually mentioned, the accounts
related of Rice ap Meredith, a rebel, and of Gilbert Middleton, in
1316, lead to the conclusion that they ended their days at “the
Elms”; they were drawn “through the streets of the citie to the
gallowes.” Middleton, a fourteenth-century “Dick Turpin,” was
brought from the north to London, and hanged in the presence of
two cardinals whom he had robbed. These Church dignitaries had
come to England with the view of making a double peace, namely,
between Edward ii. and Thomas, Duke of Lancaster, and between
England and Scotland. But after Middleton had attacked and robbed
them in the north, they were so disgusted they never visited
Scotland at all. These were the early days of the self-assertion of the
populace—about which we now hear so much under the banner of
Socialism.
Richard Davey, in his Pageant of London, writing of this time,
says:
“The evolution of slavery into serfdom, and of serfdom into
vassalage—one of the greatest efforts towards true progress
effected in this age—very rapidly brought about the creation of
what we might describe as a lower class, whose voice was soon
to be heard clamouring for its share in direct or indirect
administration. Hence the increasing influence of universities,
guilds, and corporations.”
It must not be supposed from this, however, that education took
any important turn, for the middle-class man and woman could
neither write nor read until the money derived from the destruction
of the monasteries was utilised for founding Grammar Schools. That
is why it is so difficult to glean far-away facts when information and
chronicling were in the hands of so few.
By the time Wat Tyler’s rebellion had been put down, and
ruthlessly punished, London appears to have possessed a permanent
gallows. Victims numbered by hundreds, who had participated in the
rising, dangled on trees and gibbets all over the counties of
Middlesex, Essex, and Kent, and the excessive use of the hangman’s
rope no doubt made some such structure a necessity. “The Elms”
drops out of notice. Baker, relating in his Chronicle the arraignment
of Roger Mortimer half a century earlier for encompassing the death
of Edward ii., and his subsequent execution, speaks of him as being
“hanged on the common gallows at the Elms, now called Tyburn,
where his body remained two days as an opprobrious spectacle for
all beholders.”
This is but a small detail, but it is in such strokes of the pen that
we learn much of the general state of things in past ages, and that
word “Common” depicts a gallows in frequent use. It was after this
that the place of execution seems to have been moved to Tyburn
Road, and perhaps it was the erection of the permanent gallows at
this time, that led Fuller to speak of the gibbet having been placed
there as “an instrument of torture and punishment for the Lollards”
(the followers of John Wyclif), and to quaintly write:
“Tieburne some will so have it called, from Tie and Burne, because
the poor Lollards, for whom this instrument (of cruelty to them,
though of Justice to Malefactors) was first set up, had their necks
tied to the Beame, and their lower parts burnt in the fire.”
The worthy Fuller refers to the Act “De Heretico Comburendo,” for,
not content with mere death, it had been thought necessary to
invent another mode of punishment for persecuting the Lollards, and
this Act authorised the burning of heretics in a high public place.
As for the derivation here attempted, it seems rather a quaint
conceit by Fuller than a serious explanation of the origin of a word
which for so many centuries bore a notorious meaning. The Bourne
flowed along its course from time immemorial; as we know, it was
called Tiburne, or Tyburn, in the earliest references extant, and it is
much more likely that the execution-ground took its name from the
Bourne, than that the brook itself owes its distinctive title to a
particular form of death practised so late as the time of the Lollards.
The executions of Nicholas Brembre and Judge Tresillian in 1388
are supposed to have been the first recorded deaths at this new
Tyburn. These men had been impeached for high treason. Brembre
had been four times Lord Mayor of London. The charge against him
was that he had “intended to slay some thousands of the citizens, to
alter the name of London to that of ‘New Troy,’ and to have himself
created Duke thereof.” So the gentleman was not without ambitions.
Roger Bolingbroke, who met his death for alleged necromancy,
was another of the early victims of Tyburn. The whole charge arose
out of the bitter jealousy existing between Humphrey, Duke of
Gloucester, son of Henry iv., and Cardinal Beaufort, Bishop of
Winchester, the son of John of Gaunt and Catharine Swynford. On
the death of Henry v. each vied with the other for the guardianship
of the young King (who was but nine months old when his father
died) and the leadership of public affairs. Beaufort’s huge wealth
secured him the support of the Church, into whose coffers he
poured large gifts, and finally Humphrey was arrested and thrown
into prison. Meantime Beaufort had devised that charges of
witchcraft should be brought against Gloucester’s chaplain, Roger
Bolingbroke and his wife Eleanor Cobham, Duchess of Gloucester,
representing that she was exercising necromancy to encompass the
death of Henry vi. and place her husband on the throne.
Stow tells us the story:
“Roger Bolinbrooke a great Astronomer, with Thomas
Southwell, a Chanon of Saynt Stephen’s Chapell at Westminster,
were taken as Conspiratours of the King’s death, for it was said,
that the same Roger shoulde labour to consume the King’s
person by way of Necromancie, and the said Thomas should say
Masses in the Lodge of Hornesey park beside London, vpon
certain instruments, with the which the said Roger should use
the craft of necromancies, against the faith, and was assenting
to the said Roger in all his works. And the 5 and twentieth day
of July being Sunday, Roger Bolinbrooke, with all his
instruments of necromancie, that is to say a chayre paynted
herein he was wont to sit, vppon the 4 corners of which chayre
stood foure swords, and vppon every sword an image of copper
hanging with many other instruments. Hee stoode on a high
scaffolde in Paules Churchyard, before yᵉ crosse, holding a
sword in his right hand and a scepter in his left, arrayed in a
marvellous attire, and after the Sermon was ended by Maister
Low Byshop of Rochester, he abjureth all articles belonging to
the crafte of necromancie of missowning to the faith, in
presence of the Archbishop of Canterbury, the Cardinall of
Winchester, the byshop of London, Salisbury and many other.”
Eleanor Cobham, Duchess of Gloucester, was brought before
Chicheley, Archbishop of Canterbury, and Cardinal Beaufort, Bishop
of Winchester, and others, in St. Stephen’s Chapel at Westminster.
Bolingbroke was produced as a witness against her, and accused her
of inciting him to practise necromancy. Finally a Commission was
appointed to inquire into the various witchcrafts and treasons
against the King’s person, and Bolingbroke and Southwell as
principals, and Eleanor Cobham as an accessory, were indicted for
treason. Bolingbroke was condemned to death and was taken to
Tyburn, where he was hanged, drawn, and quartered, denying the
crime of treason, but crying for God’s mercy for having presumed
too far in his cunning.
Nor did Beaufort’s vengeance end here. Humphrey of Gloucester
was thrown into prison, where he languished and died in 1446—
murdered, some writers allege, by Beaufort. In the following year
five of his most noted sympathisers were arrested and put in the
Tower, from whence they were “drawn to Tiborne, hanged, let down
quick, stripped, marked with a knife to be quartered.” At that
juncture the Duke of Suffolk arrived with a pardon, which did not,
however, deprive the hangman of his perquisites. Says Stow: “Yᵉ
yeomen of yᵉ gallows had their livelode, and the hangmen their
clothes and wearing apparel.” He adds that the pardon was secured
by the prayers of “Master Gilbert Worthington, the parson of St.
Andrewes in Holborn.”
A quiet hanging was little to the taste of either the dispensers of
justice or of vengeance, or of the crowds that gathered at
executions in those rude days, or, indeed, in the days of the Tudors,
or even of Charles ii. Common malefactors were swung upon a
gibbet and left there, no more trouble was bestowed upon them; but
for the plotter against the State, the process of death was more
elaborate. References to the victims being “hanged, drawne, and
quartered” abound.
It is impossible within the limits of decency to describe in detail
the revolting tortures and mutilations practised upon the poor
wretches whom ill-fortune brought to Tyburn. What the sentence
implied can be found in the State Trial of the Duke of Buckingham,
where it was delivered in all its unabashed nakedness by the Earl of
Norfolk, though Henry viii. substituted decapitation. What it meant in
actual practice may be judged from the records of the punishment of
those concerned in the Babington Plot against Queen Elizabeth.
Fifteen men were condemned to die, and after a day and a half had
been spent on the ghastly work, leaving it still incomplete, the
Queen, disgusted with the sickening business, bade the executioners
“despatch with haste” the remaining victims, remitting the last
abominations.
It was the earliest custom to tie the wretched victim by the heels,
attach him by a rope to a horse’s tail, and thus drag him from gaol
to the place of execution. Arrived at his destination, jeered and
howled at all the way, and sorely bruised as he jolted over the rough
roads to his death, he was placed on the gibbet. The rope, after
much fumbling, was adjusted mid the yells of the spectators, and
then the prisoner was hoisted on high by the executioner and his
assistant, until slow suffocation ended his misery.
Later, for humanity’s sake, a rough hurdle was utilised, to which
the condemned man was bound, and on this he was dragged to the
gallows. Not until Stuart times was the malefactor’s springless cart
introduced.
In only too many cases, however, the dread sentence of “hanged,
drawn, and quartered” was carried out with all its attendant horrors.
The condemned wretch, after he had been dangled from the gallows
on a short rope for a considerable time, and undergone all the
horrors of death by suffocation without its merciful release, was cut
down still alive. Then he was stripped, his clothes being the
executioner’s perquisite, and with his knife that functionary marked
off the lines he would follow in carrying out the quartering. The
victim was then disembowelled, the entrails being thrown on a fire
and burnt before his dying eyes. The head was decapitated. Finally,
the mutilated corpse was divided into four pieces, which were
sometimes salted or par-boiled, and, with the head, made five
ghastly evidences of the consequences that would befall those who
offended the higher powers. These “bits” were sent for exhibition in
five different localities where it was supposed that such warning
would be most beneficial.
Anything more horrible cannot be imagined. And yet a crowd
always assembled to witness the scene. Men, women, and children
scrambled for a front view, and the grand ladies and smart
gentlemen of comparatively refined times did not appear to consider
it degrading to watch a person hanged by the neck until he was
dead. In fact, the morbid love of such horrors pursued us till a much
later date, for murderers were publicly hanged outside Newgate, on
a busy thoroughfare of the City of London, as recently as 1866.
Perkin Warbeck—“that little cockatrice of a king,” as Bacon calls
him—was one of the mediæval victims who met his end at Tyburn in
1499. With him went to their death the servants who were found
conniving at his escape from the Tower. No character in the arena of
history at that period has more glamour of romance about it than
that of Warbeck. Even the most unbiassed writers seem to waver as
to whether he was really the Duke of York or an impostor, so readily
did he tell the tale of how he, as the little prince, had escaped from
the Tower, and now as a grown man came to claim his heritage. In
his imprisonment he had twice made bids for freedom, been
captured, and made to read a confession—on the second occasion a
public avowal, standing in Cheapside—after which he was again
confined in the Tower.
It has been alleged by some historians that this was a mere
scheme of Henry vii. to place him in contact with the Earl of
Warwick, the son of George, Duke of Clarence, and heir of the
House of York, who had been kept a prisoner in the Tower until he
was practically bordering on imbecility. The presence of this man
would be a greater temptation to Warbeck to make another attempt
to gain his freedom, and probably it would give the King an
opportunity to rid himself of both these claimants of Royal descent.
The Earl of Warwick was beheaded on Tower Hill, and Warbeck was
hanged at Tyburn. For his end we can again refer to Stow:
“Perken Warbeke—being in holde, by great promises
corrupted his keepers, named Strangwais, Blewet, Astwood, and
long Roger, servants to sir I. Digby, lieutenant of the Tower (as
was affirmed) intended to have slaine their Master, to have set
Perken and the Earle of Warwick at large; which Earle of
Warwick had been kept in prison within the Tower (as yee have
heard) from the first yeere of this king to this 15 yeere out of all
companie of men and sight of beasts, and therefore could not of
himselfe seeke his owne destruction, but by other he was
brought to his death, for being made privie of this enterprise
devised by Perken and his complices, he assented thereunto:
but this devise being revealed Perken and I. a Waters, sometime
Maior of Corke in Ireland, were arraigned and condemned at
Westminster and on the 23 of November drawn to Tiborne,
where Perken read his former confession as before he had done
in Cheape, taking on his death the same to bee true, and so hee
 Iohn a Water asked the King forgivenesse, and tooke their
deaths patiently. And shortly after Walter Blewt and Thomas
Astwood were hanged at Tyborne.”
When Henry viii. was King, Tyburn was yet more busy. The lesser
victims of that monarch’s policy and ambition, for whom the axe and
block were considered too good, were sent out of the Tower to the
loathsome prisons of the day, to meet an ignominious end under the
gallows. A long, sad procession they made, many priests among
them, martyrs for the Catholic faith.
Some of the most pathetic figures were the prior and monks from
the Charter House, whose execution is thus described in the
Contemporary Spanish Chronicle of Henry viii., edited by Martin
Hume.
“The monks of the Charter House refused to take the oath to
Henry as head of the Church (June 1535).
“When the King heard of it he ordered that justice should be
executed upon them, so they were taken two by two on hurdles
and dragged to the gallows (at Tyburn), which is three miles
from London.
“The Prior went alone on a hurdle, and the holy friars
confessed to each other as they went along, the Prior
embracing the crucifix and saying many prayers. When they
were arrived at the gallows they took one of the first and cast a
rope about his neck, and the hangman asked his pardon. Then
all the others placed themselves so that they should see the first
die, the Prior exhorting in Latin and comforting him as he was
led up. The friar turned to the hangman and said, ‘Brother, do
thy duty.’ The rope being placed on the gallows, the hangman
whipped the horse, and the friar remained hanging. Directly,
before he was half-dead, they cut the rope and stripped him:
then they ripped up his belly, plucked out his bowels and his
heart, and cast them into the fire that was burning there, and
afterwards they cut off his head and quartered the body. The
holy friars looked on at all this, praying the whole time, and
when the first execution was finished the Sheriff said to the
other fathers: ‘Ye see what has become of your companion: you
had better repent and you will be forgiven.’ Altogether in one
voice, which was as if the Holy Ghost himself was speaking,
they cried, ‘Sheriff, we are only impatient to join our brother.’
Each one offered himself as first for martyrdom, and they all
died like the first.”
The English Chronicles record the Carthusian martyrdoms in this
year 1535 (20th April, five men; and 19th June, three men) at
Tyburn, and this note appears to refer to the second execution. The
quarters were seared with pitch and set up at the gates on London
Bridge and before the Charter House. The Spaniard says that the
quarters remained incorrupt.
In all the number there are few brighter names than those of the
Earl of Kildare and his four kinsmen, whose capture, imprisonment,
and death (1537) furnished a deplorable tale of Tudor treachery and
vengeance. The earl, who had been involved in one of the numerous
rebellions in Ireland, which were the chronic state of that unhappy
country, had been promised pardon if he repaired to England. The
story, so full of pathos, and of the fear of death, brightened by the
heroism of the younger brother, cannot be better told than in
Hollinshed’s quaint phrases:
“And before his imprisonment was bruted, letters were posted
into Ireland streiatly commanding the deputie upon sight of
them, to apprehend Thomas Fitzgirald his uncles, and to see
them with all speed conuenient shipt into England. Which the
lord deputie did not slacke. For having feasted three of the
gentlemen at Kilmainan immediatelie after their banket (as it is
now and then seene that sweet meate will have sowre sawce)
he caused them to be manacled, and led as prisoners to the
Castell of Dublin; and the other two were so roundlie snatcht up
in villages hard by, as they no sooner felt their owne captivitie
than they had notice of their brethren’s calamitie. The next wind
that served into England, these five brethren were imbarked, to
wit James Fitzgirald, Walter Fitzgirald, Oliver Fitzgirald, John
Fitzgirald, and Richard Fitzgirald. Three of these gentlemen,
James, Walter, and Richard, were knowne to have crossed their
nephue Thomas to their power in his rebellion and therefore
were not occasioned to misdoubt anie danger. But such as in
thos days were enimies to the house, incensed the King so sore
against it, persuading him that he should never conquer Ireland,
as long as anie Giraldine breathed in the countrie: as for making
the pathwaie smooth, he was resolved to lop off as well the
good and sound grapes, as the wild and fruitlesse berries.
Whereby appeareth how dangerous it is to be a rub, when a
King is disposed to sweepe an alleie.
“Thus were the five brethren sailing into England, among
whom Richard Fitzgerald being more bookish than the rest of
his brethren, and one that was much given to the studies of
antiquitie, wailing his inward griefe, with outward mirth
comforted them with cheerefulnesse of countenance, as well as
persuading them that offended to repose affiance in God, and
the King his mercie, and such as were not of that conspiracie to
relie to their innocencie, which they should hold for a more safe
and strong barbican than any rampire of Castell of brasse. Thus
solacing the sillie mourners sometime with smiling, sometime
with singing, sometime with grave and pittie apophthegmes, he
craved of the owner the name of the barke; who having
answered, that it was called the Cow, the gentleman sore
appalled thereat, said: ‘Now, good brethren, I am in utter
despaire of our returne to Ireland, for I beare in mind an old
prophecie, that five earles, brethren, should be carried in a
Cowes bellie to England, and from thense never to returne’.
“Whereat the rest began afresh to howle and lament, which
doubtlesse was pitifull, to behold five valiant gentlemen, that
durst meet in the field five as sturdie champions as could be
picked out in a realme, to be so suddenlie terrified with the bare
name of a woodden cow, or to fear like lions a sillie cocke his
combe, being moved (as commonlie the whole countrie is) with
a vaine and fabulous old wives’ dreame. But what blind
prophesie soever he read, or heard of anie superstitious
beldame touching a cow his bellie, that which he foretold them
was found true. For Thomas Fitzgirald the third of Februarie,
and these five brethren his uncles were drawne, hanged, and
quartered at Tiburne, which was incontinentlie bruted as well in
England and Ireland, as in foren soyles.”
In the midst of his arrangements for divorce the vengeance of
Henry viii. fell upon a witless girl who was known as “The Holy Maid
of Kent.” She had become imbecile from frequent epileptic fits.
Masters, the vicar of Addington, and Dr. Bocking, a Canon of
Canterbury, tutored her to predict, as it suited their own ends, that
Henry viii. would lose his kingdom and die a violent death if he cast
aside Catherine of Arragon, and married Anne Boleyn. The final
scene of this diabolical influence of strength over weakness was that
the girl and her abettors were hanged and beheaded at Tyburn, her
head being set on London Bridge, and those of the men on the City
gates.
LONDON BRIDGE (Showing heads displayed).
From a Print in Magdalene College, Cambridge.
We have little idea of the tremendous religious antagonism of
those days, an antagonism which brought so many poor sufferers to
the gibbet at Tyburn. Indeed, so determined were those in power to
extirpate all remains of Roman Catholicism, that a search was
actually instituted from house to house, and all rosaries and other
objects savouring of Romanism were destroyed.
That a man was priest, open or disavowed, during that fierce
struggle between Henry viii. and the Church which he had
overthrown and despoiled, was sufficient to condemn him to suffer
under Tyburn’s fatal tree:
“The 8 of October last before passed I. Low, I. Adams, and
Richard Dibdale, being before condemned for treason, for being
made Priests by authority of the Bishop of Rome, were drawne
to Tyborne, and there hanged, bowelled, and quartered.
“The 18 of Februarie, Harrington, a seminary priest, was
drawne from Newgate to Tyborne, and there hanged, cut downe
alive, struggled with the hangman, but was bowelled and
quartered.”
Elizabeth, too, found the terrors, which the very name of Tyburn
instilled into the minds of her subjects, useful in maintaining public
order and punishing plotters against her personal welfare. The
gibbet, indeed, became a corrector of manners.
In the middle of the sixteenth century, after the closing of the
monasteries, the peasantry found it difficult to find work on the
countryside, and thus it was that they flocked to London in hundreds
seeking employment, in exactly the same way that thousands of the
poor do to-day. The results, however, are different. In our times we
house them in workhouses, feed them in soup-kitchens, and allow
them to sing in our roads, until they make life hideous. We
encourage them in every way until the street loafer is a curse to
London, and the want of labourers in the country an unceasing cry.
This is our modern way of creating mendicity. Formerly they were
not so foolish, though perhaps too severe. Any one caught begging,
or aimlessly wandering about, was seized, ordered to be whipped,
and sold as a chattel.
Thus it was that hundreds of these poor creatures were shipped
off to the West Indies and the early American colonies. Travelling in
those days was not so luxurious as it is now, and many of them died
on the way. Those who remained behind were even worse treated.
They were often ruthlessly beaten and continually starved; they
were, in fact, brought to such dire distress that they were bought
and sold as mere slaves.
How surprised the loafers, who bury their noses in mother earth
and sleep by the hour on the green grass of Hyde Park, would be if
such drastic measures were applied to them; but surely some happy
medium between the hanging of the sixteenth century and the
encouragement of loafing of the twentieth might be found.
Punishments were altogether more severe in those days, and even
as late as the end of the eighteenth century batches of men,
women, and children were hanged at Tyburn for deeds which would
hardly be punished nowadays, and, any way, would not be reproved
by more than a day or two in prison. In fact, when the last century
dawned, there were no less than two hundred and twenty-three
capital offences.
Even soldiers and sailors, who are still noted for their jollities on
landing from distant climes, were marched to the scaffold in the
“good old times.”
“Sir John Norris and Sir Francis Drake, being returned, as ye
have heard many of their Saylers, and souldiers, shortly after
their landing fell sick, and died of a stanch bred amongst them
on shippe board, other some of them so rudely behaved
themselves about the countrey, about the Court, and elsewhere,
that many men misliked of their doings, and divers of them
being apprehended, on the twenty 7 of August one was hanged
on the end of a signe at an Inne doore in the Towne of
Kingstone-uppon-Thames, for a terror to the rest. The twenty
nine of August, two more were hanged in Smithfield, two at the
Tower Hill, two besides at Westminster, and one at Tiburn”
(Stow).
An Irishman who had shown marked disrespect to the Virgin
Queen received equally short shrift. Bren O’Royrke was arraigned at
Westminster on the 28th October 1591, and found guilty of high
treason on ten different charges. Stow (Annals) records what was
doubtless the most grave of them:
“That the said O’Royrke, a Dremaher aforesaide, caused the
picture of a woman to bee made, setting to her her Majestie’s,
and caused it to be tyed to an horse tayle, and to bee drawne
through the mire in derision of her Majestie. And after caused
his Calliglasses to hew the same in pieces with their axes,
uttering divers traiterous and rebellious words against her
Majestie.”
When before his judges, he refused to plead unless he was
remanded for a week to allow a lawyer to come from Ireland, and to
receive the counsels of his friends. But he was told that if he
maintained his contemptuous attitude judgment must be given, and
he was guilty of his own death; and the interpreter, one John Ly,
expounded his sentence in all its gruesome detail. We learn that
“Uppon Wednesday, being the third of November, Bren O’Royrke was
drawne to Tyborne and there hanged”—leaving out the disgusting
after-business. But before this was done, John Ly and the
Archbishop of Cashel exhorted him to crave God and the Queen’s
forgiveness. “O’Royrke turned upon him and sayde, hee had more
neede to looke to him selfe, and that he was neither here nor there.”
After his death “his heart was holden up by the hangmanne, naming
it to be the arch traytor’s heart, and then did he cast the same into
the fire.”
The execution of Dr. Lopez and his confederates for plotting with
the Spaniards to poison Queen Elizabeth is graphically depicted in
Treason and Plot, by Martin Hume. The execution took place early in
June 1594:
“All England was in a ferment of indignation owing to the
revelations made by Ferreira and Tinoco, and the heat
introduced into the accusations against Philip and his ministers
by the Essex party: and at length, early in June, 1594, the three
poor wretches, bound to hurdles, were dragged up Holborn to
Tyburn, and the penalty of treason was paid by all of them, with
sickening barbarity, exceeding even the usual awful rites. It is
related that one of the three, probably Tinoco who was the
youngest, recovered his feet after the hanging, and, mad with
pain and desperation, attacked the executioner. The crowd
applauding his pluck, broke through the guard and formed a
ring to witness the unequal fight. Two burly ruffians came to the
hangman’s help, but one was immediately felled by a blow from
the prisoner, who kept the other at bay for some time. The half-
strangled creature was at length stunned by a blow upon the
head, and the disembowelling then proceeded. Dr. Lopez in vain
tried to speak to the vast scoffing crowd. Almost incoherent with
agitation he solemnly protested his innocence: mocking laughter
and ribald interruption alone greeted his despairing cry. He was
unfortunately inspired to say that he loved his mistress better
than his Saviour Jesus Christ: and this coming from a Jew so
incensed the multitude that the tumult silenced all else, and Ruy
Lopez went to his death leaving his final secret to be guessed
by others.”
Major Hume was apparently convinced that Lopez was really
innocent of an intention to kill Elizabeth. He was guilty of an
intention to poison Don Antonio, the Portuguese pretender; and he
had also pretended a plot against the Queen in order to get money
out of the Spaniards; so in any case he was rightly punished.
The dreadful tale of horrors might be continued almost
interminably. One willingly passes over in silence many other
sufferers, to include just one more notable scene at Tyburn, when,
under remarkable circumstances, the gallows took a curious part in
reforming fashion in the reign of James i.
Plots grew thick and fast under the first of the Stuarts, as under
his predecessors. The murder of Sir Thomas Overbury differed from
most, inasmuch as it was designed to satisfy private vengeance
rather than an intrigue against the State. Overbury had done all in
his power to prevent the Earl of Somerset from marrying the
Countess of Essex, and had thus won her hatred. She poisoned the
mind of the Earl against his friend, and he, in turn, influenced the
King. So when Sir Thomas refused to be sent as ambassador to
Brussels, James I. was easily persuaded to imprison him in the
Tower. There Overbury languished and died.
The Earl and Countess of Somerset were brought to trial, with
their four accomplices, for encompassing his death. The principals
escaped, but their accessories were condemned, and one Weston
and Mrs. Turner were hanged at Tyburn in 1615.
This murder was committed, if the evidence is to be believed, with
the utmost perseverance. Witchcraft, which was believed in firmly at
that time, was attributed to Mrs. Turner. It was alleged in the trial
that seven forms of poison were given by her to Sir Thomas
Overbury. Arsenic was mixed with his salt; when he asked to have
some “pig” for dinner, she put into it lapis cortilus, and cantharides
was added to the sauce instead of pepper.
The execution of Mrs. Turner excited immense interest. She had
made herself famous in the fashionable world as the inventor of a
yellow starch. In allusion to this circumstance, Lord Chief-Justice
Coke—who had already addressed her in sufficiently contumelious
terms, telling her categorically that she had been guilty of the seven
deadly sins—declared that as she was the inventor of yellow
starched ruffs and cuffs, he hoped that she would be the last by
whom they would be worn. Accordingly, he gave strict orders that
she should be hanged in the very uncomfortable attire she had made
so fashionable.
This amusing addition to the sentence was strictly carried out. The
fair demon Mrs. Turner, on the day of her execution, came to the
scaffold arrayed as if for some festive occasion, with her face
mightily rouged, and a wide ruff, stiffened with yellow starch, around
her neck. Numerous persons of quality, ladies as well as gentlemen,
went in their coaches to Tyburn to see the last of her. The yellow ruff
was never worn from that day.
Yellow starch had rendered Society stiff and uncomfortable, and
Society was only too pleased to discard its use when the originator
of the fashion came to this ignominious end.
Programming Microsoft SQL Server 2000 with Microsoft Visual Basic NET 1st edition Edition Rick Dobson
CHAPTER IX
BENEATH THE TRIPLE TREE
Exactly the date at which the dreaded instrument at Tyburn assumed
the form of the “Triple Tree” cannot be told. As has already been
said, there is reason to believe that a permanent structure—“the
common gallows” of the time—was set up in the district known as
Tyburn in the closing years of the fourteenth century; and that the
site was a little more eastward, beyond the present area of the Park,
than the later place of execution.
What particular plan the earlier structure took can only be
surmised. One is inclined to think that the gallows, like other and
better inventions of civilisation, underwent stages of development;
that from the branch of the growing elm the old gibbet, with its
single beam and angle bar, was first devised, and that the two
upright posts with the crossbeam followed. In all probability the
gallows was then built high, so that the victim who paid the last
penalty of the law swung clear above the heads of the crowd
gathered to witness the execution.
No doubt this gruesome spectacle was intended to strike awe into
the hearts of the beholders. But human nature, being a thing
perverse, is not always understood. Its most disastrous result on the
manners of the time was rather to glorify crime and criminal. A
fitting end at Tyburn gave distinction to many a poor rogue who
otherwise would have left the world unhonoured and forgotten. Four
centuries of Tyburn’s rough justice did less for the suppression of
crime than more enlightened and humane efforts have done in the
course of comparatively few years.
The triangular plan had already been adopted in Shakespeare’s
time, and probably long before, as references to it imply a common
knowledge. In Love’s Labour Lost, one of his earlier plays, he has
Biron saying:
“Thou makest the triumviry the corner cap of Society,
The shape of Love’s Tyburn that hangs up simplicity.”
In an old quarto of 1589 occurs the passage:2
“Then let me be put on Tyburn, that hath but three quarters.”
Only thirteen years earlier, Gascoigne, strangely enough, speaks of
“Tyborne Cross.”
The gallows where so many highwaymen of the late seventeenth
and eighteenth centuries were, in the phrase of the day, “turned off,”
is shown in the drawings of Hogarth and a host of others, as well as
in maps of contemporary date. At each of the three corners of a
triangle a stout upright post was set in the ground. In some cases
two cross beams are seen fastened to the tops of these posts, in
others three, forming a sort of triangular enclosure. It was quite low,
rising not more than twelve feet from the ground, and giving just
enough room for the malefactor’s cart to pass beneath.
So thorough have been the measures taken to sweep Tyburn and
all its associations out of the Metropolis, since the fashionable area
of the town extended westward, that the particular spot on which
stood the “Triple Tree” is also left uncertain. It can, however, be
pretty closely approximated. It was never actually within the Royal
Park, but was just beyond its northern boundary, standing back from
the high road to Uxbridge, about a hundred yards west of the Marble
Arch. A house near the corner of Connaught Square is believed to be
built on the actual site of Tyburn gallows, which originally stood on
the rise, where the ground was open to the Park. The “Triple Tree”
was, however, moved to the triangular space now forming the
entrance to the Edgware Road, early in the eighteenth century.
I do not know if ghosts are ever seen about Connaught Square. I
can find no trace of spectral visitors disturbing the well-to-do people
who pass their lives agreeably in this now fashionable quarter. But if
there be any truth in psychical phenomena,—if, indeed, it be a fact
that the unsubstantial shades of men love in the stillness of the
night to revisit the scenes where they met a violent end,—surely
they should marshal here, not singly nor in groups, but in whole
battalions, creeping between the motor broughams which noiselessly
come and go, or the busier traffic which runs along by Park Lane
and Oxford Street.
When King Charles ii. came back “to his own” in 1660, the
triangular gallows at Tyburn was evidently a structure of respectable
antiquity. Already it was known to all the populace by its nickname
of the “Triple Tree,” which it kept for more than a century. Death was
a common state at Tyburn; it was, however, reserved for this
strange, easy-going, good-natured voluptuary to hang men who
were already dead there.
Amid all the horrible scenes enacted at Tyburn, none are more
ghastly than the stupid, purposeless indignities wreaked by Charles
and his licentious Parliament, a year after his restoration, on the
bodies of the regicides, whom death had withdrawn from his active
vengeance. The story is briefly told in the little weekly sheet which
served the purpose of a newspaper in those days:3
“This day, Jan. 30, (we need say no more but name the day
of the Moneth) was doubly observed, not onely by a Solemn
Fast, Sermons and Prayers at every Parish Church, for the
precious of our late pious Sovereign King Charles the First of
ever glorious Memory; but also by publick dragging those odious
carcasses of Oliver Cromwel, Henry Ireton, and John Bradshaw,
to Tyburne. On Monday night, Cromwel and Ireton were drawn
to Holborn from Westminster, where they were digged up on
Saturday last, and the next morning Bradshaw. To-day they
were drawn upon Sledges to Tyburne; all the way (as before
from Westminster) the universal out-cry and curses of the
people went along with them. When these three carcasses were
at Tyburn, they were pull’d out of their Coffins, and hang’d at
the several angles of that Triple Tree, where they hung till the
Sun was set; after which, they were taken down, their heads
cut off, and their loathsome trunks thrown into a deep hole
under the gallows.”
So the mutilated corpses of Cromwell, of Ireton, his statesmanlike
general and brother-in-law, and Bradshaw, the president at the trial
of Charles I., drawn in their shrouds from their tombs in the quiet of
Henry the Seventh’s Chapel at the Abbey, gibbeted until sundown as
objects for the ridicule and derision of a demoralised mob, and then
decapitated, were flung “into a deep hole under the gallows.” And
there they may remain until this day. Who knows? The cemetery for
the unnamed dead, which extended from the fatal tree towards the
Marble Arch, was dug up when hangings ceased on this spot, and it
is probable that the unrecognised bones of Cromwell, Ireton, and
Bradshaw were in that process swept into oblivion. The heads had
been spiked on poles in front of Westminster Hall.
The grave has gone; the remains have perished. No vestige of the
honoured dead survives; in spite of Cromwell’s gorgeous funeral, his
remains are not even located.
That is just where history awakens us from musings to the
unexpected reality of things. Of all the vanities of life, assuredly the
love of funeral pomp and show is the most vain; and that strange
vanity Cromwell—hard, narrow, cold though he might be—seems to
have shared to an extravagant degree. He had arranged for himself
a gorgeous funeral, and one glances with amazement at the
documents of the year 1658, when the burial of the Protector had to
be put off from 9th November to 23rd November (he died on 3rd
September) as the elaborate arrangements for the event could not
be completed by the earlier date. During the short Protectorate of
Richard Cromwell, sums were voted to the amount of £18,600 for
expenses and mourning, and so many claims were brought forward
for settlement, that nearly a year later, on 4th July 1659, a
Committee was appointed to inquire into the money still owing. They
reported that £19,303, 0s. 11d. was the properly audited account,
and this merely for baize, cloth, velvet, and fringes. This sum
represents about £80,000 of our present money; so that an estimate
of £150,000 can hardly be too large for the expenses of Oliver
Cromwell’s funeral.
Apart from these outrages on the dead, Tyburn witnessed the final
scenes in the lives of two military officers, Hacker and Axtele, who
had guarded Charles I., and of at least three of the judges, Okey,
Barkstead, and Corbet, who had pronounced sentence upon him.
Others of the regicides were done to death at Charing Cross, with all
the barbarous additions of drawing, decapitating, and quartering. It
seems singular that these revolting scenes, relics of an earlier and,
one would have thought, a more brutal age, occasioned no
condemnation from the finer spirits of the day. Old Pepys, amiable
and gossipy on whatever subject passed under his notice, was only
led by the executions to a pious and somewhat inapposite reflection,
“Wonderful are the ways of Providence!” And the courtly Evelyn, who
had the grace to secretly disapprove of them, contents himself with
writing in his Diary:
“I saw not the executions, but met their quarters, mangled,
cut, and reeking, as they were brought from the gallows on a
hurdle.”
In 1908 one of the former victims of Tyburn was canonised, a fact
that brings the past and to-day into close proximity. The history of
Oliver Plunket—a name well known in Ireland—is both romantic and
sad.
Celebrated as a high-minded and high-living Archbishop of
Armagh, Oliver Plunket ended his days at Tyburn in 1681, a victim of
the “Popish Plot.” After spending more than two and a half years in
dungeons, first in Dublin and then in Newgate, he was hanged,
drawn, and quartered. His body was buried in St. Giles’s-in-the-
Fields by Father Corker, who had been his companion in Newgate.
His head was sent to Rome to Cardinal Howard, and brought back to
Ireland in 1722, and is preserved in the Convent of Drogheda, which
was founded by his great-niece. In fact, all honour was paid to his
remains as relics. When Father Corker buried the body he cut off the
arms, one of which was long preserved in Herefordshire, and one in
the Franciscan Convent at Taunton. This priest afterwards sent the
body to Germany, but when the English monks were expelled from
that country in 1803, Plunket’s body was brought back to England,
and buried at St. Gregory’s Monastery, Downside, Bath.
Truly a tragic history, and one fraught with so much valour and
strength of character, that the Irish must feel proud of the dignity of
canonisation now bestowed on their hero.
The Rye House Plot against the lives of Charles II. and his brother,
then James, Duke of York, was the means of another distinguished
man, Sir Thomas Armstrong, suffering an ignominious end on
Tyburn’s fatal tree. Later, a further victim was claimed in Elizabeth
Gaunt, who had sheltered one of the conspirators. After the failure
of the plot Armstrong fled to Holland, but was seized at Leyden in
1684, and conveyed to England, swearing his innocence. He was
taken before Judge Jefferies, and when again he insisted on his
innocence, protested against the perjured evidence, and asked for
nothing but the free course of the law, Jefferies said “he should have
it to the full”; and so ordered his execution within six days. Like a
common malefactor, the knight was dragged through the streets to
Tyburn on a hurdle, and was there hanged and quartered. Bishop
Burnett says that one of the quarters was sent to Stafford, which
place Armstrong represented in Parliament.
The execution of Elizabeth Gaunt was a still more shameless affair,
and bears witness to the degeneracy and brutal inhumanity of the
times. She was then an old woman, well known for her good works
in helping the afflicted and visiting the prisoners. Among those who
took part in the Rye House Plot was one James Burton, for whose
apprehension a reward was offered. Chance led him in the way of
Elizabeth Gaunt, who assisted him to the utmost of her power, and
sent him in a boat to Gravesend, whence he escaped to Amsterdam.
He was supplied with a large sum of money by his benefactress. On
Monmouth’s landing in England to raise the standard of rebellion in
1685, Burton came among his following, fought in the hopeless fight
at Sedgemoor, and after the rout fled to London, where he took
refuge in the house of John Fernley, a barber in Whitechapel.
Fernley was poor, and his creditors were troubling him. Yet,
though he knew the Government were offering £100 for Burton, he
would not betray him. The wretch, whom he was thus sheltering,
had no such scruples. Finding that James II. was dealing out
punishment more severely to those who sheltered rebels, than to
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
Ad

Recommended

Programming Microsoft SQL Server 2000 with Microsoft Visual Basic NET 1st edi...
Programming Microsoft SQL Server 2000 with Microsoft Visual Basic NET 1st edi...
paboyjonesh32
 
Programming Microsoft SQL Server 2000 with Microsoft Visual Basic NET 1st edi...
Programming Microsoft SQL Server 2000 with Microsoft Visual Basic NET 1st edi...
waisfarjam
 
Programming Microsoft SQL Server 2000 with Microsoft Visual Basic NET 1st edi...
Programming Microsoft SQL Server 2000 with Microsoft Visual Basic NET 1st edi...
samimylahji
 
Programming Microsoft Sql Server 2000 With Microsoft Visual Basic Net 1st Edi...
Programming Microsoft Sql Server 2000 With Microsoft Visual Basic Net 1st Edi...
keeverfelmor
 
Database Programming With Visual Basic Net And Adonet Tips Tutorials And Code...
Database Programming With Visual Basic Net And Adonet Tips Tutorials And Code...
keeverfelmor
 
Programming Visual Basic 2008 Tim Patrick
Programming Visual Basic 2008 Tim Patrick
mogilciprawq
 
Microsoft Visual Basic 2008 Express Edition Build a Program Now Pelland
Microsoft Visual Basic 2008 Express Edition Build a Program Now Pelland
zekkaneyaah86
 
Visual Studio.NET
Visual Studio.NET
salonityagi
 
Visual studio.net
Visual studio.net
Satish Verma
 
Microsoft SQL Server - SQL Server + Visual Studio Presentation
Microsoft SQL Server - SQL Server + Visual Studio Presentation
Microsoft Private Cloud
 
235042632 super-shop-ee
235042632 super-shop-ee
homeworkping3
 
Foundry Management System Desktop Application
Foundry Management System Desktop Application
Dharmendra Sid
 
.net training | learn .net | Microsoft dot net Course | Microsoft dot net onl...
.net training | learn .net | Microsoft dot net Course | Microsoft dot net onl...
Nancy Thomas
 
ASPNET for PHP Developers
ASPNET for PHP Developers
Wes Yanaga
 
Vb and asp.net
Vb and asp.net
sanjay joshi
 
Professional Adonet 2 Programming With Sql Server 2005 Oracle And Mysql Walla...
Professional Adonet 2 Programming With Sql Server 2005 Oracle And Mysql Walla...
asnermaurihg
 
Chapter 01
Chapter 01
llmeade
 
Vb.net class notes
Vb.net class notes
priyadharshini murugan
 
Advanced Programming Using Visual Basic. NET
Advanced Programming Using Visual Basic. NET
Tony Lisko
 
Developer s Guide to Microsoft Enterprise Library Visual Basic Edition Patter...
Developer s Guide to Microsoft Enterprise Library Visual Basic Edition Patter...
ambahoraci
 
Visual Studio 2008 & .Net 3.5
Visual Studio 2008 & .Net 3.5
Hadi Karimi
 
ASP NET Professional Projects 1st Edition Hersh Bhasin
ASP NET Professional Projects 1st Edition Hersh Bhasin
tevdtridev
 
Vb & asp .net
Vb & asp .net
Lakhmichand institute of technology
 
Chapter 1 — Introduction to Visual Basic 2010 Programming
Chapter 1 — Introduction to Visual Basic 2010 Programming
francopw
 
Cursos sql server .net visual basic octubre 2010
Cursos sql server .net visual basic octubre 2010
Servicios Educativos Softrain C.A.
 
Mcts Selfpaced Training Kit Exam 70516 Accessing Data With Microsoft Net Fram...
Mcts Selfpaced Training Kit Exam 70516 Accessing Data With Microsoft Net Fram...
khlifrushit84
 
ASP NET Professional Projects 1st Edition Hersh Bhasin
ASP NET Professional Projects 1st Edition Hersh Bhasin
resulljuz
 
.NET presentation
.NET presentation
Himanshu Bhalla
 
June 2025 Progress Update With Board Call_In process.pptx
June 2025 Progress Update With Board Call_In process.pptx
International Society of Service Innovation Professionals
 
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
 

More Related Content

Similar to Programming Microsoft SQL Server 2000 with Microsoft Visual Basic NET 1st edition Edition Rick Dobson (20)

Visual studio.net
Visual studio.net
Satish Verma
 
Microsoft SQL Server - SQL Server + Visual Studio Presentation
Microsoft SQL Server - SQL Server + Visual Studio Presentation
Microsoft Private Cloud
 
235042632 super-shop-ee
235042632 super-shop-ee
homeworkping3
 
Foundry Management System Desktop Application
Foundry Management System Desktop Application
Dharmendra Sid
 
.net training | learn .net | Microsoft dot net Course | Microsoft dot net onl...
.net training | learn .net | Microsoft dot net Course | Microsoft dot net onl...
Nancy Thomas
 
ASPNET for PHP Developers
ASPNET for PHP Developers
Wes Yanaga
 
Vb and asp.net
Vb and asp.net
sanjay joshi
 
Professional Adonet 2 Programming With Sql Server 2005 Oracle And Mysql Walla...
Professional Adonet 2 Programming With Sql Server 2005 Oracle And Mysql Walla...
asnermaurihg
 
Chapter 01
Chapter 01
llmeade
 
Vb.net class notes
Vb.net class notes
priyadharshini murugan
 
Advanced Programming Using Visual Basic. NET
Advanced Programming Using Visual Basic. NET
Tony Lisko
 
Developer s Guide to Microsoft Enterprise Library Visual Basic Edition Patter...
Developer s Guide to Microsoft Enterprise Library Visual Basic Edition Patter...
ambahoraci
 
Visual Studio 2008 & .Net 3.5
Visual Studio 2008 & .Net 3.5
Hadi Karimi
 
ASP NET Professional Projects 1st Edition Hersh Bhasin
ASP NET Professional Projects 1st Edition Hersh Bhasin
tevdtridev
 
Vb & asp .net
Vb & asp .net
Lakhmichand institute of technology
 
Chapter 1 — Introduction to Visual Basic 2010 Programming
Chapter 1 — Introduction to Visual Basic 2010 Programming
francopw
 
Cursos sql server .net visual basic octubre 2010
Cursos sql server .net visual basic octubre 2010
Servicios Educativos Softrain C.A.
 
Mcts Selfpaced Training Kit Exam 70516 Accessing Data With Microsoft Net Fram...
Mcts Selfpaced Training Kit Exam 70516 Accessing Data With Microsoft Net Fram...
khlifrushit84
 
ASP NET Professional Projects 1st Edition Hersh Bhasin
ASP NET Professional Projects 1st Edition Hersh Bhasin
resulljuz
 
.NET presentation
.NET presentation
Himanshu Bhalla
 
Microsoft SQL Server - SQL Server + Visual Studio Presentation
Microsoft SQL Server - SQL Server + Visual Studio Presentation
Microsoft Private Cloud
 
235042632 super-shop-ee
235042632 super-shop-ee
homeworkping3
 
Foundry Management System Desktop Application
Foundry Management System Desktop Application
Dharmendra Sid
 
.net training | learn .net | Microsoft dot net Course | Microsoft dot net onl...
.net training | learn .net | Microsoft dot net Course | Microsoft dot net onl...
Nancy Thomas
 
ASPNET for PHP Developers
ASPNET for PHP Developers
Wes Yanaga
 
Professional Adonet 2 Programming With Sql Server 2005 Oracle And Mysql Walla...
Professional Adonet 2 Programming With Sql Server 2005 Oracle And Mysql Walla...
asnermaurihg
 
Chapter 01
Chapter 01
llmeade
 
Advanced Programming Using Visual Basic. NET
Advanced Programming Using Visual Basic. NET
Tony Lisko
 
Developer s Guide to Microsoft Enterprise Library Visual Basic Edition Patter...
Developer s Guide to Microsoft Enterprise Library Visual Basic Edition Patter...
ambahoraci
 
Visual Studio 2008 & .Net 3.5
Visual Studio 2008 & .Net 3.5
Hadi Karimi
 
ASP NET Professional Projects 1st Edition Hersh Bhasin
ASP NET Professional Projects 1st Edition Hersh Bhasin
tevdtridev
 
Chapter 1 — Introduction to Visual Basic 2010 Programming
Chapter 1 — Introduction to Visual Basic 2010 Programming
francopw
 
Mcts Selfpaced Training Kit Exam 70516 Accessing Data With Microsoft Net Fram...
Mcts Selfpaced Training Kit Exam 70516 Accessing Data With Microsoft Net Fram...
khlifrushit84
 
ASP NET Professional Projects 1st Edition Hersh Bhasin
ASP NET Professional Projects 1st Edition Hersh Bhasin
resulljuz
 

Recently uploaded (20)

June 2025 Progress Update With Board Call_In process.pptx
June 2025 Progress Update With Board Call_In process.pptx
International Society of Service Innovation Professionals
 
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
 
2025 June Year 9 Presentation: Subject selection.pptx
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
 
Learning Styles Inventory for Senior High School Students
Learning Styles Inventory for Senior High School Students
Thelma Villaflores
 
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
 
INDUCTIVE EFFECT slide for first prof pharamacy students
INDUCTIVE EFFECT slide for first prof pharamacy students
SHABNAM FAIZ
 
NSUMD_M1 Library Orientation_June 11, 2025.pptx
NSUMD_M1 Library Orientation_June 11, 2025.pptx
Julie Sarpy
 
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
ErlizaRosete
 
Gladiolous Cultivation practices by AKL.pdf
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
 
Wage and Salary Computation.ppt.......,x
Wage and Salary Computation.ppt.......,x
JosalitoPalacio
 
Tanja Vujicic - PISA for Schools contact Info
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD
 
How payment terms are configured in Odoo 18
How payment terms are configured in Odoo 18
Celine George
 
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
KaryanaTantri21
 
CRYPTO TRADING COURSE BY FINANCEWORLD.IO
CRYPTO TRADING COURSE BY FINANCEWORLD.IO
AndrewBorisenko3
 
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
parmarjuli1412
 
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
 
Values Education 10 Quarter 1 Module .pptx
Values Education 10 Quarter 1 Module .pptx
JBPafin
 
How to Manage Different Customer Addresses in Odoo 18 Accounting
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
 
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
Kweku Zurek
 
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
SCHIZOPHRENIA OTHER PSYCHOTIC DISORDER LIKE Persistent delusion/Capgras syndr...
parmarjuli1412
 
2025 June Year 9 Presentation: Subject selection.pptx
2025 June Year 9 Presentation: Subject selection.pptx
mansk2
 
Learning Styles Inventory for Senior High School Students
Learning Styles Inventory for Senior High School Students
Thelma Villaflores
 
How to use search fetch method in Odoo 18
How to use search fetch method in Odoo 18
Celine George
 
INDUCTIVE EFFECT slide for first prof pharamacy students
INDUCTIVE EFFECT slide for first prof pharamacy students
SHABNAM FAIZ
 
NSUMD_M1 Library Orientation_June 11, 2025.pptx
NSUMD_M1 Library Orientation_June 11, 2025.pptx
Julie Sarpy
 
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
M&A5 Q1 1 differentiate evolving early Philippine conventional and contempora...
ErlizaRosete
 
Gladiolous Cultivation practices by AKL.pdf
Gladiolous Cultivation practices by AKL.pdf
kushallamichhame
 
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
GREAT QUIZ EXCHANGE 2025 - GENERAL QUIZ.pptx
Ronisha Das
 
Wage and Salary Computation.ppt.......,x
Wage and Salary Computation.ppt.......,x
JosalitoPalacio
 
Tanja Vujicic - PISA for Schools contact Info
Tanja Vujicic - PISA for Schools contact Info
EduSkills OECD
 
How payment terms are configured in Odoo 18
How payment terms are configured in Odoo 18
Celine George
 
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
Romanticism in Love and Sacrifice An Analysis of Oscar Wilde’s The Nightingal...
KaryanaTantri21
 
CRYPTO TRADING COURSE BY FINANCEWORLD.IO
CRYPTO TRADING COURSE BY FINANCEWORLD.IO
AndrewBorisenko3
 
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
OBSESSIVE COMPULSIVE DISORDER.pptx IN 5TH SEMESTER B.SC NURSING, 2ND YEAR GNM...
parmarjuli1412
 
How to Customize Quotation Layouts in Odoo 18
How to Customize Quotation Layouts in Odoo 18
Celine George
 
Values Education 10 Quarter 1 Module .pptx
Values Education 10 Quarter 1 Module .pptx
JBPafin
 
How to Manage Different Customer Addresses in Odoo 18 Accounting
How to Manage Different Customer Addresses in Odoo 18 Accounting
Celine George
 
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
University of Ghana Cracks Down on Misconduct: Over 100 Students Sanctioned
Kweku Zurek
 
Ad

Programming Microsoft SQL Server 2000 with Microsoft Visual Basic NET 1st edition Edition Rick Dobson

  • 1. Programming Microsoft SQL Server 2000 with Microsoft Visual Basic NET 1st edition Edition Rick Dobson download pdf https://ebookultra.com/download/programming-microsoft-sql- server-2000-with-microsoft-visual-basic-net-1st-edition-edition-rick- dobson/ Visit ebookultra.com today to download the complete set of ebook or textbook!
  • 2. Here are some recommended products for you. Click the link to download, or explore more at ebookultra.com Programming Microsoft Visual Basic NET Version 2003 Francesco Balena https://ebookultra.com/download/programming-microsoft-visual-basic- net-version-2003-francesco-balena/ Programming with Microsoft Visual Basic 2012 6th Edition Diane Zak https://ebookultra.com/download/programming-with-microsoft-visual- basic-2012-6th-edition-diane-zak/ Microsoft SQL Server 2012 T SQL 1st Edition Tom Coffing https://ebookultra.com/download/microsoft-sql-server-2012-t-sql-1st- edition-tom-coffing/ Sams Teach Yourself Microsoft SQL Server 2000 in 21 Days 2nd Edition Richard Waymire https://ebookultra.com/download/sams-teach-yourself-microsoft-sql- server-2000-in-21-days-2nd-edition-richard-waymire/
  • 3. Microsoft SQL Server 2008 Administration with Windows PowerShell 1st Edition Ananthakumar Muthusamy https://ebookultra.com/download/microsoft-sql- server-2008-administration-with-windows-powershell-1st-edition- ananthakumar-muthusamy/ 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/ Inside Microsoft SQL Server 2008 T SQL Querying 1st Edition Itzik Ben-Gan https://ebookultra.com/download/inside-microsoft-sql- server-2008-t-sql-querying-1st-edition-itzik-ben-gan/ Mastering Microsoft Visual Basic 2008 Evangelos Petroutsos https://ebookultra.com/download/mastering-microsoft-visual- basic-2008-evangelos-petroutsos/ The Microsoft Data Warehouse Toolkit With SQL Server 2008 R2 and the Microsoft Business Intelligence Toolset 2nd edition Edition Kimball https://ebookultra.com/download/the-microsoft-data-warehouse-toolkit- with-sql-server-2008-r2-and-the-microsoft-business-intelligence- toolset-2nd-edition-edition-kimball/
  • 5. Programming Microsoft SQL Server 2000 with Microsoft Visual Basic NET 1st edition Edition Rick Dobson Digital Instant Download Author(s): Rick Dobson, Paul Cornell ISBN(s): 9780735615359, 0735615357 Edition: 1st edition File Details: PDF, 10.60 MB Year: 2002 Language: english
  • 7. Programming Microsoft® SQL Server™ 2000 with Microsoft Visual Basic® .NET Foreword Acknowledgments Introduction Who’s the Book For? What’s Special About This Book? How’s the Book Organized? System Requirem ents Sample Files Support 1. Getting Started with Visual Basic .NET for SQL Server 2000 Visual Studio .NET, the Visual Basic .NET IDE An Overview of ADO.NET Capabilities A Starter ADO.NET Sam ple Using Query Analyzer 2. Tables and Data Types Chapter Resources Data Types for Tables Scripting Tables 3. Program m ing Data Access with T-SQL I ntroduction to Data Access with T-SQL Aggregating and Grouping Rows Processing Dates Joins and Subqueries 4. Program m ing Views and Stored Procedures I ntroduction to Views Creating and Using Views Views for Remote and Heterogeneous Sources I ntroduction to Stored Procedures Creating and Using Stored Procedures Processing Stored Procedure Outputs I nserting, Updating, and Deleting Rows Programm ing Conditional Result Sets 5. Program m ing User-Defined Functions and Triggers I ntroduction to User-Defined Functions Creating and I nvoking Scalar UDFs Creating and I nvoking Table-Valued UDFs I ntroduction to Triggers Creating and Managing Triggers 6. SQL Server 2000 XML Functionality Overview of XML Support XML Formats and Schemas URL Access to SQL Server Template Access to SQL Server 7. SQL Server 2000 Security
  • 8. Overview of SQL Server Security I ntroduction to Special Security I ssues Samples for Logins and Users Samples for Assigning Perm issions 8. Overview of the .NET Fram ework An I ntroduction to the .NET Fram ework An Overview of ASP.NET XML Web Services 9. Creating Windows Applications Getting Started with Windows Forms Creating and Using Class References I nheriting Classes Programm ing Events Exception Handling for Run-Tim e Errors 10. Programm ing Windows Solutions with ADO.NET An Overview of ADO.NET Objects Making Connections Working with Command and DataReader Objects DataAdapters , Data Sets, Forms, and Form Controls Modifying, Inserting, and Deleting Rows 11. Programm ing ASP.NET Solutions Review of ASP.NET Design I ssues Creating and Running ASP.NET Solutions Session State Management Data on Web Pages Validating the Data on a Web Page 12. Managing XML with Visual Basic .NET SQL Server Web Releases Overview of XML Technologies Generating XML Documents with the .NET Framework Dynam ically Setting an XML Result Set The I nterplay Between XML and Data Sets Creating HTML Pages with XSLT 13. Creating Solutions with XML Web Services Overview of Web services A Web Service to Return a Com puted Result A Web Service to Return Values from Tables The SQL Server 2000 Web Services Toolkit More on Populating Controls with Web Services About the Author
  • 9. Forew ord During m y five years at Microsoft, I ’ve been helping developers understand technologies such as Microsoft Visual Studio, Microsoft SQL Server, and Microsoft Office Developer. During the past two years, I have worked on the Microsoft Office XP Visual Basic Language Reference, and now, the MSDN Office Developer Center. I n the m onthly column on MSDN, Office Talk, I have written articles to help Office developers understand the .NET platform and how it affects their current and future development efforts. As I write this foreword to Rick Dobson’s book on programm ing Microsoft SQL Server solutions with Microsoft Visual Basic .NET, I think back to my own experiences developing software applications with Visual Basic. My first experience with Visual Basic was learning the language using version 3.0. I rem ember picking up m y first Visual Basic beginner’s book and being excited as I developed my first few “Hello, World” applications. I couldn’t believe how quick and easy it was to develop software applications that operated sim ilarly to other popular shareware program s of that tim e. However, during that time I also discovered som e of the shortcom ings of Visual Basic as an enterprise-level development language. It was then that I turned my attention to C+ + . I rem ember being very frustrated at trying to learn the language, trying to understand concepts such as pointers, m em ory allocation, and true object-oriented programm ing. I took classes on C+ + at the local university, but I got even m ore frustrated having to wait m onths until I was taught how to create the sim plest Microsoft Windows form, something I did in just a couple of m inutes using Visual Basic. I n my frustration, I gave up trying to learn C+ + and have been using Visual Basic to develop software applications ever since. As each new version of Visual Basic was released, I readied myself to learn new software developm ent technologies. First it was ActiveX control development. Then it was calling the Windows API . Next it was DHTML Applications. Then it was database developm ent using Microsoft SQL Server. I t always seem ed as though I had to learn a new language and a new developm ent paradigm for every new technology that came along. I kept thinking that there had to be an easier and more unified approach. Well, now we’ve reached the advent of the Microsoft .NET platform , and with it, a revolution in the Visual Basic language, Microsoft Visual Basic .NET. I believe that Visual Basic .NET will provide software developers with new opportunities for quickly and easily designing integrated software applications that connect businesses and individuals anytime, anywhere, and on virtually any software device. With advances in the Visual Basic .NET language, Visual Basic .NET developers will finally be on a par with their C+ + and C# counterparts, participating in many high-end developm ent projects. With Visual Studio .NET features such as cross-language debugging, along with Visual Basic .NET conformance to the com mon type system and the com mon language runtime, organizations can drive down their development costs by tapping into the wide range of skills that Visual Basic .NET developers now possess. True object-oriented programm ing is now available in Visual Basic .NET, including features such as inheritance and m ethod overloading. I t’s now simpler to call the Windows API by using the .NET Fram ework Class Libraries. Web application developm ent is now as easy as developing Windows form s–based applications. Database application developm ent is made easier by uniting disparate data object libraries such as DAO, RDO, OLE DB, and ADO under ADO.NET, utilizing the power of XML to consume and transm it relational data over com puter networks. And a new technology, XML Web services, allows Visual Basic .NET developers to host their software applications’ logic over the Web. Additionally, a big issue for
  • 10. software developers today is that of software application deploym ent and versioning. I f you don’t agree, just ask any software developer about “DLL hell,” and you’re bound to get an earful. For m any .NET applications, the .NET platform features “copy and paste” or XCOPY deploym ent. (Users simply copy your application files from the source media to any single directory and run the application.) And because .NET no longer relies on the registry, virtually all DLL compatibility issues go away. With this book, Rick aim s to give you the skills you need to program SQL Server solutions with Visual Basic .NET. I know you will find Rick’s book helpful. Rick brings his experience to bear from three previous books: Programm ing Microsoft Access Version 2002 (Microsoft Press, 2001), Program m ing Microsoft Access 2000 (Microsoft Press, 1999), and Professional SQL Server Development with Access 2000 (Wrox Press I nc., 2000). Rick also brings his experience of leading a successful nationwide sem inar tour. More important, I know you will enjoy Rick’s book because of his deep interest in Visual Basic .NET and SQL Server, and in helping you, the professional developer, understand and apply these technologies in your daily software application developm ent projects. Paul Cornell MSDN Office Developer Center http: / / msdn.m icrosoft.com/ officeMicrosoft Corporation February 2002
  • 11. Acknow ledgm ents This section offers me a chance to say thank you to all who helped make this book possible. I wish to offer special recognition to five support resources. First, the folks at Microsoft Press have been fantastic. Dave Clark, an acquisitions editor, selected me to write the book just months after I completed another book for Microsoft Press. Dick Brown, m y project editor, staunchly stood up for his perception of how to m ake the book’s organization and content clear to you without being petty or boring to m e. Dick also lightened my load substantially by showing a real knack for editing my text without distorting the original intent. When Dick was especially busy, he handed off some of his load to Jean Ross, who also did an adm irable job. Others at Microsoft Press who contributed to my well- being in one way or another include Aaron Lavin and Anne Hamilton. Second, I had excellent working relations with several professionals within Microsoft. Paul Cornell, a widely known technical editor at Microsoft, was kind enough to share his insights on how to present .NET concepts compellingly. I want to thank Paul especially for writing the Foreword to this book. Karthik Ravindran served as the MSXML Beta Product Lead Engineer at Microsoft Product Support Services during the time that I wrote this book. He provided valuable technical content about the SQL Server 2000 Web releases. Other Microsoft representatives providing moral and technical support for this book include Richard Waym ire and Jan Shanahan. Third, I want to express m y appreciation to the many readers, sem inar attendees, and site visitors who took the time to tell m e what I did right or wrong for them, and also to those who shared their technical support questions with me. It is through this kind of feedback that I am able to know what’s important to practicing developers. I encourage you to visit my m ain Web site (http: / / www.programm ingmsaccess.com) and sign the guest book. The entry form includes space for you to leave your evaluation of this book or your question about a topic covered in the book. I prom ise to do my best to reply personally. I n any event, I definitely read all m essages and use them so that I can serve you better with future editions of this, and other, books. Fourth, I want to tell the world how grateful I am to my wife, Virginia. Without Virginia’s warm support, love, and care, this book would be less professional. She relieves m e of nearly every responsibility around the house when I undertake a book project. In addition, she offers strategic advice on the issues to address and their style of coverage. When I run out of tim e, she even pitches in with the proofreading. Fifth, it is important for me to give praise and glory to my Lord and Savior, Jesus Christ, who I believe gave m e the strength and wisdom to write this book. I n addition, He gave m e health during the long gestation period that resulted in the birth of this book. I t is my prayer that the book prove to be a blessing to you.
  • 12. I ntroduction Anyone who buys a book—or considers buying it—wants to know who the book is for, what sets it apart from others like it, and how the book is organized. This introduction covers those three questions, and it also discusses system requirem ents, sample files, and support. • First, w ho is the book for? There are at least two answers to this question. One answer is that the book targets professional developers (and others aspiring to be professional developers). The second group the book addresses is those who want to build full-featured, secure SQL Server solutions with Visual Basic .NET. • Second, w hat’s special about the book? I hope you com e to believe that the m ost important answer to this question is that the book considered quality and depth of coverage more important than rushing to market. The book will arrive on bookshelves m ore than three months after the official release of the .NET Framework. I t is my wish that you derive value from the extra time taken to develop the m any code samples and the in-depth discussions of advanced topics, such as class inheritance, ASP.NET, and XML Web services. • Third, how is the book organized? The short answer is that there are two main sections. One section introduces SQL Server concepts as it dem onstrates T-SQL (Transact SQL) programming techniques. After conveying SQL Server basic building blocks in the first part, the second part reveals how to put those parts together with Visual Basic .NET and related technologies into SQL Server solutions for handling common database chores. The three support item s include a brief description of the book’s companion CD and how to use it, Microsoft Press Support I nformation for this book, and a summary of system and software requirem ents for the sample code presented in the book. W ho’s the Book For? This book targets professional Visual Basic and Visual Basic for Applications developers. From my seminar tours and Web sites (http: / / www.programm ingmsaccess.com and http: / / www.cabinc.net), I know that these professionals are driven by a passion to deliver solutions to their clients through applying the m ost innovative technologies their clients will accept. In-house developers are the go-to persons for getting results fast— particularly for custom in-house systems and databases. I ndependent developers specialize in serving niche situations that can include under-served business needs and work overflows. I n both cases, these professionals need training m aterials that address practical business requirem ents while showcasing innovative technologies without wasting their tim e. This book strives to serve this broad need in two specific areas. This book is for developers looking for code samples and step-by-step instructions for building SQL Server 2000 solutions with Visual Basic .NET. The book focuses on the integration of SQL Server 2000 with .NET technologies tapped via Visual Basic .NET. I t is my firm belief that you cannot create great SQL Server solutions in any programm ing language without knowing SQL Server. Therefore, this book
  • 13. goes beyond traditional coverage of SQL Server for Visual Basic developers. You’ll learn T-SQL program m ing techniques for data access, data manipulation, and data definition. A whole chapter equips you to secure your SQL Server solutions. In addition, there’s plenty of content in this book on Visual Basic .NET and related technologies, such as ADO.NET, ASP.NET, XML (Extensible Markup Language), and XML Web services. The presentation of these technologies demonstrates coding techniques and explores concepts that equip you to build better solutions with SQL Server 2000 databases. I n addition, the book highlights innovations introduced through the Web releases for SQL Server 2000 that integrate SQL Server 2000 tightly with Visual Basic .NET. This isn’t a book about XML, but three of the book’s 13 chapters focus in whole or in part on XML. Therefore, those seeking practical dem onstrations of how to use XML with SQL Server and Visual Basic .NET will derive value from this book. I f you have looked at any of the computer magazines over the past couple of years, you know that XML is coming to a solution near you. However, the rapid pace of XML innovation m ay have dissuaded som e from jum ping on the bandwagon while they wait to see what’s going to last and what’s just a fad. I n the book’s three chapters on XML technology, you’ll learn about XML documents, fragm ents, and formatting as well as related technologies, such as XPath (XML Path Language) queries, XSLT (Extensible Stylesheet Language Transformation), and WSDL (Web Services Description Language). W hat’s Special About This Book? There are several features that make this book stand apart from the flood of books on .NET. One of the m ost important of these is that this book didn’t rush to market but rather shipped m onths after the release of the .NET Framework. This allowed me enough tim e to filter, exam ine, and uncover what were the m ost useful and innovative features for Visual Basic .NET developers building SQL Server solutions. For example, the book includes a whole chapter on creating solutions with XML Web services. That chapter includes two major sections on the SQL Server 2000 Web Services Toolkit, which didn’t ship until the day of the .NET Framework release. The .NET Framework content is at a professional level, but it isn’t just for techies. This book doesn’t assume any prior knowledge of the .NET Framework. I t does assume that you get paid for building solutions programmatically and that at least some of those solutions are for SQL Server databases. Therefore, the book explains basic .NET concepts and dem onstrates how to achieve practical results with those concepts through a huge collection of .NET code samples. This book is about building solutions for SQL Server 2000. I include coverage of the many special features that tie Visual Basic .NET and SQL Server 2000 closely to one another. Although there is coverage of general .NET database techniques, this book dives deeply into T-SQL programm ing techniques so that you can create your own custom database objects, such as tables, stored procedures, views, triggers, and user-defined functions. I n addition, there is separate coverage of the XML features released with SQL Server 2000 as well as separate coverage of the XML features in the first three Web releases that shipped for SQL Server 2000. There are num erous code samples throughout the book. These will equip you to build solutions with Visual Basic .NET, T-SQL, and combinations of the two. Finally, this book is special because of the unique experiences of its author, Rick Dobson. I have trained professional developers in Australia, England, Canada, and throughout the United States. This is my fourth book in four years, and you can find my articles in popular publications and Web sites, such as SQL Server Magazine and MSDN Online. As a Webmaster, my main site
  • 14. (http: / / www.programm ingmsaccess.com) serves hundreds of thousands of sessions to developers each year. I constantly exam ine their viewing habits at the site to determ ine what interests them. I n addition, my site features scores of answers to technical support questions subm itted by professional developers. My goal in offering answers to these questions is to stay in touch with practicing developers worldwide so that my new books address the needs of practicing, professional developers. How ’s the Book Organized? There are two main parts to this book tied together by an introductory part. Part II , the first main part, dwells on SQL Server techniques. Part I II builds on the SQL Server background as it lays a firm foundation in .NET techniques for Visual Basic .NET developers. Part I, the introductory part, demonstrates ways to use SQL Server and Visual Basic .NET together. Part I , I ntroduction Part I , which includes only Chapter 1, has three main goals. First, it acquaints you with the basics of Visual Basic .NET within Visual Studio .NET. You can think of Visual Basic .NET as a major upgrade to the Visual Basic 5 or 6 that you are probably using currently. This first section introduces some concepts that you will find useful as you initially learn the landscape of Visual Basic .NET. The second goal of Chapter 1 is to introduce ADO.NET. I f you think of Visual Basic .NET as a major upgrade to Visual Basic 6, ADO.NET is m ore like a major overhaul of ADO. In two sections, you get an introduction to ADO.NET classes— particularly as they relate to SQL Server— and you get a chance to see a couple of beginner sam ples of how to create SQL Server solutions with Visual Basic .NET and ADO.NET. The third goal of the introductory part is to expose you to Query Analyzer. This is a SQL Server client tool that ships with all comm ercial editions of SQL Server 2000. You can think of it as an IDE for T-SQL code. Most of the book’s first part relies heavily on T-SQL, and therefore having a convenient environment for debugging and running T-SQL code is helpful. The final section of Chapter 1 addresses this goal. Part I I , SQL Server Part I I consists of six relatively short chapters that focus substantially on programm ing SQL Server 2000 with T-SQL. Chapter 2 and Chapter 3 introduce T- SQL and SQL Server data types. I f you are going to program SQL Server and create efficient, fast solutions, you m ust learn SQL Server data types, which is one of the main points conveyed by Chapter 2. Many readers will gravitate to Chapter 3 because it introduces core T-SQL program m ing techniques for data access. You’ll apply the techniques covered in this chapter often as you select subsets of rows and colum ns in data sources, group and aggregate rows from a table, process dates, and join data from two or more tables. Chapter 3 also considers special data access topics, such as outer joins, self joins and subqueries. The next pair of chapters in Part I I , Chapter 4 and Chapter 5, take a look at programm ing database objects that you will use for data access and data manipulation, such as views, stored procedures, user-defined functions, and triggers. These database objects are im portant for many reasons, but one of the most important is that they bundle T-SQL statements for their easy reuse. I t is
  • 15. widely known that the best code is the code that you don’t have to write. However, if you do have to write code, you should definitely write it just onc, and then reuse it whenever you need its functionality. Stored procedures are particularly desirable database objects because they save compiled T-SQL statements that can deliver significant speed advantages over resubm itting the same T-SQL statement for compilation each tim e you want to perform a data access or data manipulation task. Chapter 4 and Chapter 5 are also important because they convey T-SQL syntax for using parameters and conditional logic that support dynam ic run-tim e behavior and user interactivity. One of the m ost important features of SQL Server 2000 is its XML functionality. Because XML as a topic is changing so rapidly, Microsoft adopted a strategy of upgrading the SQL Server 2000 XML functionality through Web releases. Although those with SQL Server 2000 can download the Web releases without charge from the Microsoft Web site, the Web releases are fully supported. Chapter 6 introduces core XML functionality introduced with SQL Server 2000 as well as functionality from the first two Web releases. I n particular, you can learn in this chapter about I IS virtual directories as well as form ats for XML docum ents and schemas. You also learn about templates in virtual directories that facilitate data access and data manipulation tasks over the Web. Chapter 7 closes out the SQL Server part of the book with an in-depth look at programm ing SQL Server security. I n these tim es, security has grown into a monum ental topic, and this chapter can keep you out of trouble by blocking hackers from getting into or corrupting your database. You learn such topics as how to create and manage different types of login and user accounts and how to control the perm issions available to individual accounts as well as groups of accounts. By learning how to script accounts and perm issions with T-SQL, you simplify revising and updating security as conditions change (for exam ple, when users leave the company or when new, sensitive data gets added to a table). Part I I I , .NET Chapter 8 starts the .NET part of the book with a review of selected .NET topics that are covered in the initial look Chapter 1 offered at the .NET Fram ework. This chapter provides an overview of the architecture for .NET solutions, and it drills down on two topics: ASP.NET and XML Web services. The general purpose of this chapter is the same as Chapter 1, which is to introduce concepts. The emphasis in Chapter 8 isn’t how you do som ething, but rather what are the major technologies enabling you to do som ething. Chapter 1 and Chapter 8 are both relatively short chapters, but you may find them invaluable if you are the kind of person who benefits from high-level overviews of a collection of topics. Chapter 9 starts with a close exam ination of how to use Windows Form s with Visual Basic .NET. I t then shifts its focus to a review of traditional class processing concepts via Visual Basic .NET as an introduction to class inheritance, a new object-oriented feature that makes its first appearance in Visual Basic with Visual Basic .NET. Next the treatm ent of classes progresses to the handling of built-in events as well as the raising of custom events. Finally the chapter closes with an exam ination of the new exception handling techniques for processing run- time errors. Chapter 10 is a how-to guide for solutions to typical problems with ADO.NET. Before launching into its progression of sam ples showing how to perform all kinds of tasks, the chapter starts with an overview of the ADO.NET object m odel that covers the main objects along with selected properties and m ethods for each object. The how-to guide focuses on data access tasks, such as selecting rows and columns from SQL Server database objects, as well as data manipulation tasks, such as inserting, updating, and deleting rows in a table. Working through
  • 16. the samples in the how-to guide offers a hands-on feel for using the System .Data.SqlClient namespace elem ents to perform typical tasks. Chapter 11 switches the focus to the Web by addressing the creation and use of ASP.NET solutions. This chapter starts by introducing basic elem ents that you need to know in order to use ASP.NET to create great Web solutions with Visual Basic .NET. These include learning what happens as a page does a round-trip from a browser to a Web server and back to the browser— particularly for data associated with the page. Other prelim inary topics that equip you for building professional Web solutions include running the same page in m ultiple browser types and sniffing the browser for cases in which you want to send a page optim ized for a specific kind of browser type. Managem ent of session state is a major topic in the chapter, and you learn how to use enhancem ents to Session variables for Web farms as well as the new view state variables, a non-server- based technique for managing state in ASP.NET solutions. The last two sections in the chapter deal with ADO.NET topics in ASP.NET solutions and the new autom atic data validation features built right into ASP.NET. The last two chapters in the book explore how XML interplays with Visual Studio .NET and SQL Server 2000. For example, Chapter 12 exam ines special tools in Visual Studio .NET to facilitate the design and editing of XML docum ents and schemas. I n addition, you learn how to designate XPath queries that accept run- time input for returning SQL Server result sets inside Visual Basic .NET programs. The chapter dem onstrates techniques for processing the XML document associated with all ADO.NET data set objects. I n the chapter’s last section, I present a couple of code sam ples that illustrate how to program static HTML pages based on XML documents with XSLT. Chapter 13 drills down on XML Web services by dem onstrating several different approaches for creating Web services as well as consum ing XML output from Web services. Web services behave somewhat like COM objects in that you can set up server applications for client applications. The server applications expose m ethods to which the client applications can pass param eters. XML comes into play with Web services in a couple of areas. First, Web services represent their inputs and outputs via WSDL, an XML-based language that form ally describes an XML Web service. Second, Web services return data to their clients as XML documents or document fragm ents. System Requirem ents The requirem ents for this book vary by chapter. I developed and tested all samples throughout this book on a com puter equipped with Windows 2000 Server, SQL Server Enterprise Edition, and the Enterprise Developer Edition of Visual Studio .NET, which includes Visual Basic .NET. To use this book, you’ll need to have Visual Basic .NET or Visual Studio .NET installed on your computer. (See Chapter 1 for m ore information on versions of Visual Basic .NET and Visual Studio .NET.) I n addition, you’ll need SQL Server 2000, and for som e of the chapters, you’ll need SQL Server 2000 updated with Web releases 1, 2, and 3. Chapter 6 gives the URLs for downloading Web releases 1 and 2. Chapter 12 gives two different URLs for downloading Web Release 3— one with the SQL Server 2000 Web Services Toolkit and the other without it. For selected chapters, you can run the samples with less software or different operating systems than the one that I used. For example, chapters 2 through 5 will run on any operating system that supports a comm ercial version of SQL Server 2000, such as Windows 98 or a m ore recent Windows operating system. Chapter 7 requires an operating system that supports Windows NT security, such as Windows 2000 or Windows XP Professional. Chapter 6, Chapter 11, and
  • 17. Chapter 13 require Microsoft I nternet Inform ation Services (I I S). I n addition, Chapter 6 requires the installation of Web releases 1 and 2. For Chapter 11, your system needs to m eet the m inim um requirem ents for ASP.NET. (See a note in the “How Does ASP.NET Relate to ASP?” section of Chapter 8.) Several of the samples in Chapter 1 3 require Web Release 3 and its associated SQL Server 2000 Web Services Toolkit. Sam ple Files Sample files for this book can be found at the Microsoft Press Web site, at http: / / www.m icrosoft.com/ m spress/ books/ 5792.asp. Clicking the Com panion Content link takes you to a page from which you can download the sam ples. Supplem ental content files for this book can also be found on the book’s companion CD. To access those files, insert the companion CD into your computer’s CD-ROM drive and make a selection from the menu that appears. I f the AutoRun feature isn’t enabled on your system (if a m enu doesn’t appear when you insert the disc in your computer’s CD-ROM drive), run StartCD.exe in the root folder of the com panion CD. I nstalling the sam ple files on your hard disk requires approximately 15.3 MB of disk space. I f you have trouble running any of these files, refer to the text in the book that describes these programs. Aside from the sample files that this book discusses, the book’s supplem ental content includes a stand-alone eBook installation that will allow you to access an electronic version of the print book directly from your desktop. Support Every effort has been m ade to ensure the accuracy of this book and the contents of the companion CD. Microsoft Press provides corrections for books through the World Wide Web at the following address: http: / / www.m icrosoft.com/ m spress/ support To connect directly to the Microsoft Press Knowledge Base and enter a query regarding a question or an issue that you may have, go to: http: / / www.m icrosoft.com/ m spress/ support/ search.asp If you have comments, questions, or ideas regarding this book or the companion content, or questions that are not answered by querying the Knowledge Base, please send them to Microsoft Press via e-mail to: mspinput@m icrosoft.com Or via postal mail to: Microsoft Press Attn: Programm ing Microsoft SQL Server 2000 with Microsoft Visual Basic .NET Editor One Microsoft Way Redm ond, WA 98052-6399 Please note that product support is not offered through the above mail address. For product support information, please visit the Microsoft Support Web site at: http: / / support.m icrosoft.com
  • 18. Chapter 1. Getting Started w ith Visual Basic .NET for SQL Server 2 00 0 This book aims to give professional developers the background that they need to program SQL Server applications with Microsoft Visual Basic .NET. This overall goal implies three guidelines: • First, the book targets practicing developers. I n my experience, these are busy professionals who need the details fast. These individuals already know how to build applications. They buy a book to learn how to build those applications with a specific set of tools. • Second, the book is about building applications for SQL Server 2000. This focus justifies in-depth coverage of SQL Server program m ing topics— in particular, T-SQL, Microsoft’s extension of the Structured Query Language (SQL). • Third, the book illustrates how to program in Visual Basic .NET, but with particular emphasis on database issues for SQL Server 2000. Special attention goes to related .NET technologies, such as the .NET Fram ework, ADO.NET, ASP.NET, and XML Web services. My goal in this chapter is to equip you conceptually for the rest of the book. Therefore, this chapter includes material that acquaints you with application developm ent techniques and topics for SQL Server 2000 and Visual Basic .NET. The discussion of the samples in this chapter generally aim s to convey broad approaches instead of how to run the sample. All the remaining chapters except for Chapter 8, another conceptual chapter, have sam ples with instructions aim ed at professional developers. I believe that the overwhelm ing majority of professional Visual Basic developers have no hands-on fam iliarity with Visual Basic .NET and its related technologies. If you already knew Visual Basic .NET, it wouldn’t make any sense to buy a book describing how to use it. This chapter therefore focuses on how to get started with Visual Basic .NET and one of its core related technologies for those building SQL Server applications— ADO.NET. I also believe that m ost Visual Basic developers don’t have an intimate knowledge of SQL Server— especially for creating user-defined objects, such as tables, views, and stored procedures. This capability can em power you to build m ore powerful and more secure applications. As you learn about database objects and how to create them in Chapter 2 through Chapter 7, reflect back on the Visual Basic .NET coverage in this chapter and how to marry database creation techniques and Visual Basic .NET developm ent techniques. One of the best tools to build database objects is SQL Server 2000 Query Analyzer. This chapter’s closing section conveys the basics of Query Analyzer that you need to follow the sam ples in Chapter 2 through Chapter 7. Visual Studio .NET, the Visual Basic .NET I DE Visual Studio .NET is the new m ultilanguage integrated developm ent environm ent (I DE) for Visual Basic, C# , C+ + , and JScript developers. I f you are developing solutions for Visual Basic .NET, I definitely recom mend that you use Visual Studio .NET as your developm ent environm ent. This section dem onstrates how to get started using Visual Studio .NET for developing solutions with Visual Basic .NET.
  • 19. Visual Basic .NET is available as part of Visual Studio .NET in four editions: • Professional • Enterprise Developer • Enterprise Architect • Academ ic All four editions of Visual Studio .NET include Visual Basic .NET, Microsoft Visual C# .NET, Microsoft Visual C+ + .NET, and support for other languages. I n addition, Microsoft offers Visual Basic .NET Standard, which doesn’t include Visual C# .NET or Visual C+ + .NET. Because this book targets professional Visual Basic developers creating SQL Server applications, it uses the Enterprise Developer Edition of Visual Studio .NET. You may notice some differences if you’re using another edition. Visual Studio .NET can be installed on computers running one of five operating system s: Windows 2000, Windows NT, Windows XP, Windows ME, and Windows 98. Not all the .NET Framework features are available for each operating system. For example, Windows 98, Windows Me, and Windows NT don’t support developing ASP.NET Web applications or XML Web services applications. The samples for this book are tested on a computer running Windows 2000 Server, which does support all .NET Fram ework features. Starting Visual Studio .NET To open Visual Studio .NET, click the Start button on the Windows taskbar, choose Programs, and then choose Microsoft Visual Studio .NET. Visual Studio displays its integrated developm ent environm ent, including the Start Page (unless you previously configured Visual Studio to open differently). From the Start Page, you can configure Visual Studio to work according to your developm ent preferences, and you can start new solutions as well as open existing projects. Configuring Visual Studio .NET for Visual Basic .NET Use the links on the left side of the Start Page to begin configuring Visual Studio .NET for developing solutions in Visual Basic .NET. Click the My Profile link to open a pane in which you can specify an overall profile as well as individually indicate your preferences for Keyboard Schem e, Window Layout, and Help Filter. You also can designate the initial page that Visual Basic .NET displays. When you are beginning, it m ay be particularly convenient to choose Show Start Page. As a Visual Basic developer who has worked with Visual Basic 6, you m ight feel m ost familiar with a layout that reflects your prior developm ent environm ent. Figure 1- 1 shows these My Profile selections. Figure 1 -1 . My Profile selections for starting Visual Studio .NET for a Visual Basic developer.
  • 20. Using the Start Page After setting your profile, you can return to the initial Start Page pane by choosing the Get Started link from the menu on the left border. I f you had created previous solutions, the last four m odified projects would appear on the Projects tab of the Start Page. The tab shows project nam es along with date last modified. I f a project you want to view doesn’t appear on the list, you can click the Open Project link to display the Open Project dialog box and then navigate to a directory containing the previously created solution. Select the project’s folder that you want to open in the I DE, and double-click the solution file (.sln) for the project. The next section illustrates this process in the context of a sample project. To create a new solution, click the New Project link to open the New Project dialog box. I f you saved preferences such as those shown in Figure 1-1, the dialog will automatically select Visual Basic Projects in the Project Types pane of the New Project dialog box. On the right, you can select a template for launching a project. Table 1-1 shows the project template nam es along with a brief description available from the Enterprise Developer Edition of Visual Studio .NET. Choosing a template (by clicking OK after selecting a template) opens a project ready for creating the type of solution that you want to develop. When Visual Studio .NET saves the tem plate to start a new project, it specifies either a file folder or a Web site for the template’s files; you can override the default nam es for the file folder and Web site.
  • 21. Note Not all the project template types in Table 1-1 are available with the non-Enterprise (or Standard) editions of Visual Studio .NET. In addition to the empty projects, the Standard editions make available the Windows Application, ASP.NET Web Application, ASP.NET Web Service, and Console Application templates. 7DEOH9LVXDO%DVLF1(73URMHFW7HPSODWH7SHV 7HPSODWH1DPH UHDWHV$ Windows Application Windows application with a form Class Library Windows application suitable for a library of classes without a form Windows Control Library Project for developing custom reusable form controls for Windows applications ASP.NET Web Application Web application on a Web server ASP.NET Web Service XML Web service on a Web server Web Control Library Project for developing custom reusable controls for Web applications Console Application Command line application that operates in an MS-DOS–style window (the Console) Windows Service Windows service, form erly NT service, application that runs in the background without its own custom user interface Em pty Project Local project with no custom style Em pty Web Project Web project with no custom style New Project I n Existing Folder Blank project in an existing folder There are two main categories of templates: Web projects and local projects. Web projects perm it a browser to serve as the client for a project. Web projects are optim ized for form processing on the Web server. Local projects offer custom form user interfaces with the capability of processing on a local workstation. Local projects can provide richer environments more conducive to client-side programm ing, but local projects don’t offer the wide accessibility of solutions running from a Web server. Creating and Running a Console Application When you select a Console Application template and click OK to launch a new project, Visual Studio .NET responds by opening a project with a blank module. I n addition to the Module window, Visual Studio displays Solution Explorer and the Properties window. You can enter code directly into the Module window, which appears as a tab that you can select alternately with the Start Page. Figure 1-2 shows a code sam ple in the Main subroutine that prompts for a first and second nam e before com bining them and displaying them in the Console (the computer’s monitor). The code is also available as MyNam eIsFrom Console in the Chapter 1 folder on the companion CD for this book. Although Visual Basic developers didn’t previously have Console applications routinely available, this sample should be
  • 22. very easy to follow. The final two lines present an instruction and cause the window to remain open until the user responds to the instruction. This allows the user to view the full name in the Console window. Figure 1-2. A Console application for displaying a full nam e based on user input for first and second nam es. To the right of the Module window are two other windows. The top one of these is Solution Explorer. I t shows the file structure for the solution. Solution Explorer indicates in its first line that the solution consists of just one project. Below that line appears the name of the project, MyNam eI sFrom Console. Within the project are three entries: one each for the References, AssemblyI nfo.vb, and Module1.vb elem ents within the solution’s project. By default, the Properties window is below Solution Explorer. I n the Full Path property text box is an excerpt showing the path to Module1.vb on my computer. When you click the project name in Solution Explorer, the Project Folder text box in the Properties window displays the path of the directory holding the solution’s files. It is this directory that you copy to deploy your solution on another computer with the .NET Fram ework installed. The solution won’t run without the com mon language runtime on the computer to which you copy the directory containing the .NET Fram ework solution. See Chapter 8 for m ore detailed coverage of the .NET Fram ework, including the runtime and distributing .NET Fram ework solutions as assemblies of files in folders. You can test run the application by choosing Start from the Debug m enu, or by pressing F5. This opens the Console window with a prompt to enter a first nam e. After you close your application and save any changes to it, your solution appears
  • 23. on the Start Page for recent solutions. I f you start Visual Studio .NET and the solution you want to open doesn’t appear on the Projects tab of the Start Page, you can also open the solution by clicking Open Project. I n the Open Project dialog box, choose the file with the .sln extension and the solution’s nam e (MyNam eIsFromConsole). A solution can contain just one .sln file, but it can contain m ultiple projects. You also can run the solution and open the Console window directly from Windows Explorer without using Visual Studio .NET. Open the bin subdirectory within the directory containing the assembly folder for the solution. Then double- click the MyNameIsFrom Console.exe file. This opens the Console window with the prompt for a first nam e. An Overview of ADO.NET Capabilities ADO.NET encapsulates the data access and data manipulation for the .NET Framework. This section gives you an overview of the topic that equips you for a starter sam ple in the next section. Microsoft chose the nam e ADO.NET for the .NET Framework data access com ponent to indicate its association with the earlier ADO technology for data access. While there are som e sim ilarities in syntax between ADO.NET and ADO (particularly for connection strings), many will find the differences are m ore obvious than the sim ilarities. These differences substantially upgrade ADO.NET over ADO in two key areas— scalability and XML (Extensible Markup Language) interoperability. As a result, you will be able to create database applications with ADO.NET that serve m ore users and share m ore data than you did with ADO. See Chapter 10 for a m ore intensive examination of ADO.NET. Chapter 12 explicitly explores interoperability between ADO.NET and XML. .NET Data Provider Types Your .NET Fram ework solutions require .NET data providers to connect to data sources. These providers are different from those used with ADO, but there are distinct similarities in some of the ways you use them. With .NET data providers, your solutions can connect, read, and execute commands against data sources. The .NET providers also offer selected other functions, such as the m anagement of input and output parameters, security, transactions, and database server errors. Visual Studio .NET ships with two .NET data providers— the SQL Server .NET data provider and the OLE DB .NET data provider. In addition, you can download an ODBC .NET data provider from the Microsoft MSDN download site (http: / / msdn.m icrosoft.com/ downloads/ default.asp). Note As I write this chapter, the ODBC .NET data provider just became available with the rollout of the shipping version of Visual Studio .NET. You can download it from http: / / msdn.microsoft.com/ downloads/ default.asp?url= / downloads/ s ample.asp?url= / msdn-files/ 027/ 001/ 668/ msdncompositedoc.xml. The URLs for resources sometimes change. You can always search for the ODBC .NET data provider at the MSDN download site to obtain its current download location.
  • 24. The three providers taken together offer fast, highly focused access to selected data sources as well as general access to a wide range of possible data sources. The SQL Server .NET data provider is optim ized for SQL Server 7.0 and SQL Server 2000. This data provider connects directly to a SQL Server instance. The OLE DB .NET data provider connects to OLE DB data sources through two intermediate layers— the OLE DB Service Component and the classic OLE DB provider introduced along with ADO. The OLE DB Service Component m anages connection pooling and transaction services. The classic OLE DB provider, in turn, directly connects to a database server. Microsoft explicitly tested the OLE DB .NET data provider with SQL Server, Oracle, and Jet 4.0 databases. Use the OLE DB .NET data provider to connect to the SQL Server 6.5 version and earlier ones. This provider is also good for connecting to your Microsoft Access solutions based on the Jet 4.0 engine. The OLE DB .NET data provider definitely doesn’t work with the OLE DB provider for ODBC data sources (MSDASQL). Because the .NET OLE DB data provider doesn’t connect to ODBC data sources, you require the ODBC .NET data provider for connecting to ODBC data sources from your .NET Framework solutions. There are four main .NET data provider classes for interacting with a rem ote data source. The nam es of these classes change slightly for each type of provider, but each .NET data provider has the sam e four kinds of classes. The names for the SQL Server .NET data provider classes for interacting with SQL Server instances are SqlConnection, SqlCommand, SqlDataReader, and SqlDataAdapter. You can use the SqlDataReader class for read-only applications from a SQL Server data source. Two especially convenient ways to display results with a SqlDataReader class are in a m essage box or the Visual Studio .NET Output window. The SqlDataAdapter class acts as a bridge between a remote SQL Server data source and a DataSet class instance inside a Visual Basic .NET solution. A data set in a Visual Studio solution is a fifth type of ADO.NET class. A data set can contain m ultiple tables. A sixth ADO.NET class is the DataView class, which acts like a view based on a table within a DataSet object. Windows Forms in Visual Basic .NET applications can bind only to tables within a DataSet object and DataView objects. I examine the DataSet object later in this section. Chapter 10 includes a systematic summary of all six ADO.NET classes that reviews selected properties and m ethods of each class. The overview of ADO.NET classes in Chapter 10 is supported by num erous code samples that illustrate how to manipulate instances of the classes programmatically. Note In order to use abbreviated names, such as those listed in this section for the SQL Server .NET data provider class instances, your application needs a reference to the SqlClient namespace. You can create such a reference with an Imports System.Data.SqlClient statement just before a Module declaration. SqlConnection Class An instance of the SqlConnection class can interface directly with a SQL Server data source. Use a constructor statement to instantiate a SqlConnection object from the SqlConnection class. The constructor statement is a new type of sy-ntax for .NET Fram ework solutions. This type of statement perm its you to declare, instantiate, and pass startup param eters to an object based on a class. With the SqlConnection constructor statem ent, you can specify a connection string as an argum ent for the constructor statem ent. Alternatively, you can assign the
  • 25. connection string to the SqlConnection object after its instantiation with a property assignm ent statement for the ConnectionString property. The following line shows the syntax to instantiate a new SqlConnection object, MySQLCnn1, with a connection string designating integrated security to the m ydb database on the myserver instance of SQL Server. You don’t have to explicitly indicate a provider because the constructor statem ent reveals the type of provider through its reference to the SqlConnection class. Dim MySQLCnn1 As New _ SqlConnection(“Integrated Security=SSPI; _ Data Source=myserver;Initial Catalog=mydb) After instantiating a SqlConnection object, you need to invoke its Open method before the object can link another object based on one of the other SQL Server .NET data provider classes, such as SqlCommand, SqlDataAdapter, or SqlDataReader, to a SQL Server instance. I nvoke the Close m ethod to recover the resources for a SqlConnection object when your solution no longer needs it. The Close m ethod rolls back any pending transactions and releases the connection to the connection pool. The Dispose m ethod is also available for removing connections, but it invokes the Close m ethod and performs other .NET adm inistrative functions. Microsoft recomm ends the Close m ethod for removing a connection. Unclosed connections aren’t returned to the connection pool. SqlCom m and and SqlDataReader Classes One way to put a connection to use is to employ it along with the SqlCom mand and SqlDataReader objects. A SqlDataReader object can maintain an open forward-only, read-only connection with a SQL Server database. While the SqlDataReader using a SqlConnection object is open, you cannot use the SqlConnection object for any other purpose except to close the connection. Closing a SqlDataReader object releases its associated SqlConnection object for other uses. The SqlDataReader class doesn’t have a constructor statement. You declare the SqlDataReader object with a Dim statement and assign a result set from a SqlCommand object to a SqlDataReader with the ExecuteReader method of the SqlCommand object. Finally, invoke the SqlDataReader object Read method to open a row from the result set in the SqlDataReader. The SqlCommand object can serve multiple functions, including processing a T- SQL statem ent against a connection. When used in this fashion, the SqlCommand can take two argum ents. The first can be a T-SQL data access statement, such as SELECT * FROM MyTable . The second SqlCom m and argum ent designates the source connection for the T-SQL statem ent. For example, you can use the name of a SqlConnection object, such as MySQLCnn1. Figure 1-3 shows the route from a SQL Server data source to a SqlDataReader object. Although the SqlConnection and SqlCom mand objects support two-way interaction with a data source, the SqlDataReader object allows read-only access to the result set from the T-SQL statem ent serving as an argum ent for a SqlCommand constructor. Because a SqlDataReader object cannot specify its own data source, a SqlDataReader object must link to a SqlConnection object through an intermediate SqlCom mand object. Figure 1 -3 . A schem atic illustrating the route by w hich a SqlDataReader object returns values to an application.
  • 26. Random documents with unrelated content Scribd suggests to you:
  • 27. The earliest record of the punishment being actually carried out is found in the Book of Numbers (xxv.), on the occasion of the Israelites having sacrificed to the gods of the Moabites at Baal-peor, when Moses received and put into effect the Divine command to hang the leaders in the acts of idolatry. Later, when a famine was raging in the land of Israel, David handed over to the Gibeonites seven of the sons of Saul, whom they hanged. Another instance of punishment by hanging is found in the Book of Esther (ix.), when King Ahasuerus condemned the ambitious and unprincipled Haman to be hanged on the gallows he had prepared for the Jew Mordecai; and at the request of Queen Esther the same punishment was meted out to his ten sons. Hanging was regulated by law by Henry i., but the earliest recorded use of the rope in England can be traced to the days of Henry ii. This questionable distinction belongs to the town of Malden, which, in the year 1167, “was amerced three marks for having hanged a robber without such view,” that is to say, the approval of the King’s Sergeant. Eight years later, Andrew Bucquinte, a thief, who had carried out numerous robberies in the City of London, was sentenced to be hanged, “which was done, and the Citie became more quiet”; while the later chroniclers give full details, which had been passed on to them, of the death in 1196 of William FitzOsbert, or “Longbeard.” Matthew Paris, Stow, and Hollinshed all name “the Elms” as the place of hanging. Roger de Wendover records that Longbeard was drawn to the gallows “near Tyburn,” and there hanged with nine of his followers. This would seem to be the first authentic account of an execution by hanging at Tyburn, though, in fact, it is very doubtful—Roger de Wendover notwithstanding—if Longbeard met his fate at Tyburn. “The Elms” was the name given to the hanging-place at Smithfield long before the law’s last penalty was demanded at Tyburn, and at the “Elms, at Smithfield,” a century after Longbeard’s death, William Wallace was hanged and quartered in 1305.
  • 28. The name seems to have been carried to Tyburn when hangings were transferred there, and for a time the two execution-grounds flourished simultaneously. Longbeard was the first of a line of romantic impostors who attracted admirers by hundreds, and ended their days under the gallows. He represented to Richard i. that the wealthy citizens of London were oppressing the poor; he preached to the masses, proclaiming that he was their saviour, and that to him they must look for deliverance. Richard listened to his story. This so encouraged him that he “had gotten two and fiftie thousand persons readie to have taken his part,” and all rich people went in fear of their lives. Summoned to appear before the Archbishop of Canterbury for inciting to rebellion, Longbeard was accompanied by so many followers that the Prelate dared not deliver sentence. He then retired, with his paramour, to the Tower of St. Mary-le-Bow, which he had previously provisioned and fortified. Ignoring all the Archbishop’s commands to appear, it was only when the church had been assaulted and set on fire that, driven out by smoke and flames, he surrendered. He was dragged to the Tower, and thence to the final scene. Longbeard was a man of evil life, but the poor looked upon him as a martyr, and, Stow says, “pared away the earth that was be-bled (sprinkled) with his blood, and kept the same as holy reliques to heale sicknesse.” It would therefore appear that he was not only hanged, but drawn and quartered as well. This custom of carrying away trophies from the gibbet was a superstition, and Brand, in his edition of Bourne’s Antiquitates Vulgares, writes: “Chips of gallows and Places of Execution are used for Amulets against Agues. I saw lately some Saw-dust, on which Blood was absorbed, taken for some such purpose from off the Scaffold on the beheading of one of the rebel lords, 1746.” Possibly the added information that the crowd stole “the gibbet” is a misconception by the chronicler to whom the tradition is handed down. The passage is not without difficulty. So early in our history “Tyburn” meant merely the Ty-bourne, or brook, where it flowed
  • 29. from Hampstead towards the Thames, not necessarily the common place of execution which afterwards took to itself the distinctive name of Tyburn. What the “Elms” represented has never, so far as can be gathered, been satisfactorily cleared up. It is reasonably supposed that rows of trees stood on the banks of the burn where it passed through the forest and marshes, and probably their branches afforded convenient means for hanging prisoners. With so much growing timber about, it would have been useless expense and labour to bring carpenters to construct a gallows, and to people of the thirteenth century a quite unnecessary refinement. “The Elms” near Tyburn was the scene of many executions after that of Longbeard. If, in fact, the hanging-place at “the Elms” was on trees growing beside the bourne, then, owing to its course, the execution-ground must have been some few hundred yards farther eastward than the Tyburn of later days. King John not only hanged some Welsh rebels at Nottingham in 1212, but nine years later Constantine Fitz-Arnulph and two confederates were hanged for raising a tumult at Westminster, so by this time hanging as a method of capital punishment had become an accepted institution. The records tell of twelve pirates hanged in Hampshire in Henry iii.’s reign, and of eighteen Lincoln Jews suffering the same fate a few years later. In London also great strife between the goldsmiths and tailors led to the imprisonment of many rioters, thirteen of whom were hanged for the trouble they had caused in the City. As if London had not enough horrors of its own, the custom was established in the reign of Edward I. of bringing offenders from the provinces to the capital for execution, and taking wrongdoers of London to certain towns in the country for the same purpose. Jews at Northampton being accused of having crucified a Christian boy on Good Friday, many “Jewes at London after Easter were drawne at horse tailes and hanged”; and such wholesale punishments of that persecuted tribe were of frequent occurrence. Although “the Elms” is not actually mentioned, the accounts related of Rice ap Meredith, a rebel, and of Gilbert Middleton, in 1316, lead to the conclusion that they ended their days at “the
  • 30. Elms”; they were drawn “through the streets of the citie to the gallowes.” Middleton, a fourteenth-century “Dick Turpin,” was brought from the north to London, and hanged in the presence of two cardinals whom he had robbed. These Church dignitaries had come to England with the view of making a double peace, namely, between Edward ii. and Thomas, Duke of Lancaster, and between England and Scotland. But after Middleton had attacked and robbed them in the north, they were so disgusted they never visited Scotland at all. These were the early days of the self-assertion of the populace—about which we now hear so much under the banner of Socialism. Richard Davey, in his Pageant of London, writing of this time, says: “The evolution of slavery into serfdom, and of serfdom into vassalage—one of the greatest efforts towards true progress effected in this age—very rapidly brought about the creation of what we might describe as a lower class, whose voice was soon to be heard clamouring for its share in direct or indirect administration. Hence the increasing influence of universities, guilds, and corporations.” It must not be supposed from this, however, that education took any important turn, for the middle-class man and woman could neither write nor read until the money derived from the destruction of the monasteries was utilised for founding Grammar Schools. That is why it is so difficult to glean far-away facts when information and chronicling were in the hands of so few. By the time Wat Tyler’s rebellion had been put down, and ruthlessly punished, London appears to have possessed a permanent gallows. Victims numbered by hundreds, who had participated in the rising, dangled on trees and gibbets all over the counties of Middlesex, Essex, and Kent, and the excessive use of the hangman’s rope no doubt made some such structure a necessity. “The Elms” drops out of notice. Baker, relating in his Chronicle the arraignment of Roger Mortimer half a century earlier for encompassing the death of Edward ii., and his subsequent execution, speaks of him as being
  • 31. “hanged on the common gallows at the Elms, now called Tyburn, where his body remained two days as an opprobrious spectacle for all beholders.” This is but a small detail, but it is in such strokes of the pen that we learn much of the general state of things in past ages, and that word “Common” depicts a gallows in frequent use. It was after this that the place of execution seems to have been moved to Tyburn Road, and perhaps it was the erection of the permanent gallows at this time, that led Fuller to speak of the gibbet having been placed there as “an instrument of torture and punishment for the Lollards” (the followers of John Wyclif), and to quaintly write: “Tieburne some will so have it called, from Tie and Burne, because the poor Lollards, for whom this instrument (of cruelty to them, though of Justice to Malefactors) was first set up, had their necks tied to the Beame, and their lower parts burnt in the fire.” The worthy Fuller refers to the Act “De Heretico Comburendo,” for, not content with mere death, it had been thought necessary to invent another mode of punishment for persecuting the Lollards, and this Act authorised the burning of heretics in a high public place. As for the derivation here attempted, it seems rather a quaint conceit by Fuller than a serious explanation of the origin of a word which for so many centuries bore a notorious meaning. The Bourne flowed along its course from time immemorial; as we know, it was called Tiburne, or Tyburn, in the earliest references extant, and it is much more likely that the execution-ground took its name from the Bourne, than that the brook itself owes its distinctive title to a particular form of death practised so late as the time of the Lollards. The executions of Nicholas Brembre and Judge Tresillian in 1388 are supposed to have been the first recorded deaths at this new Tyburn. These men had been impeached for high treason. Brembre had been four times Lord Mayor of London. The charge against him was that he had “intended to slay some thousands of the citizens, to alter the name of London to that of ‘New Troy,’ and to have himself created Duke thereof.” So the gentleman was not without ambitions. Roger Bolingbroke, who met his death for alleged necromancy, was another of the early victims of Tyburn. The whole charge arose
  • 32. out of the bitter jealousy existing between Humphrey, Duke of Gloucester, son of Henry iv., and Cardinal Beaufort, Bishop of Winchester, the son of John of Gaunt and Catharine Swynford. On the death of Henry v. each vied with the other for the guardianship of the young King (who was but nine months old when his father died) and the leadership of public affairs. Beaufort’s huge wealth secured him the support of the Church, into whose coffers he poured large gifts, and finally Humphrey was arrested and thrown into prison. Meantime Beaufort had devised that charges of witchcraft should be brought against Gloucester’s chaplain, Roger Bolingbroke and his wife Eleanor Cobham, Duchess of Gloucester, representing that she was exercising necromancy to encompass the death of Henry vi. and place her husband on the throne. Stow tells us the story: “Roger Bolinbrooke a great Astronomer, with Thomas Southwell, a Chanon of Saynt Stephen’s Chapell at Westminster, were taken as Conspiratours of the King’s death, for it was said, that the same Roger shoulde labour to consume the King’s person by way of Necromancie, and the said Thomas should say Masses in the Lodge of Hornesey park beside London, vpon certain instruments, with the which the said Roger should use the craft of necromancies, against the faith, and was assenting to the said Roger in all his works. And the 5 and twentieth day of July being Sunday, Roger Bolinbrooke, with all his instruments of necromancie, that is to say a chayre paynted herein he was wont to sit, vppon the 4 corners of which chayre stood foure swords, and vppon every sword an image of copper hanging with many other instruments. Hee stoode on a high scaffolde in Paules Churchyard, before yᵉ crosse, holding a sword in his right hand and a scepter in his left, arrayed in a marvellous attire, and after the Sermon was ended by Maister Low Byshop of Rochester, he abjureth all articles belonging to the crafte of necromancie of missowning to the faith, in presence of the Archbishop of Canterbury, the Cardinall of Winchester, the byshop of London, Salisbury and many other.”
  • 33. Eleanor Cobham, Duchess of Gloucester, was brought before Chicheley, Archbishop of Canterbury, and Cardinal Beaufort, Bishop of Winchester, and others, in St. Stephen’s Chapel at Westminster. Bolingbroke was produced as a witness against her, and accused her of inciting him to practise necromancy. Finally a Commission was appointed to inquire into the various witchcrafts and treasons against the King’s person, and Bolingbroke and Southwell as principals, and Eleanor Cobham as an accessory, were indicted for treason. Bolingbroke was condemned to death and was taken to Tyburn, where he was hanged, drawn, and quartered, denying the crime of treason, but crying for God’s mercy for having presumed too far in his cunning. Nor did Beaufort’s vengeance end here. Humphrey of Gloucester was thrown into prison, where he languished and died in 1446— murdered, some writers allege, by Beaufort. In the following year five of his most noted sympathisers were arrested and put in the Tower, from whence they were “drawn to Tiborne, hanged, let down quick, stripped, marked with a knife to be quartered.” At that juncture the Duke of Suffolk arrived with a pardon, which did not, however, deprive the hangman of his perquisites. Says Stow: “Yᵉ yeomen of yᵉ gallows had their livelode, and the hangmen their clothes and wearing apparel.” He adds that the pardon was secured by the prayers of “Master Gilbert Worthington, the parson of St. Andrewes in Holborn.” A quiet hanging was little to the taste of either the dispensers of justice or of vengeance, or of the crowds that gathered at executions in those rude days, or, indeed, in the days of the Tudors, or even of Charles ii. Common malefactors were swung upon a gibbet and left there, no more trouble was bestowed upon them; but for the plotter against the State, the process of death was more elaborate. References to the victims being “hanged, drawne, and quartered” abound. It is impossible within the limits of decency to describe in detail the revolting tortures and mutilations practised upon the poor wretches whom ill-fortune brought to Tyburn. What the sentence implied can be found in the State Trial of the Duke of Buckingham,
  • 34. where it was delivered in all its unabashed nakedness by the Earl of Norfolk, though Henry viii. substituted decapitation. What it meant in actual practice may be judged from the records of the punishment of those concerned in the Babington Plot against Queen Elizabeth. Fifteen men were condemned to die, and after a day and a half had been spent on the ghastly work, leaving it still incomplete, the Queen, disgusted with the sickening business, bade the executioners “despatch with haste” the remaining victims, remitting the last abominations. It was the earliest custom to tie the wretched victim by the heels, attach him by a rope to a horse’s tail, and thus drag him from gaol to the place of execution. Arrived at his destination, jeered and howled at all the way, and sorely bruised as he jolted over the rough roads to his death, he was placed on the gibbet. The rope, after much fumbling, was adjusted mid the yells of the spectators, and then the prisoner was hoisted on high by the executioner and his assistant, until slow suffocation ended his misery. Later, for humanity’s sake, a rough hurdle was utilised, to which the condemned man was bound, and on this he was dragged to the gallows. Not until Stuart times was the malefactor’s springless cart introduced. In only too many cases, however, the dread sentence of “hanged, drawn, and quartered” was carried out with all its attendant horrors. The condemned wretch, after he had been dangled from the gallows on a short rope for a considerable time, and undergone all the horrors of death by suffocation without its merciful release, was cut down still alive. Then he was stripped, his clothes being the executioner’s perquisite, and with his knife that functionary marked off the lines he would follow in carrying out the quartering. The victim was then disembowelled, the entrails being thrown on a fire and burnt before his dying eyes. The head was decapitated. Finally, the mutilated corpse was divided into four pieces, which were sometimes salted or par-boiled, and, with the head, made five ghastly evidences of the consequences that would befall those who offended the higher powers. These “bits” were sent for exhibition in
  • 35. five different localities where it was supposed that such warning would be most beneficial. Anything more horrible cannot be imagined. And yet a crowd always assembled to witness the scene. Men, women, and children scrambled for a front view, and the grand ladies and smart gentlemen of comparatively refined times did not appear to consider it degrading to watch a person hanged by the neck until he was dead. In fact, the morbid love of such horrors pursued us till a much later date, for murderers were publicly hanged outside Newgate, on a busy thoroughfare of the City of London, as recently as 1866. Perkin Warbeck—“that little cockatrice of a king,” as Bacon calls him—was one of the mediæval victims who met his end at Tyburn in 1499. With him went to their death the servants who were found conniving at his escape from the Tower. No character in the arena of history at that period has more glamour of romance about it than that of Warbeck. Even the most unbiassed writers seem to waver as to whether he was really the Duke of York or an impostor, so readily did he tell the tale of how he, as the little prince, had escaped from the Tower, and now as a grown man came to claim his heritage. In his imprisonment he had twice made bids for freedom, been captured, and made to read a confession—on the second occasion a public avowal, standing in Cheapside—after which he was again confined in the Tower. It has been alleged by some historians that this was a mere scheme of Henry vii. to place him in contact with the Earl of Warwick, the son of George, Duke of Clarence, and heir of the House of York, who had been kept a prisoner in the Tower until he was practically bordering on imbecility. The presence of this man would be a greater temptation to Warbeck to make another attempt to gain his freedom, and probably it would give the King an opportunity to rid himself of both these claimants of Royal descent. The Earl of Warwick was beheaded on Tower Hill, and Warbeck was hanged at Tyburn. For his end we can again refer to Stow: “Perken Warbeke—being in holde, by great promises corrupted his keepers, named Strangwais, Blewet, Astwood, and
  • 36. long Roger, servants to sir I. Digby, lieutenant of the Tower (as was affirmed) intended to have slaine their Master, to have set Perken and the Earle of Warwick at large; which Earle of Warwick had been kept in prison within the Tower (as yee have heard) from the first yeere of this king to this 15 yeere out of all companie of men and sight of beasts, and therefore could not of himselfe seeke his owne destruction, but by other he was brought to his death, for being made privie of this enterprise devised by Perken and his complices, he assented thereunto: but this devise being revealed Perken and I. a Waters, sometime Maior of Corke in Ireland, were arraigned and condemned at Westminster and on the 23 of November drawn to Tiborne, where Perken read his former confession as before he had done in Cheape, taking on his death the same to bee true, and so hee Iohn a Water asked the King forgivenesse, and tooke their deaths patiently. And shortly after Walter Blewt and Thomas Astwood were hanged at Tyborne.” When Henry viii. was King, Tyburn was yet more busy. The lesser victims of that monarch’s policy and ambition, for whom the axe and block were considered too good, were sent out of the Tower to the loathsome prisons of the day, to meet an ignominious end under the gallows. A long, sad procession they made, many priests among them, martyrs for the Catholic faith. Some of the most pathetic figures were the prior and monks from the Charter House, whose execution is thus described in the Contemporary Spanish Chronicle of Henry viii., edited by Martin Hume. “The monks of the Charter House refused to take the oath to Henry as head of the Church (June 1535). “When the King heard of it he ordered that justice should be executed upon them, so they were taken two by two on hurdles and dragged to the gallows (at Tyburn), which is three miles from London. “The Prior went alone on a hurdle, and the holy friars confessed to each other as they went along, the Prior
  • 37. embracing the crucifix and saying many prayers. When they were arrived at the gallows they took one of the first and cast a rope about his neck, and the hangman asked his pardon. Then all the others placed themselves so that they should see the first die, the Prior exhorting in Latin and comforting him as he was led up. The friar turned to the hangman and said, ‘Brother, do thy duty.’ The rope being placed on the gallows, the hangman whipped the horse, and the friar remained hanging. Directly, before he was half-dead, they cut the rope and stripped him: then they ripped up his belly, plucked out his bowels and his heart, and cast them into the fire that was burning there, and afterwards they cut off his head and quartered the body. The holy friars looked on at all this, praying the whole time, and when the first execution was finished the Sheriff said to the other fathers: ‘Ye see what has become of your companion: you had better repent and you will be forgiven.’ Altogether in one voice, which was as if the Holy Ghost himself was speaking, they cried, ‘Sheriff, we are only impatient to join our brother.’ Each one offered himself as first for martyrdom, and they all died like the first.” The English Chronicles record the Carthusian martyrdoms in this year 1535 (20th April, five men; and 19th June, three men) at Tyburn, and this note appears to refer to the second execution. The quarters were seared with pitch and set up at the gates on London Bridge and before the Charter House. The Spaniard says that the quarters remained incorrupt. In all the number there are few brighter names than those of the Earl of Kildare and his four kinsmen, whose capture, imprisonment, and death (1537) furnished a deplorable tale of Tudor treachery and vengeance. The earl, who had been involved in one of the numerous rebellions in Ireland, which were the chronic state of that unhappy country, had been promised pardon if he repaired to England. The story, so full of pathos, and of the fear of death, brightened by the heroism of the younger brother, cannot be better told than in Hollinshed’s quaint phrases:
  • 38. “And before his imprisonment was bruted, letters were posted into Ireland streiatly commanding the deputie upon sight of them, to apprehend Thomas Fitzgirald his uncles, and to see them with all speed conuenient shipt into England. Which the lord deputie did not slacke. For having feasted three of the gentlemen at Kilmainan immediatelie after their banket (as it is now and then seene that sweet meate will have sowre sawce) he caused them to be manacled, and led as prisoners to the Castell of Dublin; and the other two were so roundlie snatcht up in villages hard by, as they no sooner felt their owne captivitie than they had notice of their brethren’s calamitie. The next wind that served into England, these five brethren were imbarked, to wit James Fitzgirald, Walter Fitzgirald, Oliver Fitzgirald, John Fitzgirald, and Richard Fitzgirald. Three of these gentlemen, James, Walter, and Richard, were knowne to have crossed their nephue Thomas to their power in his rebellion and therefore were not occasioned to misdoubt anie danger. But such as in thos days were enimies to the house, incensed the King so sore against it, persuading him that he should never conquer Ireland, as long as anie Giraldine breathed in the countrie: as for making the pathwaie smooth, he was resolved to lop off as well the good and sound grapes, as the wild and fruitlesse berries. Whereby appeareth how dangerous it is to be a rub, when a King is disposed to sweepe an alleie. “Thus were the five brethren sailing into England, among whom Richard Fitzgerald being more bookish than the rest of his brethren, and one that was much given to the studies of antiquitie, wailing his inward griefe, with outward mirth comforted them with cheerefulnesse of countenance, as well as persuading them that offended to repose affiance in God, and the King his mercie, and such as were not of that conspiracie to relie to their innocencie, which they should hold for a more safe and strong barbican than any rampire of Castell of brasse. Thus solacing the sillie mourners sometime with smiling, sometime with singing, sometime with grave and pittie apophthegmes, he craved of the owner the name of the barke; who having
  • 39. answered, that it was called the Cow, the gentleman sore appalled thereat, said: ‘Now, good brethren, I am in utter despaire of our returne to Ireland, for I beare in mind an old prophecie, that five earles, brethren, should be carried in a Cowes bellie to England, and from thense never to returne’. “Whereat the rest began afresh to howle and lament, which doubtlesse was pitifull, to behold five valiant gentlemen, that durst meet in the field five as sturdie champions as could be picked out in a realme, to be so suddenlie terrified with the bare name of a woodden cow, or to fear like lions a sillie cocke his combe, being moved (as commonlie the whole countrie is) with a vaine and fabulous old wives’ dreame. But what blind prophesie soever he read, or heard of anie superstitious beldame touching a cow his bellie, that which he foretold them was found true. For Thomas Fitzgirald the third of Februarie, and these five brethren his uncles were drawne, hanged, and quartered at Tiburne, which was incontinentlie bruted as well in England and Ireland, as in foren soyles.” In the midst of his arrangements for divorce the vengeance of Henry viii. fell upon a witless girl who was known as “The Holy Maid of Kent.” She had become imbecile from frequent epileptic fits. Masters, the vicar of Addington, and Dr. Bocking, a Canon of Canterbury, tutored her to predict, as it suited their own ends, that Henry viii. would lose his kingdom and die a violent death if he cast aside Catherine of Arragon, and married Anne Boleyn. The final scene of this diabolical influence of strength over weakness was that the girl and her abettors were hanged and beheaded at Tyburn, her head being set on London Bridge, and those of the men on the City gates.
  • 40. LONDON BRIDGE (Showing heads displayed). From a Print in Magdalene College, Cambridge. We have little idea of the tremendous religious antagonism of those days, an antagonism which brought so many poor sufferers to the gibbet at Tyburn. Indeed, so determined were those in power to extirpate all remains of Roman Catholicism, that a search was actually instituted from house to house, and all rosaries and other objects savouring of Romanism were destroyed. That a man was priest, open or disavowed, during that fierce struggle between Henry viii. and the Church which he had overthrown and despoiled, was sufficient to condemn him to suffer under Tyburn’s fatal tree: “The 8 of October last before passed I. Low, I. Adams, and Richard Dibdale, being before condemned for treason, for being made Priests by authority of the Bishop of Rome, were drawne to Tyborne, and there hanged, bowelled, and quartered. “The 18 of Februarie, Harrington, a seminary priest, was drawne from Newgate to Tyborne, and there hanged, cut downe alive, struggled with the hangman, but was bowelled and quartered.” Elizabeth, too, found the terrors, which the very name of Tyburn instilled into the minds of her subjects, useful in maintaining public order and punishing plotters against her personal welfare. The gibbet, indeed, became a corrector of manners. In the middle of the sixteenth century, after the closing of the monasteries, the peasantry found it difficult to find work on the countryside, and thus it was that they flocked to London in hundreds seeking employment, in exactly the same way that thousands of the poor do to-day. The results, however, are different. In our times we house them in workhouses, feed them in soup-kitchens, and allow them to sing in our roads, until they make life hideous. We encourage them in every way until the street loafer is a curse to London, and the want of labourers in the country an unceasing cry.
  • 41. This is our modern way of creating mendicity. Formerly they were not so foolish, though perhaps too severe. Any one caught begging, or aimlessly wandering about, was seized, ordered to be whipped, and sold as a chattel. Thus it was that hundreds of these poor creatures were shipped off to the West Indies and the early American colonies. Travelling in those days was not so luxurious as it is now, and many of them died on the way. Those who remained behind were even worse treated. They were often ruthlessly beaten and continually starved; they were, in fact, brought to such dire distress that they were bought and sold as mere slaves. How surprised the loafers, who bury their noses in mother earth and sleep by the hour on the green grass of Hyde Park, would be if such drastic measures were applied to them; but surely some happy medium between the hanging of the sixteenth century and the encouragement of loafing of the twentieth might be found. Punishments were altogether more severe in those days, and even as late as the end of the eighteenth century batches of men, women, and children were hanged at Tyburn for deeds which would hardly be punished nowadays, and, any way, would not be reproved by more than a day or two in prison. In fact, when the last century dawned, there were no less than two hundred and twenty-three capital offences. Even soldiers and sailors, who are still noted for their jollities on landing from distant climes, were marched to the scaffold in the “good old times.” “Sir John Norris and Sir Francis Drake, being returned, as ye have heard many of their Saylers, and souldiers, shortly after their landing fell sick, and died of a stanch bred amongst them on shippe board, other some of them so rudely behaved themselves about the countrey, about the Court, and elsewhere, that many men misliked of their doings, and divers of them being apprehended, on the twenty 7 of August one was hanged on the end of a signe at an Inne doore in the Towne of Kingstone-uppon-Thames, for a terror to the rest. The twenty
  • 42. nine of August, two more were hanged in Smithfield, two at the Tower Hill, two besides at Westminster, and one at Tiburn” (Stow). An Irishman who had shown marked disrespect to the Virgin Queen received equally short shrift. Bren O’Royrke was arraigned at Westminster on the 28th October 1591, and found guilty of high treason on ten different charges. Stow (Annals) records what was doubtless the most grave of them: “That the said O’Royrke, a Dremaher aforesaide, caused the picture of a woman to bee made, setting to her her Majestie’s, and caused it to be tyed to an horse tayle, and to bee drawne through the mire in derision of her Majestie. And after caused his Calliglasses to hew the same in pieces with their axes, uttering divers traiterous and rebellious words against her Majestie.” When before his judges, he refused to plead unless he was remanded for a week to allow a lawyer to come from Ireland, and to receive the counsels of his friends. But he was told that if he maintained his contemptuous attitude judgment must be given, and he was guilty of his own death; and the interpreter, one John Ly, expounded his sentence in all its gruesome detail. We learn that “Uppon Wednesday, being the third of November, Bren O’Royrke was drawne to Tyborne and there hanged”—leaving out the disgusting after-business. But before this was done, John Ly and the Archbishop of Cashel exhorted him to crave God and the Queen’s forgiveness. “O’Royrke turned upon him and sayde, hee had more neede to looke to him selfe, and that he was neither here nor there.” After his death “his heart was holden up by the hangmanne, naming it to be the arch traytor’s heart, and then did he cast the same into the fire.” The execution of Dr. Lopez and his confederates for plotting with the Spaniards to poison Queen Elizabeth is graphically depicted in Treason and Plot, by Martin Hume. The execution took place early in June 1594:
  • 43. “All England was in a ferment of indignation owing to the revelations made by Ferreira and Tinoco, and the heat introduced into the accusations against Philip and his ministers by the Essex party: and at length, early in June, 1594, the three poor wretches, bound to hurdles, were dragged up Holborn to Tyburn, and the penalty of treason was paid by all of them, with sickening barbarity, exceeding even the usual awful rites. It is related that one of the three, probably Tinoco who was the youngest, recovered his feet after the hanging, and, mad with pain and desperation, attacked the executioner. The crowd applauding his pluck, broke through the guard and formed a ring to witness the unequal fight. Two burly ruffians came to the hangman’s help, but one was immediately felled by a blow from the prisoner, who kept the other at bay for some time. The half- strangled creature was at length stunned by a blow upon the head, and the disembowelling then proceeded. Dr. Lopez in vain tried to speak to the vast scoffing crowd. Almost incoherent with agitation he solemnly protested his innocence: mocking laughter and ribald interruption alone greeted his despairing cry. He was unfortunately inspired to say that he loved his mistress better than his Saviour Jesus Christ: and this coming from a Jew so incensed the multitude that the tumult silenced all else, and Ruy Lopez went to his death leaving his final secret to be guessed by others.” Major Hume was apparently convinced that Lopez was really innocent of an intention to kill Elizabeth. He was guilty of an intention to poison Don Antonio, the Portuguese pretender; and he had also pretended a plot against the Queen in order to get money out of the Spaniards; so in any case he was rightly punished. The dreadful tale of horrors might be continued almost interminably. One willingly passes over in silence many other sufferers, to include just one more notable scene at Tyburn, when, under remarkable circumstances, the gallows took a curious part in reforming fashion in the reign of James i.
  • 44. Plots grew thick and fast under the first of the Stuarts, as under his predecessors. The murder of Sir Thomas Overbury differed from most, inasmuch as it was designed to satisfy private vengeance rather than an intrigue against the State. Overbury had done all in his power to prevent the Earl of Somerset from marrying the Countess of Essex, and had thus won her hatred. She poisoned the mind of the Earl against his friend, and he, in turn, influenced the King. So when Sir Thomas refused to be sent as ambassador to Brussels, James I. was easily persuaded to imprison him in the Tower. There Overbury languished and died. The Earl and Countess of Somerset were brought to trial, with their four accomplices, for encompassing his death. The principals escaped, but their accessories were condemned, and one Weston and Mrs. Turner were hanged at Tyburn in 1615. This murder was committed, if the evidence is to be believed, with the utmost perseverance. Witchcraft, which was believed in firmly at that time, was attributed to Mrs. Turner. It was alleged in the trial that seven forms of poison were given by her to Sir Thomas Overbury. Arsenic was mixed with his salt; when he asked to have some “pig” for dinner, she put into it lapis cortilus, and cantharides was added to the sauce instead of pepper. The execution of Mrs. Turner excited immense interest. She had made herself famous in the fashionable world as the inventor of a yellow starch. In allusion to this circumstance, Lord Chief-Justice Coke—who had already addressed her in sufficiently contumelious terms, telling her categorically that she had been guilty of the seven deadly sins—declared that as she was the inventor of yellow starched ruffs and cuffs, he hoped that she would be the last by whom they would be worn. Accordingly, he gave strict orders that she should be hanged in the very uncomfortable attire she had made so fashionable. This amusing addition to the sentence was strictly carried out. The fair demon Mrs. Turner, on the day of her execution, came to the scaffold arrayed as if for some festive occasion, with her face mightily rouged, and a wide ruff, stiffened with yellow starch, around her neck. Numerous persons of quality, ladies as well as gentlemen,
  • 45. went in their coaches to Tyburn to see the last of her. The yellow ruff was never worn from that day. Yellow starch had rendered Society stiff and uncomfortable, and Society was only too pleased to discard its use when the originator of the fashion came to this ignominious end.
  • 47. CHAPTER IX BENEATH THE TRIPLE TREE Exactly the date at which the dreaded instrument at Tyburn assumed the form of the “Triple Tree” cannot be told. As has already been said, there is reason to believe that a permanent structure—“the common gallows” of the time—was set up in the district known as Tyburn in the closing years of the fourteenth century; and that the site was a little more eastward, beyond the present area of the Park, than the later place of execution. What particular plan the earlier structure took can only be surmised. One is inclined to think that the gallows, like other and better inventions of civilisation, underwent stages of development; that from the branch of the growing elm the old gibbet, with its single beam and angle bar, was first devised, and that the two upright posts with the crossbeam followed. In all probability the gallows was then built high, so that the victim who paid the last penalty of the law swung clear above the heads of the crowd gathered to witness the execution. No doubt this gruesome spectacle was intended to strike awe into the hearts of the beholders. But human nature, being a thing perverse, is not always understood. Its most disastrous result on the manners of the time was rather to glorify crime and criminal. A fitting end at Tyburn gave distinction to many a poor rogue who otherwise would have left the world unhonoured and forgotten. Four centuries of Tyburn’s rough justice did less for the suppression of crime than more enlightened and humane efforts have done in the course of comparatively few years. The triangular plan had already been adopted in Shakespeare’s time, and probably long before, as references to it imply a common knowledge. In Love’s Labour Lost, one of his earlier plays, he has Biron saying:
  • 48. “Thou makest the triumviry the corner cap of Society, The shape of Love’s Tyburn that hangs up simplicity.” In an old quarto of 1589 occurs the passage:2 “Then let me be put on Tyburn, that hath but three quarters.” Only thirteen years earlier, Gascoigne, strangely enough, speaks of “Tyborne Cross.” The gallows where so many highwaymen of the late seventeenth and eighteenth centuries were, in the phrase of the day, “turned off,” is shown in the drawings of Hogarth and a host of others, as well as in maps of contemporary date. At each of the three corners of a triangle a stout upright post was set in the ground. In some cases two cross beams are seen fastened to the tops of these posts, in others three, forming a sort of triangular enclosure. It was quite low, rising not more than twelve feet from the ground, and giving just enough room for the malefactor’s cart to pass beneath. So thorough have been the measures taken to sweep Tyburn and all its associations out of the Metropolis, since the fashionable area of the town extended westward, that the particular spot on which stood the “Triple Tree” is also left uncertain. It can, however, be pretty closely approximated. It was never actually within the Royal Park, but was just beyond its northern boundary, standing back from the high road to Uxbridge, about a hundred yards west of the Marble Arch. A house near the corner of Connaught Square is believed to be built on the actual site of Tyburn gallows, which originally stood on the rise, where the ground was open to the Park. The “Triple Tree” was, however, moved to the triangular space now forming the entrance to the Edgware Road, early in the eighteenth century. I do not know if ghosts are ever seen about Connaught Square. I can find no trace of spectral visitors disturbing the well-to-do people who pass their lives agreeably in this now fashionable quarter. But if there be any truth in psychical phenomena,—if, indeed, it be a fact that the unsubstantial shades of men love in the stillness of the night to revisit the scenes where they met a violent end,—surely
  • 49. they should marshal here, not singly nor in groups, but in whole battalions, creeping between the motor broughams which noiselessly come and go, or the busier traffic which runs along by Park Lane and Oxford Street. When King Charles ii. came back “to his own” in 1660, the triangular gallows at Tyburn was evidently a structure of respectable antiquity. Already it was known to all the populace by its nickname of the “Triple Tree,” which it kept for more than a century. Death was a common state at Tyburn; it was, however, reserved for this strange, easy-going, good-natured voluptuary to hang men who were already dead there. Amid all the horrible scenes enacted at Tyburn, none are more ghastly than the stupid, purposeless indignities wreaked by Charles and his licentious Parliament, a year after his restoration, on the bodies of the regicides, whom death had withdrawn from his active vengeance. The story is briefly told in the little weekly sheet which served the purpose of a newspaper in those days:3 “This day, Jan. 30, (we need say no more but name the day of the Moneth) was doubly observed, not onely by a Solemn Fast, Sermons and Prayers at every Parish Church, for the precious of our late pious Sovereign King Charles the First of ever glorious Memory; but also by publick dragging those odious carcasses of Oliver Cromwel, Henry Ireton, and John Bradshaw, to Tyburne. On Monday night, Cromwel and Ireton were drawn to Holborn from Westminster, where they were digged up on Saturday last, and the next morning Bradshaw. To-day they were drawn upon Sledges to Tyburne; all the way (as before from Westminster) the universal out-cry and curses of the people went along with them. When these three carcasses were at Tyburn, they were pull’d out of their Coffins, and hang’d at the several angles of that Triple Tree, where they hung till the Sun was set; after which, they were taken down, their heads cut off, and their loathsome trunks thrown into a deep hole under the gallows.”
  • 50. So the mutilated corpses of Cromwell, of Ireton, his statesmanlike general and brother-in-law, and Bradshaw, the president at the trial of Charles I., drawn in their shrouds from their tombs in the quiet of Henry the Seventh’s Chapel at the Abbey, gibbeted until sundown as objects for the ridicule and derision of a demoralised mob, and then decapitated, were flung “into a deep hole under the gallows.” And there they may remain until this day. Who knows? The cemetery for the unnamed dead, which extended from the fatal tree towards the Marble Arch, was dug up when hangings ceased on this spot, and it is probable that the unrecognised bones of Cromwell, Ireton, and Bradshaw were in that process swept into oblivion. The heads had been spiked on poles in front of Westminster Hall. The grave has gone; the remains have perished. No vestige of the honoured dead survives; in spite of Cromwell’s gorgeous funeral, his remains are not even located. That is just where history awakens us from musings to the unexpected reality of things. Of all the vanities of life, assuredly the love of funeral pomp and show is the most vain; and that strange vanity Cromwell—hard, narrow, cold though he might be—seems to have shared to an extravagant degree. He had arranged for himself a gorgeous funeral, and one glances with amazement at the documents of the year 1658, when the burial of the Protector had to be put off from 9th November to 23rd November (he died on 3rd September) as the elaborate arrangements for the event could not be completed by the earlier date. During the short Protectorate of Richard Cromwell, sums were voted to the amount of £18,600 for expenses and mourning, and so many claims were brought forward for settlement, that nearly a year later, on 4th July 1659, a Committee was appointed to inquire into the money still owing. They reported that £19,303, 0s. 11d. was the properly audited account, and this merely for baize, cloth, velvet, and fringes. This sum represents about £80,000 of our present money; so that an estimate of £150,000 can hardly be too large for the expenses of Oliver Cromwell’s funeral. Apart from these outrages on the dead, Tyburn witnessed the final scenes in the lives of two military officers, Hacker and Axtele, who
  • 51. had guarded Charles I., and of at least three of the judges, Okey, Barkstead, and Corbet, who had pronounced sentence upon him. Others of the regicides were done to death at Charing Cross, with all the barbarous additions of drawing, decapitating, and quartering. It seems singular that these revolting scenes, relics of an earlier and, one would have thought, a more brutal age, occasioned no condemnation from the finer spirits of the day. Old Pepys, amiable and gossipy on whatever subject passed under his notice, was only led by the executions to a pious and somewhat inapposite reflection, “Wonderful are the ways of Providence!” And the courtly Evelyn, who had the grace to secretly disapprove of them, contents himself with writing in his Diary: “I saw not the executions, but met their quarters, mangled, cut, and reeking, as they were brought from the gallows on a hurdle.” In 1908 one of the former victims of Tyburn was canonised, a fact that brings the past and to-day into close proximity. The history of Oliver Plunket—a name well known in Ireland—is both romantic and sad. Celebrated as a high-minded and high-living Archbishop of Armagh, Oliver Plunket ended his days at Tyburn in 1681, a victim of the “Popish Plot.” After spending more than two and a half years in dungeons, first in Dublin and then in Newgate, he was hanged, drawn, and quartered. His body was buried in St. Giles’s-in-the- Fields by Father Corker, who had been his companion in Newgate. His head was sent to Rome to Cardinal Howard, and brought back to Ireland in 1722, and is preserved in the Convent of Drogheda, which was founded by his great-niece. In fact, all honour was paid to his remains as relics. When Father Corker buried the body he cut off the arms, one of which was long preserved in Herefordshire, and one in the Franciscan Convent at Taunton. This priest afterwards sent the body to Germany, but when the English monks were expelled from that country in 1803, Plunket’s body was brought back to England, and buried at St. Gregory’s Monastery, Downside, Bath.
  • 52. Truly a tragic history, and one fraught with so much valour and strength of character, that the Irish must feel proud of the dignity of canonisation now bestowed on their hero. The Rye House Plot against the lives of Charles II. and his brother, then James, Duke of York, was the means of another distinguished man, Sir Thomas Armstrong, suffering an ignominious end on Tyburn’s fatal tree. Later, a further victim was claimed in Elizabeth Gaunt, who had sheltered one of the conspirators. After the failure of the plot Armstrong fled to Holland, but was seized at Leyden in 1684, and conveyed to England, swearing his innocence. He was taken before Judge Jefferies, and when again he insisted on his innocence, protested against the perjured evidence, and asked for nothing but the free course of the law, Jefferies said “he should have it to the full”; and so ordered his execution within six days. Like a common malefactor, the knight was dragged through the streets to Tyburn on a hurdle, and was there hanged and quartered. Bishop Burnett says that one of the quarters was sent to Stafford, which place Armstrong represented in Parliament. The execution of Elizabeth Gaunt was a still more shameless affair, and bears witness to the degeneracy and brutal inhumanity of the times. She was then an old woman, well known for her good works in helping the afflicted and visiting the prisoners. Among those who took part in the Rye House Plot was one James Burton, for whose apprehension a reward was offered. Chance led him in the way of Elizabeth Gaunt, who assisted him to the utmost of her power, and sent him in a boat to Gravesend, whence he escaped to Amsterdam. He was supplied with a large sum of money by his benefactress. On Monmouth’s landing in England to raise the standard of rebellion in 1685, Burton came among his following, fought in the hopeless fight at Sedgemoor, and after the rout fled to London, where he took refuge in the house of John Fernley, a barber in Whitechapel. Fernley was poor, and his creditors were troubling him. Yet, though he knew the Government were offering £100 for Burton, he would not betray him. The wretch, whom he was thus sheltering, had no such scruples. Finding that James II. was dealing out punishment more severely to those who sheltered rebels, than to
  • 53. 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