To access the contents, click the chapter and section titles.

Oracler Programming with Visual Basicr
(Publisher: Sybex, Inc.)
Author(s): Nick Snowdon
ISBN: 0782123228
Publication Date: 10/01/98

Table of Contents


Introduction

Why a Book on Oracle and Visual Basic?

This is an unusual book as far as computer literature goes in that it covers two quite separate areas of information technology. Many good books are available on Oracle, although nearly every one is designed as a source of information for database administrators. There are probably more books on Visual Basic than any other topic except perhaps the Web, but you will rarely see the word “Oracle” in the indexes. The lack of information is what I found myself dealing with a few years ago. Even with my strong background in Visual Basic (version 3 at the time), I found getting myself connected to an Oracle database and making it perform efficiently and effectively posed a problem that needed an answer.

This book is a personal one because it provides the resource I would have liked to have had a few years ago. It combines an understanding of the basic concepts about Oracle without which you will have a hard time communicating with database administrators or carrying out the administration role yourself if you are caught in that situation. (Oracle is not the simplest of databases to administer, which is something that is not always appreciated by project managers.)

Most Oracle texts are generally too complicated for the novice who has a hard time trying to decide which things are important enough to learn and which can be safely discarded until more time is available for training. Visual Basic books, on the other hand, are either introductory or deal exclusively with Microsoft SQL Server. So many questions are left unanswered for Oracle developers, even if it is just seeing an example of how something works.

The paucity of books for Oracle developers and the absence of any coverage of Oracle in the Visual Basic literature has led to the need for such coverage; this book will provide you with the information to proceed with your VB front ends to Oracle.

Who Should Read This Book?

The aim of this book is to provide a journey into the world of Oracle for experienced Visual Basic developers. You will not find any details about Visual Basic programming apart from those aspects that apply to data access, and there is little of use to those working with Microsoft Access or SQL. The “Resources” section, later in this introduction, points out several places to find information for novices and more advanced developers. You should keep the following pointers in mind when deciding if this book is for you:

  You need a developer’s view of Oracle.
  You have to provide assistance to database administrators, or you need a concise text to help fulfill that role.
  You are a Visual Basic developer new to the world of interfacing with Oracle.
  You are an experienced Visual Basic developer who needs the latest information about how to get the most from an Oracle database.
  You want one book that can be used as a reference to Visual Basic and Oracle without having to search through huge numbers of manuals, help files, and online knowledge bases.

The Structure of the Book

This book is divided into four sections, two sections on Oracle from a Visual Basic viewpoint and two sections on Visual Basic from the Oracle viewpoint. The book is set up so that it can be read from one end to the other, progressing from concepts to database creation in the first half and from concepts to the more advanced techniques in the second half. However, each chapter is relatively self-contained so you can dip and dive into it as you see fit.

The book is organized into the following sections:

Introducing Oracle describes the features that make Oracle the enterprise-quality database that it is as well as the architecture that distinguishes it from a file-based system such as Microsoft Access. We describe the internal architecture of an Oracle database from the system processes and memory utilization to the data files that form the permanent storage for the database, and then we see how to create and maintain an Oracle database. You will also see the fundamentals of database design from the conceptual model to the physical implementation.
Queries and Stored Procedures first describe how to access and update data in the database using standard SQL commands. There is coverage of these commands at the introductory level but also information on how to use the more sophisticated features available in Oracle. The section includes the SQL commands as well as an introduction to the procedural programming language PL/SQL, including how to write stored procedures that can communicate with Visual Basic.
Data-Access Technology gives an overview of the various components necessary for communicating between Visual Basic on the client and an Oracle database server. We will see Oracle’s networking solutions as well as the ways Visual Basic can communicate with this networking layer. The section introduces the most common data-access technologies used from VB and covers some design issues you need to be aware of before starting your application development.
Advanced Oracle Techniques goes into depth covering the five most common data-access technologies. We will see the object models of each, how to set up a connection with the database, and how to retrieve result sets from the database. We will see how to use read-only and updatable result sets and then move on to accessing stored procedures and other advanced capabilities. We also look at how to use each of the methods to look at the structure of the database.

Resources

There is a variety of resources that you will find you need as technology changes and you run into problems that are not covered in this book. The following is a personal list, and no doubt you will find your own resources to add to it.

