ODBscript

What is ODBscript? A simple but powerful way to build interactive Web applications.
ODBscript is a Web page "scripting" language that is easy to learn and quick to use every time, even if you are not a programmer. Using standard SQL (a database language, which is also easy to learn), you can retrieve values from databases and display them in your Web pages, and you can update your databases from Web browser forms, all with an absolute minimum amount of "coding."

ODBscript uses a "CGI" or "ISAPI" program that is executed by your Windows-based Web server to process "script" files that you can write using your favorite HTML editor. These scripts produce standard HTML Web pages (because any HTML tags and text in the script are simply sent to the browser), but by including ODBscript processing statements, your Web pages can also do things such as interact with your databases and operate on user input from a Web page form.

A CGI program can be executed by a Web URL that references a program file rather than an HTML file. (ISAPIs are "server extensions" supported by MS-IIS and other Windows Web servers. They are similar to CGIs but more efficient because they are DLLs that do not need to be loaded for each request, and the ODBscript ISAPI also uses ODBC "connection pooling" to save overhead by reusing database connections.) To get data from a Web user, for example, a CGI or ISAPI program can be executed as the "action" for an HTML input form. The program can process this data and create a Web page to send back to the user's browser. CGI and ISAPI programs can also be executed with standard "anchor" text and graphic links, possibly with input variables directly in the URL. CGI and ISAPI programs make Web page content dynamic rather than static, so they allow Web-based services beyond simple document presentation.

