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

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

The document is about the book 'Programming Microsoft SQL Server 2000 with Microsoft Visual Basic .NET' by Rick Dobson, which provides guidance on programming SQL Server solutions using Visual Basic .NET. It includes various topics such as data access, programming views and stored procedures, and managing XML with Visual Basic .NET. The book aims to equip developers with the necessary skills to effectively utilize SQL Server and Visual Basic .NET in their projects.

Uploaded by

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

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

The document is about the book 'Programming Microsoft SQL Server 2000 with Microsoft Visual Basic .NET' by Rick Dobson, which provides guidance on programming SQL Server solutions using Visual Basic .NET. It includes various topics such as data access, programming views and stored procedures, and managing XML with Visual Basic .NET. The book aims to equip developers with the necessary skills to effectively utilize SQL Server and Visual Basic .NET in their projects.

Uploaded by

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

Programming Microsoft SQL Server 2000 with

Microsoft Visual Basic NET 1st edition Edition


Rick Dobson download

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

Explore and download more ebooks or textbooks


at ebookultra.com
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 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
Program m ing Microsoft ® SQL Server™ 2000 wit h Micr osoft Visual
Basic® .NET

Foreword

Acknow ledgm ent s

I nt roduct ion
Who’s t he Book For?
What ’s Special About This Book?
How’s t he Book Organized?
Syst em Requirem ent s
Sam ple Files
Support

1. Get t ing St art ed w it h Visual Basic .NET for SQL Serv er 2000
Visual St udio .NET, t he Visual Basic .NET I DE
An Overv iew of ADO.NET Capabilit ies
A St art er ADO.NET Sam ple
Using Query Analyzer

2. Tables and Dat a Types


Chapt er Resources
Dat a Types for Tables
Scr ipt ing Tables

3. Pr ogram m ing Dat a Access wit h T- SQL


I nt r oduct ion t o Dat a Access wit h T- SQL
Aggregat ing and Grouping Rows
Processing Dat es
Joins and Subquer ies

4. Pr ogram m ing Views and St ored Procedures


I nt r oduct ion t o Views
Creat ing and Using Views
Views for Rem ot e and Het erogeneous Sources
I nt r oduct ion t o St ored Procedur es
Creat ing and Using St or ed Procedures
Processing St or ed Procedur e Out put s
I nsert ing, Updat ing, and Delet ing Rows
Program m ing Condit ional Result Set s

5. Pr ogram m ing User - Defined Funct ions and Tr iggers


I nt r oduct ion t o User - Defined Funct ions
Creat ing and I nv ok ing Scalar UDFs
Creat ing and I nv ok ing Table- Valued UDFs
I nt r oduct ion t o Tr iggers
Creat ing and Managing Tr iggers

6. SQL Serv er 2000 XML Funct ionalit y


Overv iew of XML Support
XML Form at s and Schem as
URL Access t o SQL Serv er
Tem plat e Access t o SQL Server

7. SQL Serv er 2000 Secur it y


Overv iew of SQL Serv er Secur it y
I nt r oduct ion t o Special Securit y I ssues
Sam ples for Logins and Users
Sam ples for Assigning Perm issions

8. Overv iew of t he .NET Fram ework


An I nt r oduct ion t o t he .NET Fram ework
An Overv iew of ASP.NET
XML Web Ser v ices

9. Cr eat ing Windows Applicat ions


Get t ing St art ed w it h Windows For m s
Creat ing and Using Class References
I nher it ing Classes
Program m ing Event s
Except ion Handling for Run- Tim e Err ors

10. Progr am m ing Windows Solut ions w it h ADO. NET


An Overv iew of ADO.NET Obj ect s
Making Connect ions
Wor k ing w it h Com m and and Dat aReader Obj ect s
Dat aAdapt ers , Dat a Set s, Form s, and Form Cont rols
Modify ing, I nsert ing, and Delet ing Rows

11. Progr am m ing ASP.NET Solut ions


Rev iew of ASP.NET Design I ssues
Creat ing and Running ASP.NET Solut ions
Session St at e Managem ent
Dat a on Web Pages
Validat ing t he Dat a on a Web Page

12. Managing XML wit h Visual Basic .NET


SQL Ser ver Web Releases
Overv iew of XML Technologies
Generat ing XML Docum ent s wit h t he .NET Fram ework
Dy nam ically Set t ing an XML Result Set
The I nt erplay Bet w een XML and Dat a Set s
Creat ing HTML Pages wit h XSLT

13. Cr eat ing Solut ions wit h XML Web Ser v ices
Overv iew of Web ser v ices
A Web Serv ice t o Ret ur n a Com put ed Result
A Web Serv ice t o Ret ur n Values from Tables
The SQL Ser ver 2000 Web Ser v ices Toolk it
Mor e on Populat ing Cont rols wit h Web Ser vices

About t he Aut hor


For e w or d
During m y five years at Micr osoft , I ’v e been helping developers underst and
t echnologies such as Microsoft Visual St udio, Microsoft SQL Ser ver, and Micr osoft
Office Developer. Dur ing t he past t wo years, I hav e w orked on t he Microsoft
Office XP Visual Basic Language Refer ence, and now, t he MSDN Office Dev eloper
Cent er. I n t he m ont hly colum n on MSDN, Office Talk, I have wr it t en art icles t o
help Office developers underst and t he .NET plat for m and how it affect s t heir
curr ent and fut ure developm ent effort s.
As I wr it e t his for ew ord t o Rick Dobson’s book on program m ing Microsoft SQL
Ser ver solut ions wit h Microsoft Visual Basic .NET, I t hink back t o m y own
experiences dev eloping soft war e applicat ions w it h Visual Basic. My first
experience wit h Visual Basic was lear ning t he language using v ersion 3.0. I
rem em ber pick ing up m y first Visual Basic beginner’s book and being excit ed as I
dev eloped m y first few “ Hello, Wor ld” applicat ions. I couldn’t believ e how quick
and easy it was t o dev elop soft ware applicat ions t hat operat ed sim ilar ly t o ot her
popular sharewar e program s of t hat t im e.
Howev er, dur ing t hat t im e I also discov er ed som e of t he short com ings of Visual
Basic as an ent erpr ise- lev el developm ent language. I t was t hen t hat I t ur ned m y
at t ent ion t o C+ + . I r em em ber being v ery frust rat ed at t r y ing t o lear n t he
language, t ry ing t o underst and concept s such as point ers, m em ory allocat ion,
and t rue obj ect - or ient ed program m ing. I t ook classes on C+ + at t he local
universit y , but I got even m or e fr ust rat ed hav ing t o wait m ont hs unt il I was
t aught how t o cr eat e t he sim plest Micr osoft Windows form , som et hing I did in
j ust a couple of m inut es using Visual Basic. I n m y frust rat ion, I gave up t ry ing t o
lear n C+ + and hav e been using Visual Basic t o dev elop soft ware applicat ions ever
since.
As each new v ersion of Visual Basic was r eleased, I readied m yself t o learn new
soft war e developm ent t echnologies. First it was Act iveX cont rol developm ent .
Then it was calling t he Windows API . Next it was DHTML Applicat ions. Then it was
dat abase dev elopm ent using Micr osoft SQL Ser ver. I t alw ays seem ed as t hough I
had t o lear n a new language and a new developm ent paradigm for ev er y new
t echnology t hat cam e along. I kept t hink ing t hat t her e had t o be an easier and
m or e unified appr oach.
Well, now w e’ve r eached t he adv ent of t he Micr osoft .NET plat form , and wit h it , a
revolut ion in t he Visual Basic language, Microsoft Visual Basic .NET. I believ e t hat
Visual Basic .NET will pr ov ide soft ware dev elopers wit h new opport unit ies for
quickly and easily designing int egrat ed soft war e applicat ions t hat connect
businesses and indiv iduals anyt im e, anyw her e, and on v irt ually any soft ware
dev ice. Wit h advances in t he Visual Basic .NET language, Visual Basic . NET
dev elopers will finally be on a par w it h t heir C+ + and C# count erpart s,
part icipat ing in m any high- end dev elopm ent pr oj ect s. Wit h Visual St udio .NET
feat ur es such as cross- language debugging, along w it h Visual Basic .NET
conform ance t o t he com m on t ype syst em and t he com m on language r unt im e,
organizat ions can drive down t heir developm ent cost s by t apping int o t he w ide
range of sk ills t hat Visual Basic .NET dev eloper s now possess.
Tr ue obj ect - orient ed pr ogram m ing is now available in Visual Basic .NET, including
feat ur es such as inher it ance and m et hod ov er loading. I t ’s now sim pler t o call t he
Windows API by using t he .NET Fram ew or k Class Libraries. Web applicat ion
dev elopm ent is now as easy as dev eloping Windows form s–based applicat ions.
Dat abase applicat ion developm ent is m ade easier by unit ing disparat e dat a obj ect
libraries such as DAO, RDO, OLE DB, and ADO under ADO. NET, ut ilizing t he
power of XML t o consum e and t ransm it r elat ional dat a ov er com put er net w orks.
And a new t echnology, XML Web serv ices, allows Visual Basic .NET developers t o
host t heir soft ware applicat ions’ logic ov er t he Web. Addit ionally , a big issue for
soft war e developers t oday is t hat of soft war e applicat ion deploym ent and
versioning. I f y ou don’t agree, j ust ask any soft ware dev eloper about “ DLL hell,”
and y ou’re bound t o get an earful. For m any .NET applicat ions, t he .NET plat form
feat ur es “ copy and past e” or XCOPY deploym ent . ( Users sim ply copy y our
applicat ion files from t he source m edia t o any single direct ory and r un t he
applicat ion. ) And because .NET no longer r elies on t he r egist ry , virt ually all DLL
com pat ibilit y issues go away.
Wit h t his book, Rick aim s t o give you t he sk ills y ou need t o pr ogram SQL Serv er
solut ions wit h Visual Basic .NET. I k now y ou w ill find Rick’s book helpful. Rick
brings his exper ience t o bear from t hree prev ious books: Pr ogram m ing Micr osoft
Access Version 2002 ( Microsoft Press, 2001) , Pr ogram m ing Micr osoft Access 2000
( Micr osoft Press, 1999) , and Pr ofessional SQL Serv er Developm ent wit h Access
2000 ( Wr ox Pr ess I nc., 2000) . Rick also br ings his exper ience of leading a
successful nat ionwide sem inar t our. Mor e im port ant , I know y ou w ill enj oy Rick ’s
book because of his deep int erest in Visual Basic .NET and SQL Ser ver, and in
helping y ou, t he pr ofessional dev eloper, underst and and apply t hese t echnologies
in y our daily soft ware applicat ion dev elopm ent proj ect s.
Paul Cornell MSDN Office Dev eloper Cent er
ht t p: / / m sdn.m icr osoft .com / officeMicrosoft Corporat ion February 2002
Ack now le dgm e nt s
This sect ion offers m e a chance t o say t hank you t o all w ho helped m ak e t his
book possible. I wish t o offer special recognit ion t o five support r esources.
First , t he folks at Microsoft Press have been fant ast ic. Dave Clar k, an acquisit ions
edit or , select ed m e t o w rit e t he book j ust m ont hs aft er I com plet ed anot her book
for Microsoft Press. Dick Br ow n, m y pr oj ect edit or, st aunchly st ood up for his
percept ion of how t o m ake t he book ’s organizat ion and cont ent clear t o y ou
wit hout being pet t y or bor ing t o m e. Dick also light ened m y load subst ant ially by
show ing a real k nack for edit ing m y t ext w it hout dist ort ing t he or iginal int ent .
When Dick was especially busy, he handed off som e of his load t o Jean Ross, who
also did an adm irable j ob. Ot hers at Micr osoft Press who cont r ibut ed t o m y w ell-
being in one way or anot her include Aar on Lavin and Anne Ham ilt on.
Second, I had excellent wor k ing r elat ions wit h sev eral professionals w it hin
Micr osoft . Paul Cor nell, a widely k now n t echnical edit or at Micr osoft , w as kind
enough t o share his insight s on how t o pr esent .NET concept s com pellingly. I
want t o t hank Paul especially for writ ing t he For eword t o t his book. Kart hik
Rav indran serv ed as t he MSXML Bet a Pr oduct Lead Engineer at Microsoft Pr oduct
Support Serv ices dur ing t he t im e t hat I wrot e t his book. He provided valuable
t echnical cont ent about t he SQL Serv er 2000 Web releases. Ot her Microsoft
represent at iv es pr ov iding m oral and t echnical support for t his book include
Richard Waym ir e and Jan Shanahan.
Third, I want t o express m y appreciat ion t o t he m any r eaders, sem inar
at t endees, and sit e v isit ors w ho t ook t he t im e t o t ell m e what I did right or wrong
for t hem , and also t o t hose w ho shared t heir t echnical support quest ions wit h m e.
I t is t hr ough t his k ind of feedback t hat I am able t o k now w hat ’s im port ant t o
pract icing developers. I encourage y ou t o visit m y m ain Web sit e
( ht t p: / / www .pr ogram m ingm saccess.com ) and sign t he guest book. The ent ry
for m includes space for you t o leave your evaluat ion of t his book or y our quest ion
about a t opic cov er ed in t he book . I prom ise t o do m y best t o r eply per sonally. I n
any ev ent , I definit ely r ead all m essages and use t hem so t hat I can serv e y ou
bet t er w it h fut ur e edit ions of t his, and ot her, books.
Fourt h, I want t o t ell t he w orld how grat eful I am t o m y w ife, Virginia. Wit hout
Virginia’s warm support , lov e, and care, t his book w ould be less professional. She
reliev es m e of near ly ev er y r esponsibilit y around t he house w hen I undert ak e a
book proj ect . I n addit ion, she offers st rat egic advice on t he issues t o address and
t heir st yle of cov erage. When I r un out of t im e, she ev en pit ches in w it h t he
proofreading.
Fift h, it is im port ant for m e t o give praise and glory t o m y Lord and Sav ior, Jesus
Chr ist , w ho I believe gave m e t he st rengt h and wisdom t o w r it e t his book. I n
addit ion, He gav e m e healt h dur ing t he long gest at ion per iod t hat result ed in t he
birt h of t his book . I t is m y prayer t hat t he book pr ov e t o be a blessing t o y ou.
I nt r odu ct ion
Any one w ho buys a book —or considers buy ing it —want s t o k now w ho t he book is
for , w hat set s it apart fr om ot hers lik e it , and how t he book is organized. This
int r oduct ion cov ers t hose t hr ee quest ions, and it also discusses syst em
requir em ent s, sam ple files, and support .

