Wednesday, August 20, 2008


SQL ("Structured Query Language") is an ANSI Standard computer language commonly used to access data stored in databases. With SQL you can:

  • Retrieve data from a database querying using the SQL SELECT Statement
  • Control which data is accessed using the SQL WHERE Clause
  • Insert rows into a database using the SQL INSERT Statement
  • Update rows in a database using the SQL UPDATE Statement
  • Delete rows from a database using the SQL UPDATE Statement

Each RDBMS (DB2, MySQL, Oracle, SQL Server) follows the ANSI Standard to a large degree and then add value adding features. This tutorial will focus on the ANSI Standard and avoid vendor specific features.

SQL Syntax and Conventions

SQL statements are represented as text.

SQL statements have keywords that must be spelled following rules. The keywords can be upper or lower case - SQL is not case sensitive. By convention and to improve readability, this tutorial spells SQL keywords in upper case.

SQL statements are independent of text lines. A single SQL statement can be placed on one text line or on multiple. In addition, multiple SQL statements can be combined on a single text line. By convention and to improve readability, this tutorial does not put more than one SQL statement on a single text line. Further, SQL statements are often broken into multiple lines.

A SQL statements may be terminated by a semi-colon or the word 'GO'. This tutorial leaves these terminators out. Please supply as needed.

1.2 The Visual Basic Environment

Before you can program in Visual Basic, you need to install VB6 in your computer. If you do not own  VB6 yet , you can purchase it from by clicking the link below:

 Microsoft Visual Basic 6.0 Professional

Basically any present computer systems should be able to run the program, be it a  Intel Pentium II, Intel Pentium III, Intel Pentium IV or even AMD machines, VB6 can run without any problem. It may not be true for VB2005, older machines might not be able to run VB2005 as it take up much more resources, therefore I still prefer using VB6 as it is light and easy to program. It is still very useful and powerful, and I am happy to know that Microsoft Windows Vista can support VB6.

On start up, Visual Basic 6.0 will display the following dialog box as shown in figure 1.1. You can choose to either start a new project, open an existing project or select a list of recently opened programs. A project is a collection of files that make up your application. There are various types of applications we could create; however, we shall concentrate on creating Standard EXE programs (EXE means executable program). Now, click on the Standard EXE icon to go into the actual VB programming environment.

Grab this Widget ~ Blogger Accessories