home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

Platinum Edition Using HTML 4, XML, and Java 1.2
(Publisher: Macmillan Computer Publishing)
Author(s): Eric Ladd
ISBN: 078971759x
Publication Date: 11/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


Variables can be declared with the Dim statement within a Function or Sub procedure. In this case, those variables are local to that procedure and can only be referenced within it. If the Static keyword is used when the procedure is declared, all local variables retain their value from one procedure call to the next.

The On_Error Statement

The On Error statement is used to enable error handling.

Syntax:

On Error Resume Next

On Error Resume Next enables execution to continue immediately after the statement that provokes the runtime error. Alternatively, if the error occurs in a procedure call after the last executed On Error statement, execution commences immediately after that procedure call. This way, execution can continue despite a runtime error, enabling you to build an error-handling routine inline within the procedure. The most recent On Error Resume Next statement is the one that is active, so you should execute one in each procedure in which you want to have inline error handling.

VBScript Functions

VBScript has an assortment of intrinsic functions that you can use in your scripts. The VBScript documentation on the accompanying CD contains a full reference for these functions. Table 33.3 shows the functions that exist for performing different types of operations. (Because you can use some functions for several types of operations, they appear multiple times in the table.)

Table 33.3 VBScript Functions

Type of Operation Function Names

array operations IsArray, LBound, UBound
conversions Abs, Asc, AscB, AscW, Chr, ChrB, ChrW, Cbool, CByte, CDate, CDbl, CInt, CLng, CSng, Cstr, DateSerial, DateValue, Hex, Oct, Fix, Int, Sgn, TimeSerial, TimeValue
dates and times Date, Time, DateSerial, DateValue, Day, Month, Weekday, Year, Hour, Minute, Second, Now, TimeSerial, TimeValue
input/output InputBox, MsgBox
math Atn, Cos, Sin, Tan, Exp, Log, Sqr, Randomize, Rnd
objects IsObject
strings Asc, AscB, AscW, Chr, ChrB, ChrW, Instr, InStrB, Len, LenB, LCase, UCase, Left, LeftB, Mid, MidB, Right, RightB, Space, StrComp, String, LTrim, RTrim, Trim
variants IsArray, IsDate, IsEmpty, IsNull, IsNumeric, IsObject, VarType

Active Server Pages and the Active Server Platform

The Active Server Platform refers to Microsoft’s take on server-side application development. As with the Active Desktop, you can author on the server side with three standard components: HTML, scripting, and software components, such as Java applets and ActiveX server components. This enables you to leverage your client-side development skills to start building dynamic applications on your server.

In addition, you can take advantage of a number of Microsoft server technologies and services, such as Transaction Server, Merchant Server, Proxy Server, and so on, to implement specialized business solutions. Microsoft’s server technology is tightly integrated with Windows NT operating system and Internet Information Server (IIS). As a result, your Active Platform solution will benefit from the operating system’s services and features. Your Web application, for example, can inherit Windows NT’s built-in security mechanism.


NOTE:  As you probably guessed from the preceding paragraph, the Active Server development environment is only available on servers running the Windows NT operating system. If you have a UNIX-based server, you will not be able to develop server-side applications with Active Server Pages.

Advantages of the Active Server Platform

If yours is a Microsoft shop, then you can harness the many advantages of developing on the Active Server Platform. These include:

  Active Server components offer a different dimension to Web programming. Active Server components are, in fact, ActiveX controls implemented on the server. By using Active Server components on the server, your application will need a very thin client because the components will reside on the server. This means the application will benefit from the server’s processing power. In addition, the server can generate the HTML dynamically. And because the components will reside on the server, multiple applications can share them.
  As with ActiveX controls, you can use (and reuse) Active Server components across applications and with a variety of development tools. You can also use any standard Windows development tool, such as Visual C++ and Visual Basic, to create the Active Server components for your application.
  The Active Server is fully scalable. You can start development, for example, with the Personal Web Server running on Windows 98 and, after testing the Web site, port the site to your IIS server without changing or rewriting any component. Thus, you can use the Personal Web Server as your development server and the IIS as your production server.
  By using the Active Server, you can implement multi-tier architecture for your application. Your application’s business rules and application logic will reside on the server. The server, in turn, will connect and communicate with a database server or any other server that supports back-end processes. The database server may reside on a platform different from the Web server’s platform.

Active Server Pages

You can create Active Server Pages (ASP) by using the same set of components you use to implement client-side scripting. That is, you can integrate Active Server components and Java applets within your ASP code by using scripting languages such as VBScript, JavaScript, and JScript.

The Active Server includes a number of prebuilt, pretested Active Server components, such as the Browser Capabilities Component and Active Data Object (ADO) Component. By using the Browser Capabilities Component, you can detect the type of client browser. In response, you can create the HTML that the browser will be capable of handling. For instance, if the browser does not support frames and tables, you can create and send a simple HTML page that will not use the <FRAME> and <TABLE> tags.


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.