• First , w h o is t h e b ook for ? Ther e ar e at least t wo answers t o t his


quest ion. One answ er is t hat t he book t arget s professional dev elopers
( and ot hers aspir ing t o be pr ofessional dev elopers) . The second group t he
book addr esses is t hose who want t o build full- feat ured, secure SQL
Serv er solut ions wit h Visual Basic .NET.
• Se con d, w h a t ’s sp ecia l a bou t t h e b ook ? I hope you com e t o believ e
t hat t he m ost im port ant answer t o t his quest ion is t hat t he book
consider ed qualit y and dept h of coverage m or e im port ant t han r ushing t o
m arket . The book w ill arr iv e on bookshelv es m or e t han t hr ee m ont hs aft er
t he official release of t he . NET Fram ew ork. I t is m y w ish t hat you der iv e
value from t he ext ra t im e t ak en t o develop t he m any code sam ples and
t he in- dept h discussions of advanced t opics, such as class inher it ance,
ASP.NET, and XML Web serv ices.
• Th ird , h ow is t h e b ook org an iz e d? The short answer is t hat t her e ar e
t wo m ain sect ions. One sect ion int roduces SQL Ser ver concept s as it
dem onst rat es T- SQL ( Tr ansact SQL) pr ogram m ing t echniques. Aft er
conv ey ing SQL Ser ver basic building blocks in t he first part , t he second
part rev eals how t o put t hose part s t oget her w it h Visual Basic .NET and
relat ed t echnologies int o SQL Ser ver solut ions for handling com m on
dat abase chores.

The t hr ee support it em s include a br ief descr ipt ion of t he book’s com panion CD
and how t o use it , Micr osoft Pr ess Support I nfor m at ion for t his book, and a
sum m ary of syst em and soft war e requirem ent s for t he sam ple code pr esent ed in
t he book.

W ho’s t h e Book For ?


This book t arget s pr ofessional Visual Basic and Visual Basic for Applicat ions
dev elopers. From m y sem inar t ours and Web sit es
( ht t p: / / www .pr ogram m ingm saccess.com and ht t p: / / www.cabinc.net ) , I know
t hat t hese professionals ar e dr iven by a passion t o deliv er solut ions t o t heir
client s t hrough applying t he m ost innov at iv e t echnologies t heir client s w ill accept .
I n- house dev elopers are t he go- t o persons for get t ing result s fast — part icular ly for
cust om in- house sy st em s and dat abases. I ndependent developers specialize in
serv ing niche sit uat ions t hat can include under - ser ved business needs and w or k
ov erflows. I n bot h cases, t hese pr ofessionals need t raining m at erials t hat addr ess
pract ical business requir em ent s w hile showcasing innov at ive t echnologies wit hout
wast ing t heir t im e. This book st rives t o ser ve t his broad need in t w o specific
areas.
This book is for developers look ing for code sam ples and st ep- by - st ep inst ruct ions
for building SQL Ser ver 2000 solut ions wit h Visual Basic .NET. The book focuses
on t he int egrat ion of SQL Serv er 2000 w it h .NET t echnologies t apped v ia Visual
Basic .NET. I t is m y fir m belief t hat y ou cannot creat e gr eat SQL Ser v er solut ions
in any program m ing language w it hout k nowing SQL Server. Therefore, t his book
goes beyond t radit ional coverage of SQL Serv er for Visual Basic dev elopers. You’ll
lear n T- SQL pr ogram m ing t echniques for dat a access, dat a m anipulat ion, and
dat a definit ion. A whole chapt er equips you t o secur e your SQL Ser ver solut ions.
I n addit ion, t her e’s plent y of cont ent in t his book on Visual Basic .NET and relat ed
t echnologies, such as ADO.NET, ASP.NET, XML ( Ex t ensible Mark up Language) ,
and XML Web serv ices. The present at ion of t hese t echnologies dem onst rat es
coding t echniques and ex plor es concept s t hat equip y ou t o build bet t er solut ions
wit h SQL Ser ver 2000 dat abases. I n addit ion, t he book highlight s innovat ions
int r oduced t hrough t he Web releases for SQL Serv er 2000 t hat int egrat e SQL
Ser ver 2000 t ight ly w it h Visual Basic .NET.
This isn’t a book about XML, but t hr ee of t he book ’s 13 chapt ers focus in w hole or
in part on XML. Therefore, t hose seek ing pract ical dem onst rat ions of how t o use
XML w it h SQL Ser ver and Visual Basic .NET w ill deriv e value fr om t his book . I f
you hav e look ed at any of t he com put er m agazines ov er t he past couple of y ears,
you k now t hat XML is com ing t o a solut ion near you. However, t he rapid pace of
XML innovat ion m ay have dissuaded som e fr om j um ping on t he bandwagon w hile
t hey wait t o see w hat ’s going t o last and what ’s j ust a fad. I n t he book’s t hr ee
chapt ers on XML t echnology, you’ll learn about XML docum ent s, fragm ent s, and
for m at t ing as w ell as r elat ed t echnologies, such as XPat h ( XML Pat h Language)
quer ies, XSLT ( Ext ensible St y lesheet Language Transform at ion) , and WSDL ( Web
Ser vices Descript ion Language) .

W ha t ’s Spe cia l Abou t Th is Book ?


Ther e ar e sev eral feat ur es t hat m ake t his book st and apart from t he flood of
books on .NET. One of t he m ost im port ant of t hese is t hat t his book didn’t rush t o
m ark et but rat her shipped m ont hs aft er t he r elease of t he .NET Fram ew ork . This
allowed m e enough t im e t o filt er, exam ine, and uncov er w hat w er e t he m ost
useful and innovat iv e feat ur es for Visual Basic .NET developers building SQL
Ser ver solut ions. For ex am ple, t he book includes a whole chapt er on creat ing
solut ions wit h XML Web serv ices. That chapt er includes t wo m aj or sect ions on t he
SQL Ser ver 2000 Web Serv ices Toolk it , w hich didn’t ship unt il t he day of t he .NET
Fram ew ork release.
The .NET Fram ew ork cont ent is at a professional lev el, but it isn’t j ust for t echies.
This book doesn’t assum e any pr ior know ledge of t he .NET Fr am ew ork . I t does
assum e t hat you get paid for building solut ions program m at ically and t hat at least
som e of t hose solut ions are for SQL Serv er dat abases. Ther efor e, t he book
explains basic .NET concept s and dem onst rat es how t o achiev e pract ical result s
wit h t hose concept s t hr ough a huge collect ion of .NET code sam ples.
This book is about building solut ions for SQL Ser ver 2000. I include coverage of
t he m any special feat ur es t hat t ie Visual Basic .NET and SQL Serv er 2000 closely
t o one anot her. Alt hough t here is coverage of general .NET dat abase t echniques,
t his book div es deeply int o T- SQL pr ogr am m ing t echniques so t hat y ou can creat e
your own cust om dat abase obj ect s, such as t ables, st or ed pr ocedur es, views,
t riggers, and user - defined funct ions. I n addit ion, t her e is separat e cov erage of
t he XML feat ures released w it h SQL Serv er 2000 as well as separat e coverage of
t he XML feat ures in t he first t hr ee Web releases t hat shipped for SQL Ser ver
2000. There ar e num er ous code sam ples t hroughout t he book. These will equip
you t o build solut ions w it h Visual Basic .NET, T- SQL, and com binat ions of t he t wo.
Finally, t his book is special because of t he unique exper iences of it s aut hor, Rick
Dobson. I have t rained professional dev elopers in Aust ralia, England, Canada,
and t hr oughout t he Unit ed St at es. This is m y fourt h book in four years, and you
can find m y art icles in popular publicat ions and Web sit es, such as SQL Serv er
Magazine and MSDN Online. As a Webm ast er , m y m ain sit e
( ht t p: / / www .pr ogram m ingm saccess.com ) serv es hundr eds of t housands of
sessions t o dev elopers each y ear. I const ant ly ex am ine t heir v iewing habit s at t he
sit e t o det erm ine w hat int erest s t hem . I n addit ion, m y sit e feat ures scores of
answers t o t echnical support quest ions subm it t ed by professional developers. My
goal in offer ing answers t o t hese quest ions is t o st ay in t ouch w it h pract icing
dev elopers wor ldw ide so t hat m y new book s address t he needs of pract icing,
professional dev elopers.

