Server Side Scripting - ASP

Active Server Pages (ASP) provide a Microsoft proprietary way to add server side scripting to a web page.

Place code (your script) in the following delimiters

<% %> Inside the delimiters, data is written to the final output using Response.Write "<p>Any text" Any text outside the delimiters is placed on the final page without modification.

Basic ADO Connection

Microsoft has decided that ODBC is bad - ADO is better. Hum, seems odd since ADO uses ODBC drivers. Even odder, ADO is slower than straight ODBC. The following example shows one basic technique (there are other possibilities) using Visual Basic syntax.

Specifying Table Names with Spaces

When connecting to a database, when a table name contains spaces, special delimiters are needed - either double quotes or square brackets. The trick is to place double quotes inside a string. Either of these examples will work.

     objRec.Open "[Some Table]", objConn, 0, 1, 2

objRec.Open """Some Table""", objConn, 0, 1, 2


Author: Robert Clemenzi -
URL: http:// / user / clemenzi / technical / HTML_Examples / ASP.htm