Copyright: Copyright © 1996-1997 Microsoft Corp.


Database Connector Wizard, Database Connection Panel
Internet Database Connector Wizard
Database Connection Panel

Use the Database Connection panel to configure the ODBC connection.

Dialog Box Options

Database Connection

Use the Database Connection section to specify the ODBC Data Source, username and password, and to set advanced ODBC options.

ODBC Data Source

The ODBC data source to which you want to connect. This field is required.

Username

If the data base system requires a user name, enter it in this field.

Password

If the data base system requires a password, enter it in this field.

Advanced Options

Click Advanced Options to open the Advanced Options dialog box. Use this dialog box to set advanced options for the ODBC driver. Setting advanced options is not required.

Query Results Template

This is a required field.  Enter the name of the file that will format and display the query results data for the IDC file created by the Database Connector Wizard. This should be relative to the location of the IDC file. By convention, query results template files have an HTX filename extension.

Browse

Click Browse to browse the current FrontPage web for a query results template file.


Advanced Options Dialog Box, Query Tab
Advanced Options Dialog Box
Query Tab

Dialog Box Options

Do Not Scan For SQL Escape Sequences

If you do not select this option, the ODBC driver will scan SQL strings for escape clauses. If you select Do Not Scan For SQL Escape Sequences, the driver does not scan SQL strings for escape clauses; instead, the driver sends the statement directly to the data source. If your SQL statement does not contain any ODBC escape clauses, a special syntax enclosed by curly braces ( { } ), then selecting this option will provide a small performance gain by directing the driver to not scan the SQL string.

Cached Results Expiration Time

Click Cached Results Expiration Time to specify the number of seconds to wait before refreshing a cached output page. If a subsequent request is identical, the cached page will be returned without ever accessing the database. The Cached Results Expiration Time field is useful when you want to force a re-query of the database after a certain period of time. The IDC does not cache output pages by default. It caches them only when the Cached Results Expiration Time field is used.

Query Timeout

Click Query Timeout to set the number of seconds to wait for an SQL statement to execute before canceling the query. When not selected (the default) there is no query time out. If the specified time out value exceeds the maximum time out in the data source, or is smaller than the minimum time out, the driver substitutes the maximum or minimum value.

Transaction Isolation

Click this option to set the transaction isolation level. The Internet Database Connector does not support transactions that span more than the request in the IDC file. However, for some database management systems, setting the Transaction Isolation option to Read Uncommitted will result in higher concurrency and therefore better performance. However, with this setting, data that has not been committed to the database by other transactions may be retrieved .

Content Type

Click Content Type to specify the content type of the information supplied in the body of a POST request. By default, the content type is text/html.

HTML Translation File

Use this field if you are publishing a database in a language other than English. A translation file is a text file with each special character mapped in the following format: value=string<CR> where value is an international character and string is the HTML translation code. Enter the path to the file that maps non-English characters (such as à, ô, or é) so that Web browsers can display them properly in HTML format. If the translation file is not in the same directory as the IDC file, you must type the full path to the translation file.

ODBC Translation DLL

Click this option to enter the name of a DLL containing the functions SQLDriverToDataSource and SQLDataSourceToDriver. The ODBC driver loads and uses these functions to perform tasks such as character-set translation.

ODBC Translation Option

Click this option to specify a value controlling translation functionality, which is specific to the translation DLL being used. Consult the documentation for the ODBC driver and translation DLL for details.


Advanced Options Dialog Box, Driver Specific Tab
Advanced Options Dialog Box
Driver Specific Tab

Dialog Box Options

Use this tab to specify ODBC driver-specific options. Refer to your ODBC driver documentation for descriptions of available options.

ODBC Driver Specific Options

This field lists the number and value of each ODBC driver-specific option that you add.

Add

Click Add to open the Add Option dialog box. In this dialog box, specify the option number and value and click OK.

Modify

Click Modify to change the selected ODBC driver-specific option in the Modify Option dialog box. In this dialog box, specify a new option number or value and click OK.

Remove

Click Remove to delete the selected ODBC driver-specific option.


Database Connector Wizard, SQL Query Panel
Internet Database Connector Wizard
SQL Query Panel

Use the SQL Query panel to define one or more SQL queries for the IDC file. If you define more than one query, the results of each query are displayed in a separate detail section of the HTX file. Queries are written to detail sections in numerical order. The first query is written to the first detail section, the second query to the second detail section, and so forth.

Dialog Box Options

SQL Query

Lists the SQL queries defined for the current IDC file. To define a new SQL query, select Create Additional Query from the list. You must create at least one query.

To edit a query, select it from the list, and type directly into the text window.

Insert Parameter

Click Insert Parameter to insert an IDC parameter value in the SQL query.

Clear Query

Click Clear Query to clear the current SQL query.


Advanced Options Dialog Box, Limits Tab
Advanced Options Dialog Box
Limits Tab

Dialog Box Options

ODBC Driver Limits

Use this section to set optional ODBC limits.

Maximum Field Length

Click this option to specify the maximum amount of data that the ODBC driver should return from a character- or binary column. This option is intended to reduce network traffic and should only be used when the data source (as opposed to the driver) in a multiple-tier driver can implement it.

Maximum Number of Data Rows Returned