H ow ’s t h e Book Or ga n ized?
Ther e ar e t wo m ain part s t o t his book t ied t oget her by an int roduct ory part . Part
I I , t he first m ain part , dwells on SQL Ser ver t echniques. Part I I I builds on t he
SQL Ser ver background as it lays a firm foundat ion in .NET t echniques for Visual
Basic .NET dev elopers. Part I , t he int r oduct ory part , dem onst rat es way s t o use
SQL Ser ver and Visual Basic .NET t oget her.

Pa r t I , I nt r odu ct ion

Part I , w hich includes only Chapt er 1, has t hree m ain goals. First , it acquaint s y ou
wit h t he basics of Visual Basic .NET w it hin Visual St udio .NET. You can t hink of
Visual Basic .NET as a m aj or upgrade t o t he Visual Basic 5 or 6 t hat you are
probably using cur rent ly . This first sect ion int r oduces som e concept s t hat you w ill
find useful as y ou init ially learn t he landscape of Visual Basic .NET. The second
goal of Chapt er 1 is t o int r oduce ADO.NET. I f y ou t hink of Visual Basic .NET as a
m aj or upgrade t o Visual Basic 6, ADO. NET is m or e lik e a m aj or overhaul of ADO.
I n t wo sect ions, you get an int roduct ion t o ADO.NET classes— part icular ly as t hey
relat e t o SQL Serv er— and y ou get a chance t o see a couple of beginner sam ples
of how t o creat e SQL Serv er solut ions w it h Visual Basic .NET and ADO.NET. The
t hird goal of t he int roduct ory part is t o ex pose y ou t o Query Analy zer . This is a
SQL Ser ver client t ool t hat ships w it h all com m ercial edit ions of SQL Ser ver 2000.
You can t hink of it as an I DE for T- SQL code. Most of t he book’s first par t relies
heav ily on T- SQL, and t her efor e hav ing a conv enient env ir onm ent for debugging
and running T- SQL code is helpful. The final sect ion of Chapt er 1 addresses t his
goal.

Pa r t I I , SQL Se r v e r

Part I I consist s of six r elat iv ely short chapt ers t hat focus subst ant ially on
program m ing SQL Serv er 2000 w it h T- SQL. Chapt er 2 and Chapt er 3 int r oduce T-
SQL and SQL Serv er dat a t ypes. I f y ou ar e going t o program SQL Ser ver and
creat e efficient , fast solut ions, y ou m ust lear n SQL Ser ver dat a t ypes, which is
one of t he m ain point s conveyed by Chapt er 2. Many r eaders w ill grav it at e t o
Chapt er 3 because it int roduces cor e T- SQL pr ogram m ing t echniques for dat a
access. You’ll apply t he t echniques covered in t his chapt er oft en as y ou select
subset s of r ows and colum ns in dat a sources, group and aggregat e row s from a
t able, pr ocess dat es, and j oin dat a fr om t w o or m or e t ables. Chapt er 3 also
considers special dat a access t opics, such as out er j oins, self j oins and
subquer ies.
The next pair of chapt er s in Part I I , Chapt er 4 and Chapt er 5, t ak e a look at
program m ing dat abase obj ect s t hat you w ill use for dat a access and dat a
m anipulat ion, such as v iews, st ored procedures, user - defined funct ions, and
t riggers. These dat abase obj ect s are im port ant for m any reasons, but one of t he
m ost im port ant is t hat t hey bundle T- SQL st at em ent s for t heir easy r euse. I t is
widely k now n t hat t he best code is t he code t hat you don’t hav e t o wr it e.
Howev er, if y ou do have t o w rit e code, y ou should definit ely wr it e it j ust onc, and
t hen reuse it w henev er you need it s funct ionalit y. St or ed pr ocedur es are
part icular ly desirable dat abase obj ect s because t hey save com piled T- SQL
st at em ent s t hat can deliv er significant speed advant ages ov er r esubm it t ing t he
sam e T- SQL st at em ent for com pilat ion each t im e y ou want t o perform a dat a
access or dat a m anipulat ion t ask. Chapt er 4 and Chapt er 5 ar e also im port ant
because t hey conv ey T- SQL sy nt ax for using param et ers and condit ional logic
t hat support dy nam ic r un- t im e behav ior and user int eract iv it y.
One of t he m ost im port ant feat ur es of SQL Ser ver 2000 is it s XML funct ionalit y .
Because XML as a t opic is changing so rapidly, Micr osoft adopt ed a st rat egy of
upgrading t he SQL Serv er 2000 XML funct ionalit y t hrough Web releases. Alt hough
t hose w it h SQL Serv er 2000 can dow nload t he Web releases w it hout charge from
t he Microsoft Web sit e, t he Web r eleases ar e fully support ed. Chapt er 6
int r oduces core XML funct ionalit y int roduced w it h SQL Ser ver 2000 as w ell as
funct ionalit y fr om t he fir st t wo Web r eleases. I n part icular, y ou can learn in t his
chapt er about I I S v irt ual direct ories as well as form at s for XML docum ent s and
schem as. You also learn about t em plat es in virt ual dir ect or ies t hat facilit at e dat a
access and dat a m anipulat ion t asks over t he Web.
Chapt er 7 closes out t he SQL Ser ver part of t he book w it h an in- dept h look at
program m ing SQL Serv er secur it y . I n t hese t im es, secur it y has grown int o a
m onum ent al t opic, and t his chapt er can k eep y ou out of t rouble by blocking
hackers from get t ing int o or corr upt ing y our dat abase. You learn such t opics as
how t o creat e and m anage differ ent t y pes of login and user account s and how t o
cont r ol t he perm issions available t o indiv idual account s as well as gr oups of
account s. By learning how t o script account s and perm issions w it h T- SQL, y ou
sim plify r ev ising and updat ing secur it y as condit ions change ( for exam ple, w hen
users leav e t he com pany or w hen new , sensit iv e dat a get s added t o a t able) .

Pa r t I I I , .N ET

Chapt er 8 st art s t he .NET part of t he book w it h a r ev iew of select ed .NET t opics


t hat ar e cover ed in t he init ial look Chapt er 1 offer ed at t he .NET Fram ewor k. This
chapt er pr ov ides an ov erv iew of t he archit ect ur e for .NET solut ions, and it dr ills
down on t wo t opics: ASP.NET and XML Web ser vices. The general purpose of t his
chapt er is t he sam e as Chapt er 1, w hich is t o int r oduce concept s. The em phasis
in Chapt er 8 isn’t how y ou do som et hing, but rat her w hat are t he m aj or
t echnologies enabling y ou t o do som et hing. Chapt er 1 and Chapt er 8 are bot h
relat iv ely short chapt ers, but you m ay find t hem invaluable if y ou are t he k ind of
person w ho benefit s from high- lev el ov er views of a collect ion of t opics.
Chapt er 9 st art s wit h a close exam inat ion of how t o use Windows Form s wit h
Visual Basic .NET. I t t hen shift s it s focus t o a review of t radit ional class
processing concept s via Visual Basic .NET as an int r oduct ion t o class inherit ance,
a new obj ect - or ient ed feat ure t hat m ak es it s fir st appearance in Visual Basic w it h
Visual Basic .NET. Next t he t r eat m ent of classes progr esses t o t he handling of
built - in ev ent s as w ell as t he raising of cust om ev ent s. Finally t he chapt er closes
wit h an exam inat ion of t he new except ion handling t echniques for pr ocessing r un-
t im e errors.
Chapt er 10 is a how - t o guide for solut ions t o t y pical pr oblem s w it h ADO.NET.
Befor e launching int o it s progr ession of sam ples show ing how t o perform all k inds
of t asks, t he chapt er st art s wit h an ov er v iew of t he ADO.NET obj ect m odel t hat
covers t he m ain obj ect s along w it h select ed propert ies and m et hods for each
obj ect . The how - t o guide focuses on dat a access t asks, such as select ing rows
and colum ns fr om SQL Ser ver dat abase obj ect s, as well as dat a m anipulat ion
t asks, such as insert ing, updat ing, and delet ing rows in a t able. Work ing t hr ough
t he sam ples in t he how - t o guide offers a hands- on feel for using t he
Syst em .Dat a.SqlClient nam espace elem ent s t o per form t ypical t asks.
Chapt er 11 swit ches t he focus t o t he Web by addressing t he cr eat ion and use of
ASP.NET solut ions. This chapt er st art s by int r oducing basic elem ent s t hat you
need t o k now in order t o use ASP.NET t o cr eat e great Web solut ions wit h Visual
Basic .NET. These include lear ning w hat happens as a page does a r ound- t r ip
from a browser t o a Web serv er and back t o t he br owser— part icularly for dat a
associat ed wit h t he page. Ot her pr elim inary t opics t hat equip y ou for building
professional Web solut ions include running t he sam e page in m ult iple br owser
t ypes and sniffing t he browser for cases in w hich y ou want t o send a page
opt im ized for a specific kind of browser t ype. Managem ent of session st at e is a
m aj or t opic in t he chapt er , and y ou lear n how t o use enhancem ent s t o Session
variables for Web farm s as well as t he new v iew st at e var iables, a non- ser ver -
based t echnique for m anaging st at e in ASP.NET solut ions. The last t wo sect ions in
t he chapt er deal w it h ADO.NET t opics in ASP.NET solut ions and t he new
aut om at ic dat a validat ion feat ur es built r ight int o ASP.NET.
The last t wo chapt ers in t he book explor e how XML int erplays wit h Visual St udio
.NET and SQL Ser ver 2000. For exam ple, Chapt er 12 exam ines special t ools in
Visual St udio .NET t o facilit at e t he design and edit ing of XML docum ent s and
schem as. I n addit ion, y ou learn how t o designat e XPat h queries t hat accept run-
t im e input for r et ur ning SQL Ser ver result set s inside Visual Basic .NET program s.
The chapt er dem onst rat es t echniques for processing t he XML docum ent
associat ed wit h all ADO. NET dat a set obj ect s. I n t he chapt er’s last sect ion, I
present a couple of code sam ples t hat illust rat e how t o pr ogram st at ic HTML
pages based on XML docum ent s wit h XSLT.
Ch a pt e r 1 3 dr ills dow n on XML Web serv ices by dem onst rat ing several differ ent
approaches for cr eat ing Web serv ices as well as consum ing XML out put from Web
serv ices. Web serv ices behave som ewhat like COM obj ect s in t hat y ou can set up
serv er applicat ions for client applicat ions. The ser ver applicat ions expose m et hods
t o w hich t he client applicat ions can pass param et ers. XML com es int o play wit h
Web serv ices in a couple of areas. First , Web ser vices repr esent t heir input s and
out put s v ia WSDL, an XML- based language t hat form ally describes an XML Web
serv ice. Second, Web ser vices ret urn dat a t o t heir client s as XML docum ent s or
docum ent fragm ent s.

