Visual Basic 6 Programming Blue Book: The Most Complete, Hands-On Resource for Writing Programs with Microsoft Visual Basic 6!:Alphabet Soup: ODBC, ADO, And More
function GetCookie (name)
{
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen)
{
var j = i + alen;
if (document.cookie.substring(i, j) == arg) {
var end = document.cookie.indexOf (";", j);
if (end == -1)
end = document.cookie.length;
return unescape(document.cookie.substring(j, end));
}
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
var m1='';
var gifstr=GetCookie("UsrType");
if((gifstr!=0 ) && (gifstr!=null)) { m2=gifstr; }
document.write(m1+m2+m3);
Keyword
Title
Author
ISBN
Publisher
Imprint
Brief
Full
Advanced Search
Search Tips
Please Select
-----------
Components
Content Mgt
Certification
Databases
Enterprise Mgt
Fun/Games
Groupware
Hardware
IBM Redbooks
Intranet Dev
Middleware
Multimedia
Networks
OS
Prod Apps
Programming
Security
UI
Web Services
Webmaster
Y2K
-----------
New Titles
-----------
Free Archive
To access the contents, click the chapter and section titles.
Visual Basic 6 Programming Blue Book: The Most Complete, Hands-On Resource for Writing Programs with Microsoft Visual Basic 6!
(Publisher: The Coriolis Group)
Author(s): Peter G. Aitken
ISBN: 1576102815
Publication Date: 08/01/98
function isIE4()
{
return( navigator.appName.indexOf("Microsoft") != -1 && (navigator.appVersion.charAt(0)=='4') );
}
function bookMarkit()
{
var url="http://www.itknowledge.com/PSUser/EWBookMarks.html?url="+window.location+"&isbn=0";
parent.location.href=url;
//var win = window.open(url,"myitk");
//if(!isIE4())
// win.focus();
}
Search this book:
Previous
Table of Contents
Next
Chapter 20Alphabet Soup: ODBC, ADO, And More
Trying to understand Visual Basics database terminology can be frustrating. Heres a crash course on what all of those acronyms stand for.
From the very beginning, Microsoft has viewed database development as one of Visual Basics main uses. Over the years, newer and better database tools have been added to Visual Basic to ensure that programmers always have the latest technology at their fingertips. As new tools have been added, however, older tools havent been discarded, but instead theyve been kept as part of Visual Basic to ensure backward-compatibility with older programs. Consequently, Visual Basics database toolbox can be rather confusing to a new programmer who is trying to figure out which tool to use for a specific job and how the various tools relate to each other. As they say in baseball, You cant tell the players apart without a scorecard. This chapter is your scorecard for the Visual Basic database game.
Why does Visual Basic have so many players? The main reason is that database technology is constantly evolving. As new data access models are introduced, the older models cannot simply be dropped, because they are needed to support older applications that were written using these technologies.
Some Terminology
Undoubtedly, experienced database programmers throw around a lot of weird terms. Before continuing with this chapter, you need to know a few of these terms:
Back endThis part of a database application maintains the data and performs the actual database functions. (Sometimes called server.) This part exchanges commands and data with the client, the part of the database system that the user interacts with.
ClientThe part of a database application the user interacts with. (Also called the front end.) The clients job is to handle the display and entry of data. This part generally does not perform any actual database functions, which are the job of the server, or back end.
CursorA temporary, read-only table that holds the results of a query.
Data sourceUnfortunately, this term has two meanings that are only partially related. Generally, a data source is the ultimate origin of the datathe name of the file(s) in which the data is located and, when needed, the name of the computer where the files are located. In Visual Basic, data source also refers to the object that provides the data to your program. For example, an ADO Data control can serve as a programs data source.
Front endSee client
QueryA set of instructions for retrieving, modifying, inserting, or deleting data in a database.
ServerSee back end. Also refers to a remote computer where the databases back end is located.
Structured Query Language
Structured Query Language is almost always referred to as SQL (pronounced S-Q-L, not sequel, as it is more commonly but incorrectly pronounced). SQL is designed specifically for accessing and manipulating databases, and it has become the de facto standard for database programming. I am not aware of any relational database back end that doesnt support SQL (although they often support other proprietary languages, as well).
SQL originated in 1974 at an IBM research lab as the Structured English Query Language, or SEQUEL. Since then, the language has evolved into todays SQL. Unfortunately, the pluralSQLsshould probably be used, because no single accepted SQL standard exists. Not only do several SQL standards exist, but many vendors have added product-specific extensions (extra features) to SQL for their database programs. Access SQL, supported by the Access database engine, is a good example. While the bulk of the language is common to all the different implementations, differences do exist.
Unlike Basic and most other programming languages, SQL is a nonprocedural language, which means that SQL contains no statements or constructs to control the sequence, or order, of program execution. Thus, SQL does not have the equivalent of Basics If...Then...Else or Select Case statements, nor does SQL support named procedures. SQL statements are limited to expressing what you want to do; the program that carries out the SQL instructions interprets the statement and returns the result.
Before going any further, take a look at a couple of example SQL statements, to get familiar with its structure. These examples work with a table named Clients that has fields named FirstName, LastName, Address, City, State, ZIP, and Telephone. To obtain a list of all the records for individuals in New York, the following SQL statement is used:
SELECT * FROM Client WHERE State = NY
Can you see why SQL is described as English-like? The meaning of this command is clear: Select all fields from the table named Clients where the State field contains NY. What if you dont need all the fields in the result? The following SQL statement displays only the FirstName, LastName, and Telephone fields from those records where the State field contains NY:
SELECT FirstName, LastName, Telephone FROM Client WHERE State = NY
The following statement goes one step further and sorts the result list by LastName:
SELECT FirstName, LastName, Telephone FROM Client WHERE State = NY _
ORDER BY LastName
Remember, SQL is not a Visual Basic technology per se, but rather a universal (or nearly universal) database language that Visual Basic supports. The database project in the next few chapters demonstrates how to perform a variety of database manipulations by using SQL. This project doesnt attempt to cover the entire SQL languagethat topic is large enough for its own book. Generally, trying to learn a great deal of SQL right off the bat isnt a good idea. Start by working through the next few chapters. Then, when venturing out on your own database projects, you can turn to an SQL reference, as needed, to accomplish specific tasks.
Previous
Table of Contents
Next
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc.
All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.
Wyszukiwarka
Podobne podstrony:
Dance Now Moment The Ways (20 01 2015) Tracklista20 01 Zbiorowe bariery ochronne?lustrady v1 1tekst ustawy 20 01 11zad kol2 20 01 2012100 Hard Dance Hits 2015 (20 01 2015) TracklistFM wyklad 12 20 01 2011r 20 01Analiza Wykład 13 (20 01 11)1995 01 20 SupertrampTI 01 11 20 T plTI 01 04 20 T pl(1)pdm 2015 01 20więcej podobnych podstron