ODBscript processing is completely controlled by the script files that you create. In these script files, you can have HTML formatted text, JavaScript, and stylesheets -- anything that a standard HTML file can have -- but you can also have ANSI SQL statements to SELECT, INSERT, UPDATE, or DELETE data in any ODBC-accessible database. (Most databases that run on Windows platforms have ODBC interfaces. You can use Microsoft's MS-Access or SQL Server, several third-party databases such as Oracle, or even the freeware MySQL.) Database query results can be inserted into the HTML text and output to the browser, formatted any way that you like, or the user's input can easily be saved in the database. In addition to this ODBC SQL interface, ODBscript provides many other useful data processing functions, without the complexity of CGI programming, to make your site fully interactive.

As a simple example, the following ODBscript commands will query a database table named Products and automatically display the results in an HTML table:

            <%
            DATABASE "DSN=myProducts;UID=Admin";
            SELECT ProductNumber, Description, Price FROM Products;
            TABLE border=1;
            %>
That's all you need to list all of your products. Suppose, however, that you wanted to provide your users with a keyword search function. You could provide a small HTML form on your pages with an input field named "keyword" for example, and execute a script that contained these statements:
            <%
            DATABASE "DSN=myProducts;UID=Admin";
            SELECT ProductNumber, Description, Price FROM Products WHERE Description LIKE '%$keyword$%';
            TABLE border=1;
            %>
That will work for a single word or exact phrase, but suppose you wanted to provide a more complex search, allowing multiple keywords, optionally using "and", "or" or "not" and even parenthetical expressions to control exactly how those words are interpreted, and perhaps allowing a product number as a search criteria. ODBscript provides a simple command that does that for you, automatically generating and executing the necessary SQL:
            <%
            DATABASE "DSN=myProducts;UID=Admin";
            SEARCH TABLE=Products, KEYWORDS=$keywords$, 'ProductNumber', 'Description',
                   COLUMNS=(ProductNumber, Description, Price);
            TABLE border=1;
            %>
If you want to format the results yourself, instead of using the automatic TABLE command, there is an easy way to set up an "each row loop". The processing in the loop will be repeated for each result row selected from the database. Anywhere within this loop, you can use the "variable" names $ProductNumber$, $Description$, and $Price$ and those names will be replaced with the corresponding database column values for a single row. So, you can format the output page any way you want, add links to "order" buttons, etc.

What can ODBscript do? Most of the same things complex scripting languages can do, but with much less work!
Since database interaction is the primary purpose of ODBscript, executing SQL statements has been made as simple and easy as possible: Just specify the database you want to work with and you're ready to execute SQL statements, without worrying about any of the underlying mechanics. If your Web page submission form passed in a user's input, just reference those input field names anywhere in the script, including directly in the SQL statements, and the user's input will be inserted there. If your SQL query returns database columns, just use those column names as variable names anywhere in your script and the retrieved data will be inserted there. ODBscript also has many unique built-in functions to simplify some common requirements for interacting with databases. For example:

  • Automatic HTML table generation from database queries with a single statement.
  • Automatic "query by example" and "Boolean keyword search" queries generated from a user's input values.
  • Automatic HTML forms and SQL statements for database INSERT and UPDATE operations.
  • Automatic HTML "pull-down choice lists" with choices selected from the database.
  • Easy "loop" processing for multiple rows selected by a query.
  • Easy multiple-level "master/detail" or "category" grouping of query results.

In addition to database access, ODBscript provides many other functions for creating dynamic Web pages. For example, you can:

  • Control processing and output with "if / else" and "while" conditional testing.
  • Use a rich set of arithmetic and character string operations.
  • Send e-mail messages to one or more addresses or to a mailing list. A mailing list can either be in a text file or dynamically selected from the database with a query. Optionally, the e-mail can include one or more attachments, and HTML formatted e-mail is supported.
  • Send and receive browser "cookies" to track user activity from one page to the next and from one visit to the next.
  • Provide easy user login and automatically maintain user data in a permanent database.
  • Automatically maintain "session" variables that are persistent and shared across multiple page views during a user's visit to your site, with or without a login.
  • "Redirect" a user to a different URL.
  • Include other script files (so you don't have to repeat common functionality and HTML).
  • Define custom functions for common operations and use them wherever needed, just like the built-in functions.
  • Validate user input with character-type test functions or UNIX-style "regular expressions".
  • Easily define default values for omitted input fields and empty database columns.
  • Define translation (text substitution) tables; for example, to translate codes or abbreviations into readable text.
  • Format output values with "masks"; for example, to show comma separtors in a number or to format a date any way you like.
  • Upload files from the user's browser to your host.
  • Execute HTTP "get" and "post" requests to other Web servers.
  • Easily process "CSV" delimited files (including files with "header" lines that specify the input field names), or text files with fixed-length data fields.
  • Read and write plain text files such as HTML files and log files.
  • Process file system directory listings one file at a time.
  • Create, rename, and delete files on directories allowing CGI access.
  • Execute system commands and other programs on the server.
  • Easily process HTML <SELECT MULTIPLE> input values (i.e., a pull-down list that allows multiple selections), or any other multiply-defined input values.
  • Easily process or display any arbitrary HTML form input variables (for example, you can send all input data in an e-mail message or write them into a log file without knowing in advance what the input fields are).
  • Trap any internal script, database, or e-mail errors to provide special processing or to hide cryptic error messages from the users.
  • Output a "trace" of script processing to assist in debugging.
  • Return any special-purpose HTTP headers to the browser.
  • Return image files to a browser (i.e., return <IMG SRC="..."> files where the source URL is actually an ODBscript reference, so you can return the file after doing some processing; for example, you can dynamically select the file to return or track the file access).

For increased flexibility, ODBscript can also be run "offline" instead of as a CGI program. For example, if your database is on your PC but your Web pages are on your ISP's host machine, you can generate your HTML files on your PC by running ODBscript from the MS-DOS command prompt or the Windows "Run..." box, then upload the output HTML files to your ISP.

What does ODBscript require? Any Windows system; any standard Web server; an ODBC-accessible database; and a little HTML and SQL knowledge.
Currently, ODBscript runs only on Windows systems: either NT, XP or 95/98/2000/2003. It will run under any Web server that supports the CGI 1.1 standard. As noted, it can also be used offline without a Web server, writing the output to a file. The ISAPI version is supported by MS-IIS and many other Windows Web servers. (If you are not using MS-IIS, consult your server's documentation for ISAPI compatibility.)

Database access requires ODBC drivers for your databases. Windows is shipped with a set of ODBC drivers, typically the ones required for MS Access, dBASE, FoxPro, Paradox, and text files. MS Office adds a driver for Excel. Most of the commercial database packages for Windows (such as MS SQL Server, Sybase, and Oracle) include ODBC drivers. MySQL databases can be accessed through the MyODBC driver.

ODBscript requires some knowledge of SQL and HTML to be used effectively. However, there are example files available and examples in the User's Guide to get you started. Also, the registered version includes a set of utility scripts called ODBgen that will automatically generate SQL statements that you can use in your own scripts and a set of Web page scripts to do basic database maintenance.

How much does ODBscript cost? A limited version is available for FREE!
There is a free version of ODBscript with basic functionality, but without some of the features of the registered version.

The full registered version of ODBscript with all features costs only $39 for the single-copy license, and only $79 for the unlimited-copy "corporate" license. (The Corporate license allows running on any number of servers owned by the same individual, company, or organization.)

The ISAPI version is sold separately: You may order either the CGI version or the ISAPI version for the stated prices, or you can order both for an additional $20. (You do not need to order them at the same time: Registered users of either version can order the other version at any time for $20.)

* Try this ONLINE DEMO
* Read the USER'S GUIDE
* Download the FREEWARE VERSION
* Post questions and read announcements at the ONLINE DISCUSSION BOARD
Order BUY THE REGISTERED VERSION through PayPal and download immediately.

Questions or comments? Contact us.


Copyright ©1997-2004, Roger Harris. All rights reserved.

       soft14.com        FreewareWeb.com        soft14.com
ODBscript - Open DataBase Internet Connector Scripting Language
ODBscript

What is ODBscript? A simple but powerful way to build interactive Web applications.
ODBscript is a Web page "scripting" language that is easy to learn and quick to use every time, even if you are not a programmer. Using standard SQL (a database language, which is also easy to learn), you can retrieve values from databases and display them in your Web pages, and you can update your databases from Web browser forms, all with an absolute minimum amount of "coding."

ODBscript uses a "CGI" or "ISAPI" program that is executed by your Windows-based Web server to process "script" files that you can write using your favorite HTML editor. These scripts produce standard HTML Web pages (because any HTML tags and text in the script are simply sent to the browser), but by including ODBscript processing statements, your Web pages can also do things such as interact with your databases and operate on user input from a Web page form.

A CGI program can be executed by a Web URL that references a program file rather than an HTML file. (ISAPIs are "server extensions" supported by MS-IIS and other Windows Web servers. They are similar to CGIs but more efficient because they are DLLs that do not need to be loaded for each request, and the ODBscript ISAPI also uses ODBC "connection pooling" to save overhead by reusing database connections.) To get data from a Web user, for example, a CGI or ISAPI program can be executed as the "action" for an HTML input form. The program can process this data and create a Web page to send back to the user's browser. CGI and ISAPI programs can also be executed with standard "anchor" text and graphic links, possibly with input variables directly in the URL. CGI and ISAPI programs make Web page content dynamic rather than static, so they allow Web-based services beyond simple document presentation.

ODBscript processing is completely controlled by the script files that you create. In these script files, you can have HTML formatted text, JavaScript, and stylesheets -- anything that a standard HTML file can have -- but you can also have ANSI SQL statements to SELECT, INSERT, UPDATE, or DELETE data in any ODBC-accessible database. (Most databases that run on Windows platforms have ODBC interfaces. You can use Microsoft's MS-Access or SQL Server, several third-party databases such as Oracle, or even the freeware MySQL.) Database query results can be inserted into the HTML text and output to the browser, formatted any way that you like, or the user's input can easily be saved in the database. In addition to this ODBC SQL interface, ODBscript provides many other useful data processing functions, without the complexity of CGI programming, to make your site fully interactive.

As a simple example, the following ODBscript commands will query a database table named Products and automatically display the results in an HTML table:

            <%
            DATABASE "DSN=myProducts;UID=Admin";
            SELECT ProductNumber, Description, Price FROM Products;
            TABLE border=1;
            %>
That's all you need to list all of your products. Suppose, however, that you wanted to provide your users with a keyword search function. You could provide a small HTML form on your pages with an input field named "keyword" for example, and execute a script that contained these statements:
            <%
            DATABASE "DSN=myProducts;UID=Admin";
            SELECT ProductNumber, Description, Price FROM Products WHERE Description LIKE '%$keyword$%';
            TABLE border=1;
            %>
That will work for a single word or exact phrase, but suppose you wanted to provide a more complex search, allowing multiple keywords, optionally using "and", "or" or "not" and even parenthetical expressions to control exactly how those words are interpreted, and perhaps allowing a product number as a search criteria. ODBscript provides a simple command that does that for you, automatically generating and executing the necessary SQL:
            <%
            DATABASE "DSN=myProducts;UID=Admin";
            SEARCH TABLE=Products, KEYWORDS=$keywords$, 'ProductNumber', 'Description',
                   COLUMNS=(ProductNumber, Description, Price);
            TABLE border=1;
            %>
If you want to format the results yourself, instead of using the automatic TABLE command, there is an easy way to set up an "each row loop". The processing in the loop will be repeated for each result row selected from the database. Anywhere within this loop, you can use the "variable" names $ProductNumber$, $Description$, and $Price$ and those names will be replaced with the corresponding database column values for a single row. So, you can format the output page any way you want, add links to "order" buttons, etc.

What can ODBscript do? Most of the same things complex scripting languages can do, but with much less work!
Since database interaction is the primary purpose of ODBscript, executing SQL statements has been made as simple and easy as possible: Just specify the database you want to work with and you're ready to execute SQL statements, without worrying about any of the underlying mechanics. If your Web page submission form passed in a user's input, just reference those input field names anywhere in the script, including directly in the SQL statements, and the user's input will be inserted there. If your SQL query returns database columns, just use those column names as variable names anywhere in your script and the retrieved data will be inserted there. ODBscript also has many unique built-in functions to simplify some common requirements for interacting with databases. For example:

  • Automatic HTML table generation from database queries with a single statement.
  • Automatic "query by example" and "Boolean keyword search" queries generated from a user's input values.
  • Automatic HTML forms and SQL statements for database INSERT and UPDATE operations.
  • Automatic HTML "pull-down choice lists" with choices selected from the database.
  • Easy "loop" processing for multiple rows selected by a query.
  • Easy multiple-level "master/detail" or "category" grouping of query results.

In addition to database access, ODBscript provides many other functions for creating dynamic Web pages. For example, you can:

  • Control processing and output with "if / else" and "while" conditional testing.
  • Use a rich set of arithmetic and character string operations.
  • Send e-mail messages to one or more addresses or to a mailing list. A mailing list can either be in a text file or dynamically selected from the database with a query. Optionally, the e-mail can include one or more attachments, and HTML formatted e-mail is supported.
  • Send and receive browser "cookies" to track user activity from one page to the next and from one visit to the next.
  • Provide easy user login and automatically maintain user data in a permanent database.
  • Automatically maintain "session" variables that are persistent and shared across multiple page views during a user's visit to your site, with or without a login.
  • "Redirect" a user to a different URL.
  • Include other script files (so you don't have to repeat common functionality and HTML).
  • Define custom functions for common operations and use them wherever needed, just like the built-in functions.
  • Validate user input with character-type test functions or UNIX-style "regular expressions".
  • Easily define default values for omitted input fields and empty database columns.
  • Define translation (text substitution) tables; for example, to translate codes or abbreviations into readable text.
  • Format output values with "masks"; for example, to show comma separtors in a number or to format a date any way you like.
  • Upload files from the user's browser to your host.
  • Execute HTTP "get" and "post" requests to other Web servers.
  • Easily process "CSV" delimited files (including files with "header" lines that specify the input field names), or text files with fixed-length data fields.
  • Read and write plain text files such as HTML files and log files.
  • Process file system directory listings one file at a time.
  • Create, rename, and delete files on directories allowing CGI access.
  • Execute system commands and other programs on the server.
  • Easily process HTML <SELECT MULTIPLE> input values (i.e., a pull-down list that allows multiple selections), or any other multiply-defined input values.
  • Easily process or display any arbitrary HTML form input variables (for example, you can send all input data in an e-mail message or write them into a log file without knowing in advance what the input fields are).
  • Trap any internal script, database, or e-mail errors to provide special processing or to hide cryptic error messages from the users.
  • Output a "trace" of script processing to assist in debugging.
  • Return any special-purpose HTTP headers to the browser.
  • Return image files to a browser (i.e., return <IMG SRC="..."> files where the source URL is actually an ODBscript reference, so you can return the file after doing some processing; for example, you can dynamically select the file to return or track the file access).

For increased flexibility, ODBscript can also be run "offline" instead of as a CGI program. For example, if your database is on your PC but your Web pages are on your ISP's host machine, you can generate your HTML files on your PC by running ODBscript from the MS-DOS command prompt or the Windows "Run..." box, then upload the output HTML files to your ISP.

What does ODBscript require? Any Windows system; any standard Web server; an ODBC-accessible database; and a little HTML and SQL knowledge.
Currently, ODBscript runs only on Windows systems: either NT, XP or 95/98/2000/2003. It will run under any Web server that supports the CGI 1.1 standard. As noted, it can also be used offline without a Web server, writing the output to a file. The ISAPI version is supported by MS-IIS and many other Windows Web servers. (If you are not using MS-IIS, consult your server's documentation for ISAPI compatibility.)

Database access requires ODBC drivers for your databases. Windows is shipped with a set of ODBC drivers, typically the ones required for MS Access, dBASE, FoxPro, Paradox, and text files. MS Office adds a driver for Excel. Most of the commercial database packages for Windows (such as MS SQL Server, Sybase, and Oracle) include ODBC drivers. MySQL databases can be accessed through the MyODBC driver.

ODBscript requires some knowledge of SQL and HTML to be used effectively. However, there are example files available and examples in the User's Guide to get you started. Also, the registered version includes a set of utility scripts called ODBgen that will automatically generate SQL statements that you can use in your own scripts and a set of Web page scripts to do basic database maintenance.

How much does ODBscript cost? A limited version is available for FREE!
There is a free version of ODBscript with basic functionality, but without some of the features of the registered version.

The full registered version of ODBscript with all features costs only $39 for the single-copy license, and only $79 for the unlimited-copy "corporate" license. (The Corporate license allows running on any number of servers owned by the same individual, company, or organization.)

The ISAPI version is sold separately: You may order either the CGI version or the ISAPI version for the stated prices, or you can order both for an additional $20. (You do not need to order them at the same time: Registered users of either version can order the other version at any time for $20.)

* Try this ONLINE DEMO
* Read the USER'S GUIDE
* Download the FREEWARE VERSION
* Post questions and read announcements at the ONLINE DISCUSSION BOARD
Order BUY THE REGISTERED VERSION through PayPal and download immediately.

Questions or comments? Contact us.


Copyright ©1997-2004, Roger Harris. All rights reserved.

       soft14.com        FreewareWeb.com        soft14.com Downloads Files