Syst e m Re qu ir e m en t s
The requir em ent s for t his book var y by chapt er. I developed and t est ed all
sam ples t hroughout t his book on a com put er equipped wit h Windows 2000
Ser ver, SQL Serv er Ent erprise Edit ion, and t he Ent erprise Dev eloper Edit ion of
Visual St udio .NET, w hich includes Visual Basic .NET. To use t his book, y ou’ll need
t o have Visual Basic .NET or Visual St udio .NET inst alled on your com put er . ( See
Chapt er 1 for m or e inform at ion on v ersions of Visual Basic .NET and Visual St udio
.NET.) I n addit ion, y ou’ll need SQL Serv er 2000, and for som e of t he chapt ers,
you’ll need SQL Serv er 2000 updat ed wit h Web r eleases 1, 2, and 3. Chapt er 6
giv es t he URLs for downloading Web r eleases 1 and 2. Chapt er 12 giv es t wo
different URLs for downloading Web Release 3— one w it h t he SQL Serv er 2000
Web Ser v ices Toolk it and t he ot her wit hout it .
For select ed chapt ers, y ou can run t he sam ples wit h less soft ware or different
operat ing syst em s t han t he one t hat I used. For exam ple, chapt ers 2 t hrough 5
will run on any operat ing syst em t hat support s a com m ercial version of SQL
Ser ver 2000, such as Windows 98 or a m or e recent Windows operat ing syst em .
Chapt er 7 r equires an operat ing syst em t hat support s Windows NT secur it y , such
as Windows 2000 or Windows XP Professional. Chapt er 6, Chapt er 11, and
Ch a pt e r 1 3 r equir e Microsoft I nt ernet I nform at ion Serv ices ( I I S) . I n addit ion,
Chapt er 6 r equires t he inst allat ion of Web r eleases 1 and 2. For Chapt er 11, your
syst em needs t o m eet t he m inim um requirem ent s for ASP.NET. ( See a not e in t he
“How Does ASP.NET Relat e t o ASP?” sect ion of Chapt er 8.) Several of t he
sam ples in Ch ap t er 1 3 require Web Release 3 and it s associat ed SQL Ser ver
2000 Web Serv ices Toolkit .

Sa m ple File s
Sam ple files for t his book can be found at t he Microsoft Press Web sit e, at
ht t p: / / www .m icrosoft .com / m spress/ books/ 5792.asp. Click ing t he Com panion
Cont ent link t ak es you t o a page fr om w hich y ou can dow nload t he sam ples.
Supplem ent al cont ent files for t his book can also be found on t he book’s
com panion CD. To access t hose files, insert t he com panion CD int o y our
com put er’s CD- ROM dr ive and m ake a select ion fr om t he m enu t hat appears. I f
t he Aut oRun feat ure isn’t enabled on y our sy st em ( if a m enu doesn’t appear when
you insert t he disc in y our com put er ’s CD- ROM drive) , r un St art CD.ex e in t he r oot
folder of t he com panion CD. I nst alling t he sam ple files on y our hard disk requir es
approx im at ely 15.3 MB of disk space. I f y ou have t rouble r unning any of t hese
files, r efer t o t he t ext in t he book t hat describes t hese pr ogr am s.
Aside from t he sam ple files t hat t his book discusses, t he book ’s supplem ent al
cont ent includes a st and- alone eBook inst allat ion t hat w ill allow y ou t o access an
elect ronic v ersion of t he pr int book direct ly from your deskt op.

Su ppor t
Ev er y effort has been m ade t o ensure t he accur acy of t his book and t he cont ent s
of t he com panion CD. Microsoft Press pr ov ides cor rect ions for books t hr ough t he
World Wide Web at t he follow ing address:
ht t p: / / www .m icrosoft .com / m spress/ support
To connect dir ect ly t o t he Micr osoft Pr ess Know ledge Base and ent er a query
regarding a quest ion or an issue t hat you m ay have, go t o:
ht t p: / / www .m icrosoft .com / m spress/ support / search.asp
I f you have com m ent s, quest ions, or ideas r egarding t his book or t he com panion
cont ent , or quest ions t hat are not answered by query ing t he Know ledge Base,
please send t hem t o Microsoft Pr ess via e- m ail t o:
m spinput @m icrosoft .com
Or v ia post al m ail t o:
Micr osoft Pr ess At t n: Pr ogram m ing Micr osoft SQL Ser ver 2000 w it h Microsoft
Visual Basic .NET Edit or One Microsoft Way Redm ond, WA 98052- 6399
Please not e t hat product support is not offer ed t hr ough t he above m ail address.
For product support inform at ion, please visit t he Microsoft Support Web sit e at :
ht t p: / / support .m icr osoft .com
Cha pt e r 1 . Ge t t ing St a r t e d w it h Visua l
Ba sic .N ET for SQL Se r v e r 2 0 0 0
This book aim s t o giv e professional dev elopers t he background t hat t hey need t o
program SQL Ser ver applicat ions w it h Micr osoft Visual Basic .NET. This ov erall
goal im plies t hree guidelines:

• First , t he book t arget s pract icing dev elopers. I n m y exper ience, t hese ar e
busy pr ofessionals who need t he det ails fast . These indiv iduals alr eady
know how t o build applicat ions. They buy a book t o lear n how t o build
t hose applicat ions wit h a specific set of t ools.
• Second, t he book is about building applicat ions for SQL Ser ver 2000. This
focus j ust ifies in- dept h coverage of SQL Serv er program m ing t opics— in
part icular, T- SQL, Micr osoft ’s ext ension of t he St ruct ured Query Language
( SQL) .
• Third, t he book illust rat es how t o pr ogr am in Visual Basic .NET, but w it h
part icular em phasis on dat abase issues for SQL Ser ver 2000. Special
at t ent ion goes t o relat ed .NET t echnologies, such as t he .NET Fram ew ork,
ADO.NET, ASP.NET, and XML Web ser vices.

My goal in t his chapt er is t o equip y ou concept ually for t he r est of t he book .


Ther efor e, t his chapt er includes m at er ial t hat acquaint s y ou w it h applicat ion
dev elopm ent t echniques and t opics for SQL Serv er 2000 and Visual Basic .NET.
The discussion of t he sam ples in t his chapt er generally aim s t o convey broad
approaches inst ead of how t o r un t he sam ple. All t he r em aining chapt ers except
for Chapt er 8, anot her concept ual chapt er , hav e sam ples w it h inst ruct ions aim ed
at professional dev elopers.
I believe t hat t he overw helm ing m aj or it y of pr ofessional Visual Basic developers
hav e no hands- on fam iliarit y wit h Visual Basic .NET and it s relat ed t echnologies.
I f you already knew Visual Basic .NET, it wouldn’t m ake any sense t o buy a book
describing how t o use it . This chapt er t herefore focuses on how t o get st art ed
wit h Visual Basic .NET and one of it s cor e r elat ed t echnologies for t hose building
SQL Ser ver applicat ions— ADO. NET. I also believ e t hat m ost Visual Basic
dev elopers don’t have an int im at e know ledge of SQL Serv er — especially for
creat ing user - defined obj ect s, such as t ables, v iews, and st or ed procedur es. This
capabilit y can em pow er you t o build m or e pow erful and m or e secure applicat ions.
As y ou lear n about dat abase obj ect s and how t o creat e t hem in Chapt er 2
t hr ough Chapt er 7, reflect back on t he Visual Basic .NET cov erage in t his chapt er
and how t o m ar ry dat abase creat ion t echniques and Visual Basic .NET
dev elopm ent t echniques. One of t he best t ools t o build dat abase obj ect s is SQL
Ser ver 2000 Query Analyzer . This chapt er’s closing sect ion conveys t he basics of
Query Analyzer t hat you need t o follow t he sam ples in Chapt er 2 t hrough Chapt er
7.

Visua l St u dio .N ET, t h e V isu a l Ba sic .N ET I D E


Visual St udio .NET is t he new m ult ilanguage int egrat ed developm ent env ir onm ent
( I DE) for Visual Basic, C# , C+ + , and JScr ipt developers. I f you are dev eloping
solut ions for Visual Basic .NET, I definit ely r ecom m end t hat you use Visual St udio
.NET as y our dev elopm ent envir onm ent . This sect ion dem onst rat es how t o get
st art ed using Visual St udio .NET for dev eloping solut ions wit h Visual Basic .NET.
Visual Basic .NET is available as part of Visual St udio .NET in four edit ions:

• Professional
• Ent erpr ise Dev eloper
• Ent erpr ise Archit ect
• Academ ic

All four edit ions of Visual St udio .NET include Visual Basic .NET, Micr osoft Visual
C# .NET, Microsoft Visual C+ + .NET, and support for ot her languages. I n
addit ion, Microsoft offer s Visual Basic .NET St andard, w hich doesn’t include Visual
C# .NET or Visual C+ + .NET.
Because t his book t arget s professional Visual Basic dev elopers creat ing SQL
Ser ver applicat ions, it uses t he Ent erpr ise Developer Edit ion of Visual St udio
.NET. You m ay not ice som e differ ences if y ou’r e using anot her edit ion.
Visual St udio .NET can be inst alled on com put ers r unning one of five operat ing
syst em s: Windows 2000, Windows NT, Window s XP, Windows ME, and Windows
98. Not all t he .NET Fram ework feat ures are av ailable for each operat ing syst em .
For exam ple, Windows 98, Windows Me, and Windows NT don’t support
dev eloping ASP.NET Web applicat ions or XML Web serv ices applicat ions. The
sam ples for t his book ar e t est ed on a com put er running Windows 2000 Ser ver,
which does support all .NET Fram ew or k feat ur es.

St a r t ing V isu a l St udio .N ET

To open Visual St udio .NET, click t he St art but t on on t he Windows t ask bar,
choose Program s, and t hen choose Micr osoft Visual St udio .NET. Visual St udio
displays it s int egrat ed dev elopm ent env ironm ent , including t he St art Page ( unless
you prev iously configur ed Visual St udio t o open different ly ) . Fr om t he St art Page,
you can configure Visual St udio t o w ork according t o y our dev elopm ent
preferences, and y ou can st art new solut ions as well as open ex ist ing pr oj ect s.

Con figu r ing V isu a l St udio .N ET f or Visua l Ba sic .N ET

Use t he links on t he left side of t he St art Page t o begin configur ing Visual St udio
.NET for developing solut ions in Visual Basic .NET. Click t he My Pr ofile link t o
open a pane in w hich you can specify an overall profile as w ell as indiv idually
indicat e y our preferences for Keyboard Schem e, Window Lay out , and Help Filt er.
You also can designat e t he init ial page t hat Visual Basic .NET displays. When y ou
are beginning, it m ay be part icular ly conv enient t o choose Show St art Page. As a
Visual Basic dev eloper who has work ed w it h Visual Basic 6, y ou m ight feel m ost
fam iliar w it h a lay out t hat reflect s y our pr ior developm ent env ir onm ent . Figure 1-
1 shows t hese My Pr ofile select ions.

Figu re 1 - 1 . M y Profile se le ct ion s for st a r t in g V isu al St u dio .N ET for a


V isu a l Ba sic de velop e r.
Usin g t h e St a r t Pa ge