Click this option to specify the maximum number of rows to return for a SELECT statement. If this option is not selected, the driver returns all rows. This option is intended to reduce network traffic when the data source itself can limit the returned rows, as opposed to the MaxRecords built-in variable in the Internet Database Connector, which limits the rows fetched.

IDC Limits

Use this section to set optional fields in the IDC file.

Maximum Displayed Field Length

Click this option to specify the maximum buffer space allocated by the IDC file, per field. Any characters beyond this will be truncated. The parameter applies only to fields returned from the database that exceed 8192 bytes. The default value is 8192 bytes.

Maximum Number of Data Rows Fetched

Click this option to specify the maximum number of records that the IDC file will return from one query. This value is not set by default, so a query can return up to 4 billion records. Set this value to limit the records returned.


Database Connector Wizard, Default Parameter Values Panel
Internet Database Connector Wizard
Default Parameter Values Panel

Use the Default Parameter Values panel to specify IDC parameter values that will always be used when the SQL query is run. When the SQL query is run because the user submitted a form with the IDC file specified as the form's handler, the default parameters will be combined with the parameters passed when the form is submitted. When the SQL query is run because the user followed a hyperlink to the IDC file, only the default parameters will be used.

Dialog Box Options

Default Parameter Values

This field lists the default parameter names and values.

Add

Click Add to add a parameter and value.

Modify

Click Modify to change the currently selected parameter and value.

Remove

Click Remove to delete a parameter/value pair.


Advanced Options Dialog Box, Connection Tab
Advanced Options Dialog Box
Connection Tab

Dialog Box Options

Read Only Access

Click this option to prevent the IDC connection from modifying the data in the data source to which it is connecting. Read-only access can be used to optimize locking strategies, transaction management, or other areas as appropriate to the ODBC driver or data source. The behavior of the ODBC driver and the data source when asked to process SQL statements that are not read-only during a read-only connection is implementation-defined.

Enable Logging of ODBC Calls

Click this option to log each function call made by the ODBC driver. If the file already exists, the ODBC appends to the file. Otherwise, it creates the file. If this option is selected, but no log file has been specified, ODBC writes to the file "Sql.log."

Log File

The name of the log file on the server to use if Enable Logging of ODBC Calls is selected.

ODBC Connection Pooling

Click this option and click On to keep the connection to the data source open between data source requests. Use this option to improve the performance of the IDC file.

SQL Logon Timeout

Click this option to specify the number of seconds to wait for a logon request to complete before disconnecting. The default is ODBC driver-dependent. If the value is zero, the time out is disabled and a connection attempt will wait indefinitely. If the specified time out value exceeds the maximum logon time out in the data source, the driver substitutes that value.

Network Packet Size

Click this option to specify the network packet size, in bytes, to be use to exchange information between the database management system (DBMS) and the Web server.

Note Many data sources either do not support this option or can return only the network packet size. If the specified size exceeds the maximum packet size or is smaller than the minimum packet size, the driver substitutes that value.


Current Web Dialog Box

Use the Current Web dialog box to select a name and location in the current FrontPage web for the IDC file created by the Internet Database Connector Wizard.

Dialog Box Options

Name

Lists the folders and files in the current folder. Browse the FrontPage web by clicking folders. Choose a folder in which executable scripts can be stored.

To determine if a folder can hold executable scripts, return to the FrontPage Explorer, select the Folder View, choose a folder, and choose Properties on the Edit menu. If the folder has Allow Scripts Or Programs To Be Run selected, it can hold executable scripts.

Save As

Type in the name of the IDC file or select a file from the FrontPage web. IDC files must have an IDC filename extension. If you do not supply a filename extension, the Internet Database Connector Wizard will add one.


ODBC

(Open Database Connectivity). A standard for accessing different database systems.


current FrontPage web

The FrontPage web currently opened in the FrontPage Explorer.


detail section

Any region of HTML in an HTX file enclosed between a pair of markers. A detail section is repeated once for each record returned as the result of a database query.


Internet Database Connector Wizard

The Internet Database Connector Wizard creates an Internet Database Connector (IDC) file. Internet Database Connector is the database interface included with the Microsoft Internet Information Server and Microsoft Personal Web Server. It allows Structured Query Language (SQL) queries (including database additions and modifications) to any Open Data Base Connectivity (ODBC) compliant database accessible from the Web server machine. The SQL query and database connection information is specified in the IDC file.

Along with the SQL query, the IDC file specifies a query results template file in your FrontPage web. This file displays the query results data for the IDC file. By convention, query results template files have an HTX filename extension. The HTX file is a special Web page that contains variables and control information related to your SQL query. You can specify database record column values, IDC parameter values, and If-Then-Else constructs that control the data that is displayed at runtime. You can also define detail sections, which are regions of HTML (including column and parameter values) that will be repeated once for each database record returned at runtime.

After creating an IDC file, you can use it as a form handler by specifying a custom form handler and pointing to the IDC file. A form that is handled by an IDC file should have fields with the same names as the IDC parameters. When the user submits the form, the query runs based on the values of the IDC parameter fields. Then, the results are combined with the HTX file and returned to the Web browser for displaying.

You can also create a hyperlink to an IDC file in your FrontPage web. When the SQL query is run because a user followed a hyperlink to the IDC file, only the default IDC parameters defined in the IDC file are used.