Sample Script

Microsoft English Query includes a number of sample script files in the Samples subdirectories:

Includes debugging, transcripting, and parameterization, in addition to the basic client functionality demonstrated in ASP. It also includes a QB folder with QuestionBuilder script.

Demonstrates basic client functionality in C++, using Microsoft Foundation Classes. Requires Microsoft® Visual C++® version 5.0.

Demonstrates basic client functionality in Microsoft Visual Basic®. Requires Visual Basic 5.0.

Run:

smallworld.bat database [/Sservername] [/Uusername] [/Ppassword]

to create sample tables in the target database for the SmallWorld application, and likewise for the  Northwind.bat file.

Simple VBScript

The following sample files demonstrate how the English Query object model is used within VBScript to deploy an English Query application on the Web. (These files are available in the \Samples\Asp directory. Files for a fully functional application are in the \Samples\Asp2 directory.)

The files allow an end user to ask a question and receive a response (either a result or clarification page). Because code is shared between the result page and clarification page, an include file is also provided. For more information about deploying on the Web, see Overview of Deploying an Application.

Sample file What it does
 
Clarify.asp Invoked when the user responds to a request for clarification. It works similarly to Response.asp, except it operates on a saved conversation context, rather than beginning a new dialog with the user.
Common.inc Contains subroutines used in both Response.asp and Clarify.asp
Default.htm Redirects incoming HTTP requests to Request.asp.
Request.asp A page on which a user can enter an English sentence query. There are two entry methods: a single-line text box and a drop-down box. Because an entry in the text box requires more effort to make than one in the drop-down box, the text-box entry overrides the drop-down selection.
Response.asp Returns result of a user’s request for information. It produces either a response page or a clarification page, depending on whether English Query requires additional user input to answer a question.

If the application flag Application(“Debugging”) is set to true, additional tracing is displayed . Of particular interest are the original question, the restatement of the question by English Query, the SQL statements generated to carry out the query, and the result (either tables or phrases).


(c) 1996-1998 Microsoft Corporation. All Rights Reserved.