Aft er set t ing your pr ofile, you can r et urn t o t he init ial St art Page pane by
choosing t he Get St art ed link from t he m enu on t he left border. I f you had
creat ed pr ev ious solut ions, t he last four m odified proj ect s would appear on t he
Proj ect s t ab of t he St art Page. The t ab shows pr oj ect nam es along w it h dat e last
m odified. I f a pr oj ect y ou want t o v iew doesn’t appear on t he list , you can click
t he Open Proj ect link t o display t he Open Proj ect dialog box and t hen navigat e t o
a direct ory cont aining t he pr ev iously cr eat ed solut ion. Select t he proj ect ’s folder
t hat y ou want t o open in t he I DE, and double- click t he solut ion file ( .sln) for t he
proj ect . The next sect ion illust rat es t his pr ocess in t he cont ext of a sam ple
proj ect .
To cr eat e a new solut ion, click t he New Pr oj ect link t o open t he New Pr oj ect
dialog box . I f y ou saved prefer ences such as t hose show n in Figure 1- 1, t he
dialog w ill aut om at ically select Visual Basic Proj ect s in t he Proj ect Types pane of
t he New Proj ect dialog box. On t he r ight , y ou can select a t em plat e for launching
a proj ect . Table 1- 1 shows t he pr oj ect t em plat e nam es along w it h a br ief
descript ion av ailable from t he Ent erpr ise Dev eloper Edit ion of Visual St udio .NET.
Choosing a t em plat e ( by clicking OK aft er select ing a t em plat e) opens a proj ect
ready for creat ing t he t ype of solut ion t hat y ou want t o dev elop. When Visual
St udio .NET sav es t he t em plat e t o st art a new proj ect , it specifies eit her a file
folder or a Web sit e for t he t em plat e’s files; y ou can overr ide t he default nam es
for t he file folder and Web sit e.
Random documents with unrelated
content Scribd suggests to you:
sing, or play the piano eight hours a day, which inspired me with an
insurmountable detestation of that instrument.
If my master complained of my inattention, I was shut up in the music-
room from six in the morning till eight in the evening and given hardly
anything to eat. If by chance I got a good report, I was pretty well treated,
my father made me a present of twopence, and my mother told me ghost
stories, which terrified me to such an extent that I scarcely dared to be alone
during the night.
One day when they had forgotten to open my prison at the usual hour, I
was suddenly seized with a panic of terror, and, quite beside myself, I opened
the window and threw myself out into the garden, without doing myself any
harm, however.
About this time great rejoicings were taking place in Pisa in honour of their
Neapolitan Majesties, who were on a visit to the Grand Duke Leopold.
My mother, wishing to take the opportunity of going to see her sister, who
lived in that town, my father gave his consent, on condition that my aunt and
I should be of the party.
With what transports of joy did I receive this agreeable news! What a
delightful and lively satisfaction it would be to let my dear piano rest!
Great preparations were made for my toilette; several frocks were bought
for me; my father gave me two gold watches and a very valuable ring. He did
not forget to make me take my shoes with their very high red heels, whose
sound much delighted me.
We embarked on a public boat, and, although it was my first journey by
water, my young imagination, far from dreading the perils of the furious
element, was at once wonderfully diverted.
In twenty-four hours we landed at Pisa, where my uncle and aunt Fillipini,
as well as their son and daughters, received us with open arms. They were
greatly surprised to see me so richly clad, and said to my mother that no
doubt her husband was very well off.
She answered only that I was a bastard, a name she gave me pretty often,
and the meaning of which I did not understand.
Profiting by my father’s absence to treat me with greater harshness, she
was eternally scolding and tormenting me; she went so far as to take away
my watches and my ring, to give them, as she said, to the great Madonna.
Unluckily for me, she managed to procure a piano, at which I was pitilessly
forced to work.
One day, having suddenly sent for me, she ordered me to sing for the
amusement of two ragged and unpleasant-looking women she told me were
intimate friends of hers.
Indignant at such a proposal, I said that a bit of bread was all they needed
just at present.
She rose; I rushed to my room; but nothing could save me from her fury.
In vain did I beg her pardon, in vain entreated for mercy; a hail of blows fell
upon me; my body was a mass of bruises; the blood streamed from my nose.
I could not stand the overcoming pain; I went to bed, and did not rise from it
again till we set out for Florence.
In this fashion my visit to Pisa became a real martyrdom for me instead of
an amusement.
During my infancy I had been very subject to eruptions which from time to
time appeared all over my body; but none had ever equalled that which was
caused after my return by weariness and wretchedness. After the doctors had
prescribed a lengthy course of cooling remedies, my parents, to rid
themselves of such a nuisance, determined to send me to a hospital
maintained at the expense of the Grand Duchess, and the admission to which
needed great interest. Nevertheless, my father got an order without any
difficulty.
I stayed there several weeks, and I must proclaim aloud that I felt as if I
had refound my dear Countess in the person of each of the sisters who
managed the hospital. Their constant care soon cured me; they were always
near me, caressing me, and giving me fruit and sweetmeats.
No, no one could have been kinder, more courteous than those charitable
women, to whom I vowed eternal gratitude, and whom I could not leave
without anguish.

II

Fresh Tortures—My Parents’ Talks—Theatres—Mysterious Letter—


Troublesome Visits—Useless Prayers—My Protests.
Nature had given me a good figure; nevertheless, my father maintained
that I stooped, that one of my shoulders was higher than the other, and that
my feet grew large too quickly.
To remedy these imaginary defects he made me wear an iron collar, which
was taken off only at meal-time, a steel corset that increased the torture and
really made me deformed, and shoes so narrow and short that I could hardly
walk.
When I begged him to take off this painful apparatus, a box on the ear was
his usual answer.
He often took me to the opera, to teach me, he said, to hold myself
properly; to move my arms easily; to behave with grace.
All this rigmarole was an enigma to me, until at last he explained it to me in
these terms—
“Isn’t it about time, my dear Maria, that you repaid what I have spent on
your education?”
“How can I do that?” I answered quickly, and with a smile, “since all I have
comes from you.”
Instantly he replied—
“This is the way you are going to do it. I have got you an engagement at
the Piazza-Vecchia, where you will certainly make a great success.”
Dismayed by these words, I blushed, I trembled, and, concealing some of
my trouble, I exclaimed—
“But the thing would be impossible. Don’t you know, father, that the
presence of two or three lookers-on is enough to confuse me when I am
taking my lessons?”
Vain subterfuge.
“Make a beginning,” he said harshly; “after you’ve done it a few times you’ll
find all the courage you need.”
There was one last expedient left me. I flew to my mother and, with tears,
begged her to remember how often she had told me that actresses deserved
the most profound contempt. You may judge of my astonishment when I
heard her answer thus—
“It was so formerly, my daughter; nowadays all that is changed; on the
contrary, those ladies are admired and loved by everybody, and if they sing
well they gain great wealth, and even sometimes marry great noblemen.”
After that I saw there was nothing more to hope for; my doom was fixed
and my misfortune inevitable.
I was made to study my part, which my unwillingness made a very slow
business, and when the day for acting it arrived, my parents themselves came
to introduce me.
When my turn came I found it impossible to open my mouth. My youth and
my simplicity stirred the pity of the whole audience, while my father
endeavoured to express his displeasure and anger to me by frightful grimaces,
which at last forced me to stammer out a few notes.
The spectators made the building echo with their loud cries of brava! brava!
coraggio! and at the end of the play several ladies of quality asked to see me,
praising me repeatedly and lavishing all sorts of endearments upon me.
All the time the carnival lasted I was compelled to carry out the painful task
imposed on me. One day, having tried to play the invalid, my father
discovered the trick, and made me pay for it so dear that I did not again think
of making that sort of excuse.
God alone knows how delighted I was when my engagement came to an
end; but, alas! the relief was a short one. After a few months’ rest, my father
announced to me that I was about to have the honour of appearing on a
larger stage, adding that everything was arranged and settled and there was
nothing left for me but to obey his orders.
The news came upon me like a clap of thunder. Putting aside my
nervousness, I felt myself degraded and debased.
More especially did I feel ashamed when I heard the actresses saying to
one another: “It is disparaging to us to have the daughter of a constable put
amongst us.”
At this period I had two brothers and one sister, three little tyrants all of
whose whims I had to humour; for if I made the smallest objection my
mother encouraged them to abuse me and beat me, and throw stones at me.
Fed and brought up delicately, nothing was good enough for them; but I had
no difficulty, nevertheless, in realizing that they were being prepared for no
better fate than mine, and they, too, were destined for my degrading
profession.
Too unfortunate already in that I belonged to such a family, I was far from
expecting fresh troubles, when my father read aloud to us the following letter,
which he had just received, addressed to me—
“I have seen you, you beautiful star, and listened to the melodious tones of
your angelic voice; they have intoxicated my heart. I implore you, my angel,
to come at ten o’clock to the least frequented walls of the town; there you will
receive the faithful promises of your unknown adorer.”
This letter sent us into fits of laughter; my father alone was angry, and
declared that if he could discover the impertinent author of such an
anonymous letter he would severely punish him for his temerity.
The next day a messenger asked for me at the door. My father went in my
stead, had a long talk with him, and I heard nothing further about it, till one
day, having dressed me up like a goddess and given me all my mother’s rings
—carefully reduced in size with wax—to wear, I was told of the coming visit of
an illustrious personage whom I was ordered to welcome.
At his arrival my parents bent themselves nearly double to show their
respect, and motioned me to do the same.
I was inclined to mockery and could hardly contain myself, when I saw
enter an old greybeard, from behind whose few and discoloured teeth came
forth an offensive breath.
He was dressed in a blue coat braided with red, and wore a little white
cloak with gold fringe, over which hung a thin queue, an ell long.
This gentleman, who, moreover, was stout, and might have been a fine-
enough-looking man in his earlier years, introduced himself as Lord
Newborough, an English nobleman, and, as he entered, told me he had come
solely for the pleasure of hearing me sing.
How great was my reluctance to do as he asked! With what bad grace I
sang!
My bravura ended, I made some excuse and retired.
A few days later milord appeared again; his visits became more and more
frequent; soon they were daily.
Each time he talked to me of his wealth; boasted of his immense
possessions; gave me the most magnificent descriptions of England; and was
constantly repeating that he was a widower with only one son.
His Italian was so bad that I should never have understood his jargon
without my father’s help.
I understood no better why I was always so well got-up, so adorned with
jewels and diamonds. When I asked the reason, I was told that all this finery
would induce the great lord to increase the value of the presents he could not
fail to make me.
In vain I did my utmost to convince my parents that I hated the very idea
of receiving the least thing from him. They overwhelmed me with reproaches,
asking me if this was the way I meant to repay them; representing to me that
they had to provide for the education of three other children; and at last
saying plainly—
“How would it be if you had to marry this man whom you had no right to
look for, and who is so much above you?”
Unhesitatingly I cried, “O Dio! Dio! I would rather die!”
Then my father bade me remember that his power over me was absolute
and that I was bound to obey his commands; my mother joined in and
declared, with an oath, that, willing or not, I should be the wife del signore
inglese.
Realizing that it was not a joke, I implored them to let me become a nun, or
to do with me what they pleased so long as I was not forced to make such a
detestable match; but my words, my tears, my sighs, resulted only in making
them more angry and eliciting more hateful oaths.
Then I ran to my grandmother and my aunt, begging them to take my part.
They did as I asked, but without success; they were only forbidden to
mention the subject again.
Wounded to the very depths of my heart, I gave myself up wholly to my
grief, scarcely alive or able to breathe.
Milord himself came to rouse me from my stupor.
At the sight of him I gave a wild cry, and, falling at his knees, with sobs
implored him not to exact such a sacrifice from me; to think of my youth; to
see that I could not reasonably give my hand to a man old enough to be my
grandfather and for whom I felt an insurmountable aversion.
He did nothing but laugh at my pitiful simplicity; and, raising me from my
lowly attitude, he said to me that if I did not love him yet, I would later on;
that his rank, his estates, his wealth, and all the fine things I should enjoy,
would oblige me to love him dearly.
At these words my whole being was possessed by fury; I violently thrust
back my insupportable persecutor, looking at him with blazing eyes; I abused
him, passionately declaring that I would rather endure any plague than the
union he offered me; that I would rather face all the miseries in the world;
that death itself would be nothing to dread; that, besides, my hatred of him
had come to its height; that it was so deeply rooted in my heart that nothing
could tear it up, and that my greatest happiness would be to be rid of his
presence for ever.

