How to Use SQL Functions in *.IDC ScriptsLast reviewed: March 10, 1997Article ID: Q142845 |
1.00
WINDOWS
kbintero
The information in this article applies to:
SUMMARYThis article explains how you can add SQL Server back-end functions to *.IDC (Internet Database Connector) files when using ODBC with the Internet Server.
MORE INFORMATIONFiles with the .IDC file extension can contain SQL commands that can manipulate an ODBC DataSource. Files with the .HTX file extension contain information that should be presented to the browser upon completion of the .IDC file execution. The following is an example *.IDC file called EXAMPLE.IDC. This file calls EXAMPLE.HTX upon completion of the SQL commands:
Datasource: ODBC DataSource Username: sa Template: example.htx RequiredParameters: Field1, Field2 SQLStatement: +INSERT INTO Table +(Field1, Field2, Field3, SQLField) +VALUES('%Field1%', '%Field2%', '%Field3%', GETDATE()); Explanation of Fields in the Above EXAMPLE.IDCDataSource:
The datasource line needs to contain the name of the ODBC data source listed in the Control Panel ODBC applet.Username:
Username is the name you use to log on to SQL Server.Template:
Template specifies the *.HTX file that is displayed when the query is successful.RequiredParameters:
The parameters listed after this keyword need to contain values in order for the *.IDC file to run.SQLStatement:
This contains the SQL statement as you would input it from the command line to the SQL Server. The only difference between this and a SQL statement is that each line begins with a plus sign (+). Explanation of SQL StatementINSERT INTO:
SQL commands that insert data into a table.Table:
The name of the table where the data is to be placed.Field1, Field2, Field3, SQLfield:
These are the names of the fields where you want to place the data in the VALUES statement.VALUES statement:
These are the values the get inserted into the table "Table". These are obtained from the name= statements in the <form> section on the HTML page where the data was entered. |
KBCategory: kbintero
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |