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:
<%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;
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";
SELECT ProductNumber, Description, Price FROM Products WHERE Description LIKE '%$keyword$%';
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.
DATABASE "DSN=myProducts;UID=Admin";
SEARCH TABLE=Products, KEYWORDS=$keywords$, 'ProductNumber', 'Description',
COLUMNS=(ProductNumber, Description, Price);
TABLE border=1;
%>
Homepage: http://www.odbic.com/odbscript/
Download Free Version
Subscribe to post feed