III

Arrangements with Milord—His Son—Brain-fever—Fruitless Attempts—My


Marriage—My Husband’s Conduct—The Avarice of my Parents—An
Envoy from England.

Though my engagement at the theatre was to end in a fortnight, my father


got a substitute for me, and himself gave up his post; maintaining that all that
was henceforth incompatible with the high rank I was to attain.
Nevertheless, he did not forget to take his precautions, but effected an
agreement greatly to his own advantage, and, with no thought for my future,
simply put me at the mercy of my elderly adorer in consideration for a sum of
fifteen thousand francesconi, a pension of thirty ducats a month, and the
proprietorship of a magnificent country house at Fiesole, very well furnished,
with a courtyard, gardens, and two immense vineyards.
Moreover, milord promised to pay the expenses of the whole family during
his whole stay in Italy on condition that he and his son were allowed to live
with us.
That young man was then sixteen years old, tall and well made; Nature had
endowed him with ability and a good heart, but he was so ignorant and
uncouth that it was pitiful to see him. He could neither read nor write, and
used the coarsest expressions; his greatest pleasure was the company of low
people or servants.
He talked a great deal about a Signora Bussoti, wife of milord’s cook, telling
any one who choose to listen that this very respectable person had caused his
mother’s death, and was daily eating up his father’s fortune; that she had
children whose legitimacy was anything but certain, and for whose sake he
himself had often been beaten.
These speeches, and many other blemishes I caught sight of through the
trouble my future husband took to prevent my being entirely disgusted with
him, finished by making me realize completely the depth of the abyss into
which I was to be thrown. My youthful imagination took fright, and I could no
longer bear the weight of my misery.
All at once I was seized with violent pain, my senses were benumbed, my
head turned, and for twenty-six days my life was despaired of. Even in my
delirium the thought of my unhappiness did not leave me; I cried aloud; I
breathed complaints; I made incoherent murmurs. My grandmother and my
aunt were inconsolable; they were always with me, and their constant and
affectionate care greatly contributed to my recovery.
Alas! as soon as I recovered consciousness, I regretted that I was alive; I
rose and rushed to the balcony; but my father came in, took hold of me and
stopped me.
Vainly I took the opportunity to repeat my humble remonstrances and to
swear perfect obedience to him in every other respect; he only put before me,
in his turn, all the supposed advantages I should gain, and averred that the
Grand Duke, knowing all about me, absolutely required me to be ennobled.
As soon as I was well enough to go out, the doctors advised country air,
and we went to Fiesole, a little town three miles from Florence.
There a new idea came to me, which at first I believed might be very
useful. I urged the difference of religion and the impossibility of my marrying
a Protestant.
But the old heretic did away with that difficulty at once.
“I’ll turn Jew!” he exclaimed; “I’ll turn Mussulman; I’ll turn idolater; I’ll turn
anything you like so long as you’ll consent to be my wife.”
And he called in priests and monks to instruct him, and neglected nothing
necessary for becoming a member of the Roman Church.
After that there was nothing to be done but fix the day for my immolation.
The fatal day arrived, and by the first light of dawn we made ready to start
for Florence.
Before getting into the carriage, for the last time I threw myself at the feet
of my inexorable parents, watering them with my tears, while sobs choked my
voice.
My mother grew angry and heaped abuse on me; my father raised me
roughly, saying crossly, “The Grand Duke wishes it; there’s no way of going
back now.”
We set off at once, and fearing that the populace might rise against the
unjust violence done to a girl of thirteen, we went not to a public church but
to a private chapel.
I was led to the foot of the altar and placed by the side of the man I
abhorred.
Questioned by the minister, I had nearly answered in the negative, when
my father pinched me, and, with a muttered threat that he would kill me,
somehow extorted from me the fatal vow which put the seal on my wretched
fate.
The ceremony over, we returned to Fiesole, where a number of friends
came to offer their congratulations.
Instead of receiving them, I shut myself up in my room, and it was in vain
that they sent for me. I took no food but what my grandmother and aunt
brought to me in secret.
At the end of four days my father burst open the door, forced me to go out,
and put me into the arms of my husband, or rather my insufferable keeper;
for he was so full of jealousy that he could not endure the presence of a man.
If I went out, he wanted to accompany me, or sent some one after me.
Scores of times he was guilty of rudeness to people who honoured me with
their salutations, and on every hand he thought he saw favoured rivals or
dangerous emissaries.
Every day the fumes of wine upset his weak mind; he gave way to frightful
fits of anger, and after having infinitely increased the usual discomforts of our
dreary household, he would fall into a deep sleep in which he snored loudly.
He speedily conceived such an antipathy for the various members of my
family that he never spoke of them but by the most filthy names.
When I reminded him of the affectionate and loving names he constantly
called me by, he always answered, “As for you, my dear better-half, you may
feel quite sure there is nothing in common between your charming self and
that odious stock.”
And truly I was often astonished myself that there was so obvious a
difference, whether in the colour and shape of the face, whether in the
disposition and temperament, the bearing and speech, or the mental faculties
and the inclinations of the heart.
The contrast was especially striking between my generosity and the well-
known avarice of the Chiappinis.
They were in constant torment from this passion; they were for ever
exhorting me, urging me to ask for money, to demand ornaments, to go to
shops to buy them whatever they wanted.
My humouring them, their own extravagances, and, even more, the
insatiable claims of the charming Bussoti, soon exhausted the exchequer of
milord, whose credulity let him be robbed of nearly his last farthing.
I don’t know what would have become of him if Mr. Price, his man of
business, had not opportunely arrived.
This gentleman handed over some ready money to him, and prepared to
return and send him back some larger sums.
There was waiting, and impatience, and counting of days and hours! At last
the post brings a letter. My father goes to fetch it, breaks the seal, has it
translated, and its contents are known before it reaches the person to whom
it is addressed.
It announces the sending off of several trunks. Joyful news! Clapping of all
hands!
But what a surprise! When the trunks, so longed for, were opened, nothing
was to be seen but a heap of old rubbish that Mr. Price had doubtless got
together from the wardrobes of milord’s grandmamas, and by which he had
thought he might temporarily assuage the raging thirst of my greedy relatives.
I could not help laughing, while my mother, bawling at the top of her voice,
accused me of carelessness, declaring that if there was nothing better, it was
because I had not been willing to ask for anything.

IV

Return to Florence—Rupture and Reconciliation—The British Minister—


English Lady’s-maid—Milord’s Imprisonment—My Flight—Presents and
Promises—My Father’s Avowal—My Behaviour Towards Him—His
Obliquity.
My husband soon wearied of the country and wanted to return to Florence.
There he hired a fine house, big enough to hold us all; the first storey was to
belong to him, his son and me; my parents occupied the second. We were to
be independent of each other, but Lord Newborough was still responsible for
the expenses of the double household.
Although forty-five years old, my mother was then enceinte, and gave birth
to a fifth boy, who was named Thomas, after milord, his godfather.

LORD NEWBOROUGH

FROM A PICTURE AT GLYNLLIFON


The education of my brothers took a quite different direction from what had
seemed probable at first. My husband placed them in a large school, with his
own son, who could not stay there more than a few months. Afterwards an
attempt was made to give him a tutor; but the young man was irrevocably
ruined. When the tutor saw him he said, “I have come too late.”
In changing my abode I had in no way changed my situation; milord kept
up his usual style of living, giving me endless trouble; and those who ought to
have been a comfort to me, treated me with contempt, only saying, “Really,
you are not worthy of your lot; don’t you understand that you are on the eve
of becoming a very wealthy widow, and that soon you will be able to do just
what you please?”
But in spite of these fine words, they did not show themselves very willing
at times to put up with the fits of rage of the irascible old man.
One day, when the intoxicating fumes had got greatly into his head, he
provoked my father by his abuse and rushed at him to strike him. Armed with
a big stick and wild with rage, my father vigorously returned the assault, till
the noise they made and their outcries attracted a crowd which separated
them.
The assailant left his house and ordered me to follow him. As I clearly and
positively refused to do so, I received a note in which he informed me that if I
did not do as he asked, he should put an end to his life. I seized a pen and
wrote him these few words—

“My old fool, if you wish to give me a proof of your


affection, make haste and carry out what you announce to
your unhappy victim,
“Maria.”

Several days went by without my hearing anything about him, and I was
almost happy; but this calm was but the prelude to the storm.
One of his servants came to tell me that he was dangerously ill, and that,
feeling his last hour to be at hand, he begged to see me that he might make
important communications to me.
It was in vain I answered that I had no wish to receive any; my father
pointed out to me that such conduct on my part could not fail to be very
prejudicial to us.
He added that he would go with me, and swore that he would bring me
back with him.
Reassured by this promise, I agreed, on condition that our visit should be a
short one.
As I entered, I was greatly astonished at seeing the British Minister beside
milord’s bed.
The supposed sick man held out his hand to me and assured me that it
needed only my presence for his complete recovery; that he was very sorry
for having given me so much trouble, and that it should not happen again.
“I wish you good health,” I replied quickly; “but to return to you is quite
impossible; and I declare to you that if it had not been to please my father,
you would never have seen me here.”
I got up at once, and signed to my father to leave.
He did not stir; his look revealed the plot to me, and I realized his
deceitfulness.
The Minister did all he could to lessen my vexation, and averred that he
took upon himself the responsibility for the conduct of my husband in the
future.
From that moment that gentleman showed me much attention; he
introduced me to his wife, and procured me the acquaintance of several
English ladies, among others the Misses C., with whom I became very
intimate, especially the second, afterwards the Marchioness of B., my greatest
friend.
Still I had to endure numberless mortifications; the Italian nobility looked
down on me, and milord was invited by himself to the great receptions.
Moreover, my domestic circumstances had become more unbearable than
ever.
My husband had insisted on giving me a lady’s-maid of his own country and
choice, the most worthless of women. In a short time she had succeeded in
wholly captivating her old master, and even more, his son, so that she ruled
despotically in the house; nothing was done without her, her advice was
received like an oracle, and her words were commands no one dared disobey.
If I allowed myself a comment, she treated me like a child, and took pleasure
in secretly taunting me with my lowly origin and the contemptible part I had
played in my own despite. I could not take a step without having her at my
heels, finding fault with everything I did; and as my most innocent doings
were always malignantly misconstrued, I made up my mind to give up all
outside amusements.
Keeping to my own room, I had no recreation but music and the care of my
birds.
One day when I was petting my favourite sparrow, they came to tell me
that milord was asking for me to go out driving with him. I went down, quite
resolved to make my rightful complaints to him.…
Our carriage, having crossed the town, was stopped at the barrier. We went
to another of the gates and were treated in the same fashion.
My husband, in a fury, accused Chiappini of this, and swore to have his
revenge. He forbade me to hold any communication with him, and ordered his
abominable confidante never to let me out of her sight. Paying no attention to
his reproofs, I went back quietly to my room.
Suddenly there arose a great uproar in the next room; I opened the door
and saw milord, followed by three constables, who seized him and dragged
him away to the fortress.
The lady’s-maid screamed aloud and hurled a torrent of abuse at me.
The next morning she received a letter and went to the prison, after putting
me in charge of two footmen, who took advantage of her absence to empty a
bottle or two.
Having myself taken the opportunity to go out on my balcony and breathe
freely, a note which I saw came from my father was thrown up to me. Joyfully
I picked it up.
It told me to hold myself in readiness at a certain hour.
I hastily put on all my most valuable things, and at the appointed moment
went quickly downstairs and jumped into a carriage that was at the door.
There I found my aunt, who tenderly welcomed me, and in no time we
reached Fiesole, where my father told me that, having heard by public report
that my husband wished to get away without paying his debts, he had got
leave from the Grand Duke to have him put into safe keeping.
Walking in the garden on the Sunday, I saw the arrival of his son, who, as
he met me, said,
“Milady, allow me to offer you some trifles my father sends you.”
I declared that I would take nothing from him, and that his gifts were as
hateful to me as their giver.
But the parcel had already fallen into the hands of my mother, who
welcomed its bringer with jubilation, and begged him to repeat his visits.
“Oh, how beautiful!” she cried as she opened the box; “who would have
believed milord had such good taste? I’ll wager that several of these fine
things were bought for me.”
I retorted that she might take them all, and that never in my life would I
touch one of them.
It needed nothing further to induce her to take possession of the whole lot,
except the flowers, which she looked upon as worthless.
The same messenger reappeared towards the end of the week, and handed
me the following letter—

