Cover image for Visual Basic 6 database programming bible
Title:
Visual Basic 6 database programming bible
Author:
Freeze, Wayne S.
Personal Author:
Publication Information:
Foster City, CA : IDG Books Worldwide, 2000.
Physical Description:
xxxiii, 728 pages : illustrations ; 24 cm +1 computer laser optical discs (4 3/4 in.)
General Note:
Includes index.
Language:
English
Title Subject:
ISBN:
9780764547287
Format :
Book

Available:*

Library
Call Number
Material Type
Home Location
Status
Central Library QA76.9.W43 F74 2000 Book and Software Set Central Closed Stacks
Searching...

On Order

Summary

Summary

Designed for experienced Visual Basic programmers needing to master the details of building applications that access relational and other data stores. This guide is organized as a reference with entries that include tutorials, step-by-step instructions, code samples and other elements designed to speed mastery of the subject matter.


Table of Contents

Prefacep. ix
Acknowledgmentsp. xv
Part I Database Programming Fundamentalsp. 1
Chapter 1 Basic Conceptsp. 3
Why Use a Database?p. 3
Storing informationp. 3
Concurrencyp. 5
Securing your datap. 6
Performing backups and using transaction logsp. 6
A database is the answerp. 7
Database Architecturep. 8
Servers and clientsp. 8
Database servers and database clientsp. 9
Types of Databasesp. 11
Hierarchical databasesp. 11
Networked databasesp. 11
Indexed databasesp. 13
Relational databasesp. 13
Common Databasesp. 14
SQL Server 7.0p. 14
Microsoft Jet 3.5/4.0p. 15
Oracle 8ip. 15
Chapter 2 The Relational Database Modelp. 19
Introducing the Structured Query Languagep. 19
Relational historyp. 19
Business benefits of a relational databasep. 23
Parts of a Relational Databasep. 24
Tables and rows of datap. 24
Columns and data typesp. 24
Indexes and keysp. 25
Viewsp. 27
Normalizationp. 27
Chapter 3 Designing a Relational Databasep. 31
Overview of the Design Processp. 31
Stating the Problemp. 32
Brainstormingp. 33
Brainstorming Toy Collectorp. 33
Reviewing the resultsp. 34
Mapping the results to data typesp. 36
Modeling Entities and Relationshipsp. 37
Entity/relationship modelingp. 37
Identifying entities and attributesp. 38
Identifying Relationshipsp. 44
Drawing the E/R modelp. 45
Building the Databasep. 46
Chapter 4 SQL Statement Primerp. 49
Using SQL Statementsp. 49
SQL statementsp. 49
SQL data typesp. 50
Testing SQL statementsp. 53
The Select statementp. 53
Simple Select statementsp. 54
Selecting a subset of a tablep. 56
Sorting resultsp. 59
Using multiple tablesp. 60
Nested queriesp. 62
Using functionsp. 63
Inserting Rows into a Tablep. 64
A simple Insert statementp. 65
Deleting Rows from a Tablep. 67
A Sample Delete Statementp. 67
Updating Rows in a Tablep. 68
A Sample Update Statementp. 69
The Create Table Statementp. 70
The Create Index Statementp. 71
A Sample Create Index Statementp. 72
The Create View Statementp. 72
Chapter 5 Introducing Visual Basicp. 77
Why Use Visual Basic?p. 77
Basic historyp. 77
Database integrationp. 80
Visual Basic Editionsp. 82
Learning Editionp. 83
Professional Editionp. 83
Enterprise Editionp. 84
Other Variationsp. 84
Types of Visual Basic Programsp. 85
Standard EXEsp. 85
ActiveX DLLs/Controls/EXEsp. 86
IIS Applicationsp. 87
DHTML Applicationsp. 87
Chapter 6 Accessing Databases from Visual Basicp. 89
Microsoft Database Programming APIsp. 89
ODBCp. 90
ODBC architecturep. 90
Drawbacks to ODBCp. 91
Database Access Objects (DAO)p. 91
Remote Database Objects (RDO)p. 92
OLE DBp. 92
Data providersp. 92
Data consumersp. 93
ActiveX Data Objects (ADO)p. 93
OLE DB providersp. 93
Custom OLE DB providersp. 94
Visual Basic Database Toolsp. 94
Data Environment Designerp. 95
Data View Windowp. 96
Database Designerp. 97
SQL Editorp. 98
T-SQL Debuggerp. 98
Query Designerp. 99
Data Reporter Designerp. 100
UserConnection Designerp. 100
Part II Beginning Database Programmingp. 103
Chapter 7 Codeless Database Programmingp. 105
Data Bindingp. 105
What is data binding?p. 105
How does data binding work?p. 106
Connecting to the databasep. 106
Intrinsic bound controlsp. 107
ActiveX bound controlsp. 107
Building the Codeless Programp. 108
Preparing your projectp. 108
Configuring the ADO Data Controlp. 109
Adding bound controlsp. 113
Testing your programp. 114
Finishing your programp. 114
Chapter 8 More About Bound Controlsp. 119
Bound Controls Revisitedp. 119
Key propertiesp. 119
Key methodsp. 119
Key eventsp. 120
Data validationp. 121
Formatting datap. 125
Using the Picture and Image Controlsp. 127
Using the Masked Edit Controlp. 127
Key propertiesp. 128
Creating an input maskp. 129
Prompting the userp. 130
Database considerationsp. 131
Using the DateTimePicker Controlp. 131
Key propertiesp. 131
Choosing a user interfacep. 134
Using the DataCombo Controlp. 135
Key propertiesp. 135
Key methodsp. 136
Configuring the controlp. 137
Selecting from a listp. 137
Translating a valuep. 137
Chapter 9 Programming with Data Environmentsp. 141
The Data Environment Designerp. 141
Enabling the Data Environment Designerp. 142
Exploring the Data Environment Designerp. 142
Data Environment building blocksp. 144
Connecting to Your Databasep. 145
Setting Connection propertiesp. 146
Selecting an OLE DB providerp. 146
Entering connection informationp. 146
Creating Commands with the Designerp. 147
Adding a commandp. 148
Setting general command propertiesp. 148
Setting parametersp. 149
Setting advanced propertiesp. 151
Saving the Commandp. 153
Adding a Child Commandp. 154
Inserting a stored procedurep. 157
Building Programs with the Designerp. 158
Drawing controlsp. 158
Setting optionsp. 160
Data Environment RunTime Object Modelp. 161
DataEnvironment propertiesp. 161
DataEnvironment methodsp. 162
Data Environment eventsp. 163
Viewing Databases with the Data View Windowp. 163
Configuring the Data View Windowp. 164
Working with database diagramsp. 164
Working with tablesp. 165
Working with viewsp. 166
Working with stored proceduresp. 167
Chapter 10 Building Reports with the Microsoft Data Report Designerp. 169
Introducing the Microsoft Data Reportp. 169
Using the Data Report Designerp. 170
Getting your datap. 170
Building a data report's structurep. 170
Placing controls on your reportp. 172
Programming Your Reportp. 176
Previewing a reportp. 176
Printing a Reportp. 177
Exporting reportsp. 178
Tracking asynchronous activityp. 179
The Data Report object modelp. 179
DataReport propertiesp. 179
DataReport methodsp. 181
Key DataReport eventsp. 182
Controls collection propertiesp. 184
ExportFormat object propertiesp. 184
ExportFormats collection propertiesp. 184
ExportFormats collection methodsp. 185
RptError object propertiesp. 187
RptFunction control propertiesp. 187
RptImage control propertiesp. 189
RptLabel control propertiesp. 190
RptLine control propertiesp. 192
RptShape control propertiesp. 193
RptTextBox control propertiesp. 194
Section object propertiesp. 195
Sections collection propertiesp. 195
Part III Hardcore ADOp. 199
Chapter 11 The ADO Object Modelp. 201
Introducing ActiveX Data Objects 2.5p. 201
The ADO object modelp. 201
New in ADO 2.5p. 203
Introducing ActiveX Data Objects Extensionsp. 204
Basic ADO Programmingp. 207
Connecting to the data sourcep. 207
Executing a commandp. 207
Playing with Recordsetsp. 208
Chapter 12 Connecting to a databasep. 211
The Connection Objectp. 211
Connection object propertiesp. 211
Connection object methodsp. 214
Connection object eventsp. 217
The Error Objectp. 223
Error object propertiesp. 223
The Errors Collectionp. 223
Errors collection propertiesp. 224
Errors collection methodsp. 224
Connecting To Database Serverp. 225
Connection stringsp. 225
Opening a connectionp. 227
Closing a connectionp. 231
Analyzing Errorsp. 231
Watching connection activityp. 232
Chapter 13 Using Commands and Stored Proceduresp. 235
Introducing the ADO Command Objectp. 235
The Command Objectp. 236
Command object propertiesp. 236
Command bject methodsp. 238
The Parameter Objectp. 240
Parameter object propertiesp. 240
Parameter object methodsp. 245
The Parameters Collectionp. 245
Parameters collection propertiesp. 245
Parameters collection methodsp. 245
Running SQL Statementsp. 246
Running a simple commandp. 246
Returning a Recordsetp. 248
Running with parametersp. 250
Stored Proceduresp. 251
Advantages of stored proceduresp. 251
Stored procedures and the Data View Windowp. 253
Creating a Data Linkp. 253
Creating a stored procedurep. 254
Debugging stored proceduresp. 256
Calling a stored procedurep. 261
Chapter 14 Working with Recordsets--Part Ip. 265
The Recordset Objectp. 265
Recordset object propertiesp. 266
Recordset object methodsp. 272
Recordset object eventsp. 283
Before Opening a Recordsetp. 289
Locking considerationsp. 289
Choosing a cursor typep. 292
Picking a cursor locationp. 293
Opening a Recordsetp. 294
Using Source stringsp. 294
Using Command objectsp. 295
Chapter 15 Working with Recordsets--Part IIp. 299
More About Recordsetsp. 299
The Field Objectp. 299
Field object propertiesp. 300
Field object methodsp. 304
The Fields Collectionp. 305
Fields collection propertiesp. 305
Fields collection methodsp. 306
Moving Around a Recordsetp. 307
The Recordset Movement Demo programp. 307
Moving sequentiallyp. 309
Moving randomlyp. 312
Searching, Sorting, and Filteringp. 314
Finding a rowp. 315
Sorting rowsp. 316
Filtering rowsp. 317
Collecting recordset informationp. 318
Getting Information From Fieldsp. 320
Binding a field to a controlp. 320
Accessing field valuesp. 320
Working with large valuesp. 321
Chapter 16 Working with Recordsets--Part IIIp. 327
Updating Recordsetsp. 327
Updating an existing recordp. 329
Adding a new recordp. 331
Deleting an existing recordp. 332
Performing batch updatesp. 333
Making Transactionsp. 335
Why do I need transactions?p. 335
ADO and transactionsp. 336
Working with Disconnected Recordsetsp. 338
Making a recordset localp. 339
Working with Other Recordset Functionsp. 342
Cloning a recordsetp. 342
Resyncing and requerying a recordsetp. 342
Returning multiple recordsetsp. 342
Alternate ways to get datap. 343
Setting the cache sizep. 344
Part IV COM+ Transactions and Message Queuesp. 347
Chapter 17 Building Your Own Bound Controlsp. 349
Introducing Data Sources and Consumersp. 349
Data sourcesp. 350
Data consumersp. 350
A Brief Introduction to COM Componentsp. 351
What is a COM component?p. 351
Using class modulesp. 351
Persistable objectsp. 352
Class module propertiesp. 353
Class module property routinesp. 354
Class module eventsp. 354
The PropertyBag objectp. 355
Building a Data Sourcep. 356
Module-level declarationsp. 357
Binding datap. 357
Moving through the recordsetp. 359
Exporting recordset informationp. 359
Using the DataSpinner controlp. 360
Building a Data Consumerp. 360
Exposing propertiesp. 361
Setting property attributesp. 362
Persisting propertiesp. 364
Pulling It All Togetherp. 366
Chapter 18 Using COM+ Transactionsp. 369
A Brief Overview of COM+p. 369
Multi-tier applicationsp. 369
Transaction Serversp. 371
COM+ applicationsp. 372
The COM+ transaction serverp. 373
The object contextp. 373
The Component Services utilityp. 373
Introducing COM+ Transactionsp. 374
The ACID testp. 375
Class module properties for transactionsp. 376
The ObjectContext objectp. 377
ObjectContext object propertiesp. 378
ObjectContext object methodsp. 378
Constructing a COM+ Transactionp. 380
Holding type informationp. 380
Accessing the database with transactionsp. 384
Building a simple test programp. 392
Chapter 19 Using Message Queuesp. 399
How Message Queuing Worksp. 399
Synchronous processingp. 399
Asynchronous processingp. 400
Benefits of message queuingp. 401
Microsoft Message Queuingp. 404
Requests and responsesp. 404
Types of queuesp. 404
Public and private queuesp. 405
Message queuing and COM+ transactionsp. 406
Message Queuing Object Modelp. 406
The MSMQQueueInfo Objectp. 408
MSMQQueueInfo object propertiesp. 408
MSMQQueueInfo object methodsp. 409
The MSMQQueue Objectp. 410
MSMQQueue object propertiesp. 411
MSMQQueue object methodsp. 411
The MSMQMessage Objectp. 414
MSMQMessage object propertiesp. 415
MSMQMessage object methodsp. 418
MSMQEvent object eventsp. 418
Accessing Message Queuesp. 419
Building the client programp. 420
Building the server programp. 424
Viewing Message Queue Informationp. 427
Part V The Impact of XMLp. 431
Chapter 20 Introducing XMLp. 433
Documenting Informationp. 433
Tagging informationp. 433
A Simple XML documentp. 435
XML attributesp. 438
Writing XML Documentsp. 439
Creating an XML documentp. 439
Identifying XML elementsp. 439
Creating XSL Style Sheetsp. 440
Other XML toolsp. 446
Working with XML and ADOp. 446
Creating an XML File with ADOp. 447
Looking at the XML filep. 447
Understanding the Benefits of Using XMLp. 449
Data interchangep. 449
Separating content from formattingp. 451
Vendor independencep. 452
Industry acceptancep. 452
Chapter 21 The Document Object Modelp. 455
The Document Object Modelp. 455
Document hierarchyp. 456
Other objectsp. 458
The XMLDOMNode Objectp. 458
XMLDOMNode object propertiesp. 458
XMLDOMNode object methodsp. 460
The DOMDocument Objectp. 464
DOMDocument object propertiesp. 464
DOMDocument object methodsp. 466
DOMDocument object eventsp. 468
The XMLDOMAttribute objectp. 469
XMLDOMAttribute object propertiesp. 469
XMLDOMAttribute object methodsp. 469
The XMLDOMCDATASection Objectp. 469
XMLDOMCDATASection object propertiesp. 470
XMLDOMCDATASection object methodsp. 470
The XMLDOMComment Objectp. 470
XMLDOMComment object propertiesp. 471
XMLDOMComment object methodsp. 471
The XMLDOMDocument Type Objectp. 471
XMLDOMDocument Type object propertiesp. 471
XMLDOMDocument Type object methodsp. 472
The XMLDOMElement Objectp. 472
XMLDOMElement object propertiesp. 472
XMLDOMElement object methodsp. 472
The XMLDOMEntity Objectp. 473
XMLDOMEntity object propertiesp. 473
XMLDOMEntity object methodsp. 474
The XMLDOMEntityReference Objectp. 474
The XMLDOMNotation Objectp. 474
XMLDOMNotation object propertiesp. 475
XMLDOMNotation object methodsp. 475
The XMLDOMProcessingInstruction Objectp. 475
XMLDOMProcessingInstruction object propertiesp. 475
XMLDOMProcessingInstruction object methodsp. 475
The XMLDOMText Objectp. 476
XMLDOMText object propertiesp. 476
XMLDOMText object methodsp. 476
The XMLDOMParseError Objectp. 478
XMLDOMParseError object propertiesp. 478
XMLDOMParseError bject methodsp. 478
The XMLHttpRequest Objectp. 478
XMLHttpRequest object propertiesp. 479
XMLHttpRequest object methodsp. 479
Chapter 22 Integrating XML with Internet Information Server Applicationsp. 483
Requesting Informationp. 483
Getting Customer Information With XMLp. 484
Building the Simple Web Pagep. 484
Requesting Customer Informationp. 486
Defining the XML documentsp. 486
Requesting a customerp. 487
Getting a customer from the databasep. 492
Updating Customer Informationp. 496
Defining the update XML documentsp. 496
Requesting an updatep. 497
Processing an upda3tep. 499
Part VI SQL Serverp. 505
Chapter 23 Overview of SQL Serverp. 507
Overview of SQL Server 7p. 507
SQL Server editionsp. 507
SQL Server utilitiesp. 509
Database Architecturep. 512
System databasesp. 512
SQL Server data typesp. 516
Connecting to SQL Server with ADOp. 518
SQL Server Securityp. 518
Authentication in SQL Serverp. 518
SQL Server authorizationp. 520
SQL Server rolesp. 520
Chapter 24 Creating Database Objects with SQL Serverp. 523
Introducing Enterprise Managerp. 523
Enterprise Manager fundamentalsp. 524
Registering a database serverp. 525
Viewing database servers and their objectsp. 527
Browsing datap. 530
Databases and Tablesp. 531
Creating a databasep. 532
Creating a tablep. 535
Indexes and Diagramsp. 539
Creating an indexp. 540
Creating a database diagramp. 547
Managing Securityp. 550
Creating a loginp. 550
Granting permissions in a databasep. 553
Chapter 25 Creating Stored Procedures with SQL Serverp. 557
Introducing Stored Proceduresp. 557
Why use stored procedures?p. 557
Introducing Transact-SQLp. 559
Commentsp. 559
Identifiersp. 560
Variablesp. 561
Functionsp. 561
Expressionsp. 563
Flow controlp. 563
Cursorsp. 565
Processing transactionsp. 570
Other useful statementsp. 571
Creating and Testing Stored Proceduresp. 573
Creating stored procedures in SQL Serverp. 574
Testing stored procedures in Query Analyzerp. 575
Part VII Oracle 8ip. 579
Chapter 26 Overview of Oracle8ip. 581
Overviewp. 581
Oracle8i editionsp. 582
Oracle8i utilitiesp. 583
Understanding the Database Architecturep. 586
Key database objectsp. 587
Memory architecturep. 589
Network architecturep. 590
Oracle8i data typesp. 590
Connecting to Oracle8ip. 591
Oracle8i Securityp. 593
Authenticationp. 593
Authorizationp. 593
Rolesp. 596
Chapter 27 Creating Database Objects with Oracle8ip. 599
Introducing SQL *Plusp. 599
Command-Line SQL *Plusp. 599
Connecting to your database with SQL *Plusp. 600
Entering commandsp. 601
Useful commandsp. 601
Introducing Enterprise Managerp. 603
The Enterprise Manager consolep. 604
SQL *Plus Worksheetp. 607
DBA Studiop. 610
Creating Tablespacesp. 612
Before you create a tablespacep. 612
Creating your tablespacep. 613
Creating Tables and Indexesp. 614
Creating your tablep. 615
Modifying a tablep. 619
Creating an indexp. 621
Managing Securityp. 621
Creating rolesp. 621
Creating usersp. 622
Granting permissionsp. 624
Chapter 28 Creating Stored Procedures with Oracle8ip. 627
Introducing PL/SQLp. 627
Commentsp. 627
Constantsp. 628
Identifiersp. 628
Variablesp. 628
Functionsp. 629
Block structurep. 630
Procedures, functions, and packagesp. 633
Expressionsp. 634
Flow controlp. 635
Cursorsp. 637
Transactionsp. 641
Other useful statementsp. 642
Creating Stored Proceduresp. 643
Creating a procedure or functionp. 644
Creating a packagep. 644
Part VIII Microsoft Jetp. 647
Chapter 29 Overview of Microsoft Jetp. 649
Overview of Jetp. 649
Microsoft Jet versionsp. 650
Jet and DAOp. 651
Jet utilitiesp. 652
Understanding the Database Architecturep. 652
.MDB filesp. 652
.LDB filesp. 653
.MDW Filesp. 653
Database objectsp. 654
Linked databasesp. 654
Database capacitiesp. 655
Jet data typesp. 655
Connecting to Jet with ADOp. 655
Jet securityp. 658
Share-level securityp. 658
User-level securityp. 659
Chapter 30 Creating Database Objects with Microsoft Jetp. 663
Introducing the Visual Data Managerp. 663
Opening an existing databasep. 664
Viewing Database Informationp. 665
Running an SQL queryp. 665
Constructing Databases, Tables, and Indexesp. 669
Creating a new databasep. 669
Creating a tablep. 670
Creating an indexp. 672
Using the DAO and ADOX alternativesp. 673
Managing Securityp. 673
The security definition filep. 673
Managing users and groupsp. 673
Managing permissions and ownershipp. 676
Appendix What's on the CD-ROMp. 679
Indexp. 709
End Users Licensep. 729
CD-ROM Installation Instructionsp. 733

Google Preview