ASP
Active Server Pages, Microsoft's technology for server-side building of dynamic web pages, has the
ability to use the ADO component (more on ADO in Chapter 2). The ADO Object allows a
programmer to connect an ASP page to a datastore and then send a SQL command to that datastore
and receive information back. For example, a web page visitor could enter her membership number
into an ASP page and then click Submit. The responding ASP page could use that membership number
to look up her account in the corporate database and return appropriate information in a table, text, or
list box. ASP is not limited to reading data; it can use SQL statements to instruct the data store to add,
change or delete data as per the web visitor's instructions.
For further information regarding Active Server Pages, you can visit
http://msdn.microsoft.com/library/backgrnd/html/msdn_aspfaq.htm.
You will find an
introductory tutorial in ASP in Appendix E at the back of this book.
Visual Basic
Visual Basic, from Microsoft, offers an easy-to-learn front end for Windows applications. It comes with a
rich, graphical developer's environment, which allows quick prototyping and easy revisions. The
finished product can then be compiled and deployed to any PC running Windows. The chief
disadvantage of Visual Basic is that the features that speed up development also cause the applications
to be slightly slower and less robust when deployed. The disadvantages will be largely eliminated with
the .NET release of Visual Basic. Even though Visual Basic clocks a few percent slower than C++, it is
still much faster than scripting languages used in ASP.
Visual Basic includes a DataGrid, which can be filled by the results of a SQL statement; other data
linked interfaces, like list boxes and text boxes, can also be filled from a datastore using SQL. Changes
made to data on forms can be written to the database, either automatically or through specific SQL
statements. Several third parties offer even more sophisticated controls that produce slick data-linked
interfaces with minimal coding.
See Chapter 2 for code specifics of working with VB and SQL and www.vbextras.com for listings
of third party products.
In addition to using the controls, you can build and use SQL statements in any VB code. For example, a
button on a form might fire an event containing code to send a SQL statement that will change data in
certain records. Likewise, data returning from a SQL statement can be accepted into VB code and then
manipulated.
For further information regarding Visual Basic & Visual Studio visit
http://msdn.microsoft.com/vstudio/prodinfo/overview.asp.
C++
Like ASP and VB, C++ can use ADO to connect to a DBMS and pass a SQL statement. The results are
returned and can be used in an array, as variables or in expressions. Code that uses ADO, particularly
the recent versions, is both efficient and flexible.
Besides ADO, C++ Programmers have an additional option of using connection technologies such as
ODBC or OLEDB (covered in Chapter 2) to pass SQL statements to the DBMS. This procedure
involves creating and managing Data Classes. Although more intensive, you can exert a finer level of
control than using ADO.
Other Front Ends
Almost every other front end can process a SQL statement to a DBMS. For example, using Visual Basic
for Applications (VBA) you can have Microsoft Word (including Mail Merge) use SQL to access data.
Likewise, Excel VBA can connect your spreadsheet to a datastore and pass SQL statements to it.
PowerBuilder and Delphi are tools similar to Visual Basic that can create a user interface. That interface
can also communicate with data stores via SQL statements.
Visit http://www.sybase.com/products/powerbuilder/ to learn more about PowerBuilder.
Cold Fusion can use proprietary tags to send SQL statements to a DBMS. DBMS vendors such as
Oracle offer other packages for front-end development.
Both Java and JDBC can also create front ends that will both send and receive the results of SQL
statements.