“My angel, I cannot live without you. Oh! if you knew how I
weary for you, I am convinced your tender heart would break.
Come, come, to comfort me. Happiness awaits you with me. A
large sum of money is being sent to me to meet all my
obligations, and we will leave Florence soon and go to my own
dear country, where you will be admired by all the world,
especially by your humble and affectionate slave.”

While reading these curious sweet things, I had noticed the delight of my
family at hearing that a large sum was coming from England, and in it I saw
the omen of a distressful reconciliation.
My father left us at once, and the very same evening I had the misery of
seeing him return with milord, who fell at my feet, saying, “Dear jewel of my
heart, behold your faithful adorer.”
At the same time he offered me a bouquet, which I threw in his face.
Far from being offended, he pressed me to his bosom; and while I
struggled to free myself, my father joined in, declaring that he had no power
over my person, that he could not keep me away any longer, and that the law
obliged me to live with my husband.
I felt my blood freeze in my veins; I gave full vent to my indignation; I
stated its causes unreservedly; but the only satisfaction I could obtain was the
dismissal of my infamous persecutrix.
V

Integrity of Milord—Preparations—Secret Union—Stay at the Hague—


Arrival in England—The Country of Wales—My Exaltation—My Griefs—
My Relations—The Eldest of my Brothers.

The pretended report of Lord Newborough’s projected flight was a pure


invention of my father’s; for I feel bound to say to the credit of the first that
his integrity stood all proof, and that his too great generosity placed him
infinitely above any suspicion of meanness. If he had prolonged his stay in
Italy, it was simply to enable him to meet all his family’s engagements by
cutting off for a time a host of superfluous expenses his presence in his own
country would have necessitated.
Mr. Price had written that he was coming to us; he came, and the
preparations for our journey were begun; the accounts were all made up, all
engagements were met. My father received his 15,000 francesconi and all the
arrears of his pension. It was settled that he should accompany us to
Boulogne, and that my aunt should go with us to England.
As we were to travel by land as far as the Hague, my mother managed to
instil into us a dread of robbers, and insisted on keeping back some of my
diamonds to wait for a safe opportunity for sending them direct to me. I need
not say that she never found it!…
On the eve of our departure it was perceived that the son of milord was
missing; he was called for, sought for, in vain. My father set to work all the
constables of his acquaintance, and one of them at last succeeded in
discovering him with my former maid, who had fainted. He protested that he
would never abandon his lawful wife; but as this wonderful title rested on
nothing more than a kind of clandestine marriage, the Archbishop of Florence
promptly absolved him from his vows. He was made to listen to reason, and
some assistance was given to the forsaken beauty.
On leaving this town, I felt the liveliest regret at the separation from my
grandmother, who had always been so kind to me; as for the rest of my
family, indifference was all they aroused in me.
At Boulogne I took leave of my father, who, as a final consolation, assured
me I should become a maid-of-honour at the English Court, and acquire all
the titles that had belonged to Lady Catherine Perceval, Lord Newborough’s
first wife.
When we reached the Hague, Mr. Price left us to make preparations in
London and Wales.
We took up our quarters in an hotel, and my husband hastened to leave his
card on the British Minister, who, being absent, was represented by Lord H.
Spencer, son of the Duke of M., who came to call on us, and offered to
present me to the Dutch Royal Family, who received me with extraordinary
affability.
He also made me acquainted with several of the best families, and my stay
in Holland was a round of drives, games and amusements.
When we had been there six months, Mr. Price wrote that everything was
ready for our reception.
When we arrived in London, my husband introduced me under the name of
the Marchesina di Modigliana, the name I still bear in the English Court
Circular.
As it was summer, and the greater number of the best families were in the
country, there were but few ladies for me to meet, amongst whom I was
especially attracted by Lady Ford, and we became very intimate friends.
After spending a couple of months in the capital of the British Empire, we
set forth for Wales, where Lord Newborough’s largest estates and his finest
mansion, called Glynllifon, were situated. Glynllifon is about six miles from
Carnarvon in North Wales, and in that town we had the most magnificent
reception; the horses were taken out of the carriage, and the young men
dragged us in their place. We were escorted home by six hundred men, all
people or friends of milord’s. In the evening our park, as well as the town and
the surrounding estates, were brilliantly illuminated and filled with a vast
crowd that begged at intervals to be allowed to look at me. When I complied
with their wishes, the air was rent with loud applause.
All the noble families of the neighbourhood came to call on us, and for six
consecutive months it was like a perpetual fête, and we had as many as fifty
guests every day.
GLYNLLIFON

FROM A DRAWING BY THE LATE SIR JOHN ARDAGH

Towards the end of the winter we went back to London, where my act of
naturalization was at once set about. As my husband had arranged everything
beforehand, there was no difficulty about the matter, and in less than a month
the necessary preliminaries for my presentation at Court were accomplished.
I was presented by Lady Harcourt, chief lady-in-waiting to the Queen, and
was received with the most wonderful marks of regard and admiration. My
dress of cloth-of-silver, adorned with precious stones, dazzled everybody, and
I was regarded with the greatest interest.
From that moment I had the entry into the highest society, and, instead of
the humiliations I had so often experienced at the hands of my compatriots, I
found myself surrounded by respect and honour.
Personages of the highest rank sought my acquaintance, and thought
themselves happy to be received by the wife of a noble peer, illustrious
descendant of the ancient Princes of North Wales, and grandson of the
intimate friend of George I.
In spite of all this, I was far from tasting the sweets of happiness; my
aversion for the man to whom I owed all these good things made me envy
the lot of women belonging to even the lowest classes of society.
My only consolation was in pouring out my griefs to my aunt, and even that
comfort I was to lose. She had never been able to get used to either the
climate or the customs of my new country; absolutely ignorant of its
language, she could not join in any conversation, and, rosary in hand, from
morning till night she told her beads.[2]
As her health visibly declined, I felt obliged to give way to the wish she had
long expressed to return to her native land; but her departure filled me with
sadness and trouble, and I could not endure the thought that the protectress
of my childhood would no longer be with me.
I insured her enough to live upon in comfort, and handed over to her
several trunks, either for herself or for my other relatives, from whom I was
always receiving importunate requests, and to whom I constantly replied by
the perpetual sending of packets.
More than half the pin-money milord allowed me went to Italy, not to speak
of the goods of all kinds I was always sending to the same destination.
Not content with all this, my father sent us his eldest son, who was a pretty
good historical painter, and begged us to look after him. We kept him with us
for a year, and then my husband sent him to the East Indies, where he cost
us a heap of money, as Messrs. Coutts & Co. of London can testify.
He stayed three years in Calcutta, and then went to the Cape of Good
Hope, where he married the daughter of the Danish Consul, to whom Lord
Newborough had given him an introduction. His wife’s brother taking him into
partnership, in a short time he made a large enough fortune to be able to
enjoy all the comforts of life and to bring up his numerous family, consisting, I
believe, of fourteen children.

VI

Consumption—Death of my Step-son—Birth of my Children—The Arrival of


Several Members of my Family—Domestic Cares—Milord’s Death—My
Second Marriage—Much Travel—Fresh Sojourns in Italy—My Third
Brother—My Behaviour to my Father—His Death.

The eruptions which had been so great an affliction in my childhood