Courses

Oracle offers a large number of courses in many aspects of the Oracle database, from an introduction to SQL and PL/SQL to Advanced and Oracle Parallel Server. These courses are important to a thorough understanding of the product. Contact your local Oracle support team for your nearest education site.

There are now many courses in Microsoft technologies leading up to certified developer status. You may also find courses at your local educational centers at a more affordable rate.

Books

At any good bookstore, you will find more advanced texts on Oracle, for those of you working toward being a database administrator, as well as more introductory books on Visual Basic. Some of the books you may wish to investigate are listed below. You should note that none of the Visual Basic books you will encounter other than this one cover Oracle except in passing; similarly, Oracle books will not mention Visual Basic.

  Mastering Visual Basic 6 by Evangelos Petroutsos (Sybex, 1998)
  Database Access with Visual Basic by Jeffrey P. Mcmanus (SAMS, 1998)
  Database Developers Guide with Visual Basic 4 by Roger Jennings (SAMS, 1997)
  The Hitchhiker’s Guide to Visual Basic and SQL Server by William Vaughn (Microsoft Press, 1996)
  Mastering Oracle 8.1 by Jatinder Prem, (Sybex, 1999)
  Oracle PL/SQL Programming by Steven Feuerstein, (O’Reilly, 1997)
  Oracle Performance Tuning by Mark Gurry and Peter Corrigan (O’Reilly, 1996)

Periodicals

Over the years, I have found several periodicals useful. Although books are an excellent reference resource, periodicals capture the latest technology changes as well as give you a variety of views. Those periodicals you should investigate are

  Visual Basic Programmers Journal (www.devx.com).
  Microsoft Systems Journal (www.microsoft.com./msj/).
  Oracle magazine (www.oramag.com). You may be able to get a free subscription.
  Database Programming and Design (www.dbpd.com). This periodical is due to be replaced by Intelligent Enterprise.

Web Sites

The Internet is vital for keeping in touch with the latest technology as well as allowing you to download sample code. There are any number of sites devoted to Visual Basic and several to Oracle.

  One of the most important Web sites is Carl and Gary’s Visual Basic Home Page. It has links to other VB sites; you can even add your own link. Visit Carl and Gary’s at http://www.cgvb.com.
  Microsoft’s Web site is http://www.microsoft.com.
  Oracle’s Web site is http://www.oracle.com.

Newsgroups

Newsgroups are useful for posing technical questions to the computer community as a whole. There is no guarantee you will get an answer or, if you do, that it will be correct, but you will usually get enough information to get you started. Typical news groups are listed below. Note that you must have access to a news server through your Internet provider.

  comp.database.oracle.misc
  comp.database.oracle.serve
  comp.lang.basic.visual.database
  comp.lang.basic.visual.misc
  microsoft.public.vb.database.rdo


NOTE
Carl and Gary’s Web site has an archive of many of the VB-related sites at http://www.cgvb/gcgi/news_form.

Technical Assistance

Oracle technical support has a knowledgeable staff in most of the Microsoft technologies, and Microsoft has equally excellent staff experienced with Oracle. There is usually a charge associated with this support, but it is worthwhile considering the amount of time you can spend, unsure why something is not working or wondering if it ever works. This book could not have been produced without the help of these companies’ technical support staff.

  http://support.oracle.com/MetaLink covers questions and answers on many Oracle related topics
  Technical Forums for ODBC and OracleObjects for OLE at http://support.oracle.com
  http://support.microsoft.com/support
  Oracle’s new Technology Network for Developers at http://technet.oracle.com

Other Resources

Over the years, I have found that the Microsoft services, Technet, and the Microsoft Developers Network (MSDN) are invaluable sources of information. There is a charge for both of these services on CD, though you can get access to the online knowledge bases on the Microsoft Web site.

A Final Note

Putting this book together has been a demanding task especially because some of the information has been hard to come by. We have made every effort to present as complete and accurate information as we can. Any feedback is useful, whether it is positive or negative, so long as we can improve the source of information for VB developers in an Oracle environment. You can send your suggestions by using the Contact area of the Sybex Web site (www.sybex.com). Once on the Contact page, you can choose the “Book Content Issues Form.”


Table of Contents
[an error occurred while processing this directive]