continued making their appearance at intervals; but when I was twenty-six,
the evil having settled on my chest, it was believed that I showed strong
symptoms of consumption. I was so weak that after walking a few steps I
could not breathe; bathed in a cold sweat, I could get no rest.
Several remedies were tried on me without any good result. The doctors
advising change of air, we set out for Wales; but it was soon seen that that
cold and damp climate was more hurtful than helpful to me. Not knowing
what else to do, I was ordered to Tunbridge Wells, and it was that marvellous
specific that gradually restored me.
I was still only just convalescent, when milord’s son was himself attacked
with a decline, which carried him to his grave.
His constitution had been a robust one, but long undermined by his own
errors it could not make any resistance. He succumbed, after every medical
expedient had been tried in vain.
His father was broken-hearted; in addition to the loss of his only son, he
saw that his vast estates would pass to relations of whom he had good reason
to complain.
To provide against this misfortune as much as possible, he made a will to
the effect that, if he should die without issue, the larger part of his property
should go to the second son of the Minister, Perceval, brother of his first wife,
leaving me at the same time an annuity of £1400, on condition that I granted
him a favour, until then persistently refused.…
His grief was so great, and he had always shown me so much kindness,
that at last I felt it to be my duty to make the most painful sacrifices for his
sake—I consented to become a mother!…
With what transports of gratitude did he not welcome the first signs of the
fulfilment of his hopes! But even they did not equal his delight when I gave
birth to a son. Beside himself with joy, he ordered that no expense was to be
spared, and gave the most brilliant of entertainments; the best families came
to it and offered us their heartiest congratulations.
As for myself, I felt then the most delightful emotion, quite new to my heart
and which I recognized as maternal love.
This happiness was increased the next year by the birth of a second son,
whose baptism was celebrated with great pomp. Mr. Perceval and Lord
Bulkeley were his godfathers.
My father, having heard that I was now sole mistress in my husband’s
house, hastened to bring his daughter, to give me, as he said, a pleasant
companion.
They both appeared in sailor costume, which made me feel greatly
ashamed; and I had them dressed in a proper fashion.
My father ran all over London, visited all the places of interest, laid his
hands on everything he could get in our house, and departed with well-lined
trunks.
I kept my sister with me, furnished her with a magnificent wardrobe, and
gave her in abundance everything she could desire; but in spite of it all, I
could never conquer her hardness of heart, and every day she distressed me
by her constant rudeness.
Her connection with Lord Newborough brought her in contact with a
distinguished ecclesiastic, whom she subsequently married.
We had just heard that my second brother had got into terrible trouble in
Italy, when he made his appearance in order to secure himself from the hands
of justice, which would have infallibly consigned him to the same fate as one
of his cousins, who was sent to the galleys for ten years.
My consternation may be imagined!
My husband was furious, and expressed very forcibly to me his disgust at
being so tormented by this insaziabile canaglia, as he called it. I was almost
as angry as he; nevertheless, I did my best to quiet him, thinking to do good
to my brother; but his bad conduct soon obliged us to send him away.
I got him placed with a merchant at Leghorn, but he, too, could not keep
him for more than a few months.
Since my father’s visit I noticed that milord often forbad me to go to
entertainments frequented by the French nobility, especially the Bourbon
Princes.
This fresh antipathy greatly amused me, though I wondered over so odd a
warning; since at that time I was living in absolute retirement with my
children. Having no thought but for them, I lavished endearments on them
and all the care their growing infirmities needed; for I had the grief of seeing
that I had bequeathed them a very sad inheritance. The eruptions which had
caused me so much suffering made their appearance very early on their little
bodies; the eldest was quite covered with them. Many remedies were tried,
but the root of the evil was never wholly destroyed.
Although their father had never suffered in a similar way, his health,
shattered by other causes, gave way completely; he fell ill of a terrible disease
which lasted a year and ended in his death. In the midst of his severe pains
he would take no help but mine; he gave me constant marks of love, and to
give it effectual expression he considerably increased my annuity.
It was in my arms that he drew his last breath, on the 11th of October,
1807.
His funeral was solemnized with all the pomp befitting his rank and fortune;
all the people of distinction made a point of attending it and did not fail to pay
their touching tributes of condolence to my grief.
The deceased had assigned for his children’s education a sum which was
thought insufficient; a larger was put at my disposal by the Lord Chancellor;
but it was ruled that I should lose it, as well as my guardianship, if I married
again.
My youth was so far past that at first this condition seemed useless and
ridiculous to me.
Meanwhile, I went to drink the waters at Cheltenham, and there I met a
Russian Baron, called Ungern Sternberg, who paid me immense attention; I
was charmed with his kindness, enchanted with his fine manners. He loved
music, dancing, riding, and a hundred other things I, too, liked. This peculiar
similarity of tastes brought us together and soon formed a strong tie between
us.
Later on I met him in the best houses in London, especially and on several
occasions at that of General Hughes, whose wife constantly entertained me
with accounts of the wonderful merits of the gentleman, never tiring of
exalting his talents and virtues.
Thinking she saw that I thoroughly agreed with her, she told me that he
intended to ask for my hand. Such an idea never having entered my head, I
looked upon it as an idle tale and laughed at it. But she returned to the
charge; her husband joined in, and the Baron himself made me a formal offer.
Seeing that this was a serious matter, I did not hesitate in giving an
absolute refusal; alleging my position with regard to my two sons.
Every possible step was taken to make me believe that it would be easy for
me to obtain permission to retain all my rights over them.
My objections were contested so cleverly; I was so lulled with hopes; such
earnest and well-worded entreaties were made to me, that it became well-
nigh impossible to make any further opposition. I yielded, and made up my
mind to contract a second union which everything around me combined to
represent to me in the most tempting light.
My consent given, my future husband went to carry the news to his own
family, while I went to Lady Charlotte Bellasis, my late husband’s niece by
marriage, at Newborough Park.
The Baron joined me there, and our wedding was celebrated on the 11th of
September, 1810.
Immediately afterwards we returned to London to prepare for our
departure.
I will not attempt to describe the grief I felt at having to dismiss my
servants; still less will I try to describe the anguish of my heart when I
realized that it was vain to dream of keeping the guardianship of my children.
Milord’s executors were inexorable, they tore them from me.
Having left at the beginning of November, we travelled across Switzerland in
severe cold, and did not arrive in Petersburg until the last fortnight of January.
Count Pahlen, our uncle, First Minister to the Emperor, received us in the
most friendly fashion; he introduced me to the highest society, and, but for
the bitter coldness of the weather, I should have taken part in all their
gaieties.
If I was not presented at Court, it was because, as an English lady, such a
presentation should have been made by the English Ambassador, and at that
time there was not one, in consequence of the war between the two
countries.
Nevertheless, I was admitted to look on at a brilliant entertainment inside
the Palace; and the Emperor Alexander, having noticed me amongst the other
lady spectators, commanded his first gentleman-in-waiting to show me all the
splendours of that delightful residence.
Everything I looked at, and still more the universal courtesy of manner,
promptly convinced me of the great mistake it is to look upon the Russian
nation as behindhand in European civilization.
Spring having brought back warmth, we went to Reval, to offer our respects
to my mother-in-law, who welcomed us warmly, and showed me much
kindness.
A little later we set sail for the Island of Dago, where lay the Baron de
Sternberg’s principal estates.
All his acquaintances there received me with enthusiasm, and did their best
to divert my mind; but with no success until the birth, in the following month,
of a third son, whom I called Edward, after his father.
How can I describe what this newly-born son was to me, especially when
his first signs of intelligence made me foresee that he would become more
and more worthy of my love?
Feeling unable to let him be out of my sight for a moment, I took him with
me the first time I went to see his brothers.
I had the comfort of finding them pretty well in health; but alas! it was but
too evident to me that perfidious skill had been at work in filling their minds
with unjust prejudices against her who had always loved them so tenderly. In
spite of their goodness of heart, they could not help showing a certain
coolness which greatly grieved me.
I set to work to revive their old love for me, and flatter myself I succeeded.
At the end of a year my husband came to fetch me in one of his own
vessels, manned by his own people, in which I lived as in a house of my own.
While in England I had been given several very great curiosities, among
others a fan from the East Indies and a magnificent bird-of-paradise feather; I
added to these a little piece of work I had made out of the rarest shells then
known, and took the liberty of sending the whole to her Majesty the Empress
Elizabeth, who most graciously had a delightful and flattering letter written to
me, and sent with it a magnificent clasp set with brilliants.
But I will tell nothing more of my return to Russia nor of another journey to
England I made. Let us go back to my parents.
My father had written to me of the deaths, one after another, of my second
brother, my grandmother and my mother; and he was constantly expressing
the most intense wish to embrace me once more before he himself followed
them to the grave.
At last I yielded to his pressing entreaties, moved greatly by a vague hope I
had always kept of seeing again the old Countess Borghi, of whose death I
had never positively heard.
When I got to Italy I made inquiries about her which resulted in my hearing
that she had died when I was scarcely nine years old.
My father, aunt and brother joined me at the hotel where I had put up for
the time; they were all in excellent health.
My brother became my intimate confidant; I told him all my affairs and put
all my concerns into his hands, delegating my authority to him.
Very soon I noticed that he was received very coldly in the good houses to
which I took him; I asked one of my old friends the reason for this, to be told
by her that the young man, having behaved very badly during the course of
his studies at the University of Pisa, where he took his degree in Law, had
brought back with him a doubtful reputation, which day by day grew worse.
My own experience promptly showed me that these suspicions were far
from being without foundation; and thenceforth I left off confiding in him.…
For two consecutive years I took every care of my father; not only did I
provide for his wants, but I invited him to my table; I desired him to come to
the parties I gave; I tried to cheer him up by my talk; I made much of him;
while, on his side, he always showed me the most profound respect, never
calling me anything but milady, and behaving to me like a humble retainer.
In vain I implored him to remember that I owed my existence to him; to
call me his daughter and to treat me like one; I saw that my loving
reproaches awoke no sweet transports of paternal affection. He scarcely
ventured to look me in the face, and spoke only of his gratitude, constantly
repeating that I had been his lucky star and mumbling the word “Borghi” and
another that he never finished.
This confusion and these many mysterious speeches seemed to me the
signs of approaching mental aberration and made me very uneasy.
At last he fell dangerously ill, and I was inconsolable. I sent for doctors; I
got three attendants for him, and ordered that he was to have every comfort.
MARIA STELLA, LADY NEWBOROUGH

FROM A BUST AT GLYNLLIFON

One day they came to tell me that on recovering from a sudden attack he
had uttered my name and asked to see me. I flew to his bedside, kissing him
and weeping over him. He looked at me with eyes full of sorrow, pressed my
hand, and struggled hard to make himself understood; but his paralysed
tongue refused to articulate anything but: “Mio Dio!—Barant, Baranto——”
I was overcome with grief at his state; I was advised to go; they led me
away and put me into my carriage.
On the morrow my brother sent me word that the poor dying man being no
better than on the previous day, a visit from me could not fail to be hurtful
rather than helpful. On the following days he wrote to me in the same
fashion, and at last came himself to tell me, with every sign of grief and
affliction, that our father was no more.
SECOND PART
FROM THE DEATH OF HIM I HAD BELIEVED MY
FATHER UNTIL THE PRESENT TIME

The Funeral—Sea-baths—Rupture with my Brother—My Establishment at


Siena—Chiappini’s Letter—My Reflections—First Steps—Various Pieces
of Information—Verification of Handwriting—Visit of my Elder Son—
Stay in Rome—The Marchioness of B.—Departure of my Children.

My brother appeared to be so much affected by his recent loss that, in spite


of the coolness existing between us for some time past, I kept him to sleep at
my country house.
All the evening he seemed to be sunk in deep thought and overwhelming
grief, which greatly surprised me in a young man who up to then had shown
so many signs of a want of filial affection. He left very early the next morning
without taking leave of me.
I at once sent him the sum necessary for having the funeral solemnized in a
fashion in accordance not with the lowly condition of the deceased, but with
all the dignity due to my own rank.
The marble beneath which lie his mortal remains bears witness to my
liberality, very unlike that of my sister, who, being present at her mother’s
death, allowed her body to be cast into the common pit, when a dozen
crowns would have procured her a more honoured grave.
My constantly recurring eruptions had induced my doctors to prescribe sea-
bathing; my father’s illness having deferred the carrying out of their orders, I
prepared to do so a fortnight after his death, which took place towards the
end of January 1821, and went to spend three weeks at Leghorn, where I
should have been horribly bored if it had not been for the company of my
Edward, who never left me.
On my return to Florence I found out the various tricks my brother had
played on me, first in concealing from me the real condition of my father,
who, I learnt, had recovered his power of speech before breathing his last,
and whose death had not taken place until thirty-six hours after the time
reported to me; secondly, in persuading me to pay the purchase money of a
fine house, supposed to be for me, but the deed of purchase of which he had
had made out in his own name, on the pretext that a married woman could
not do so validly.
Justly incensed at his conduct, I not only upbraided him bitterly, but
ignominiously cast him out and gave him up absolutely and finally.
Surrounded as I was by nothing but gloomy memories, in a place where
everything recalled troubles and misfortunes, I resolved to go to Siena, and
began at once to make my preparations.
There were several reasons that induced me to fix on that town, among
others its pure air and the famous School of Design which is its chief
ornament.
I was well acquainted with the head master of this school, and he had
kindly promised me to take the greatest pains with my young son, who
already showed decided taste and talent for this admirable art.
I had been living in this town about a week when I received by post the
letter I give here, with its translation.

Miledi.
Giunsi finalmente al termine di miei giorni senza vere
svelato ad alcuno un segreto che riguarda me e la vostra
persona direttamente.
Il segreto è l’appresso:
Il giorno dell a vostra nascita da persona che non posso
nominare, e che già è passata all’ altra vita, a me pure nacque
un figlio maschio. Fui richesto à fare uno scambio, e mediante
l emie finanze, di quei tempi, accedi alle molteplici richieste
con vantaggio; ed allora fù che vi adottai per mia figlia, in
quella guisa che mio figlio fu adottato dall’ altra parte.
Vedo che il cielo ha supplito alle mie mancanze, con porvi in
uno stato di miglior condizione del vostro padre, sebbene esso
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

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

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookultra.com

You might also like