ACC97: Action Queries Cannot Be Exported to HTML, IDC, or ASP
ID: Q163443
|
The information in this article applies to:
SYMPTOMS
When you try to save an action query in HTML, IDC, or ASP format, you may
receive one of the following error messages:
Query input must contain at least one table or query.
You can only save select, crosstab, or union queries to this format.
An action query cannot be used as a rowsource.
CAUSE
Action queries cannot be exported to HTML, IDC, or ASP format.
RESOLUTION
If you want to generate Internet Database Connector (IDC) files that
perform action queries, use Notepad or another text editor to write the IDC
file manually. The "More Information" section later in this article has an example of an IDC file that inserts a record into a Microsoft Access 97 database.
Instead of exporting an action query to Active Server Pages (ASP) format to
update your database, consider exporting a form to ASP format. Forms in ASP
format support adding, updating, and deleting records.
STATUS
This behavior is by design.
MORE INFORMATION
Following is an example of how to create an HTML Insert Form that uses IDC
files to insert records into a Microsoft Access 97 database.
NOTE: This section contains information about editing IDC files, and
assumes that you are familiar with editing IDC files. Microsoft Access
Product Support professionals do not support customization of any HTML, HTX,
IDC, or ASP files.
Creating the Files in Microsoft Access
- Start Microsoft Access 97 and open the sample database Northwind.mdb.
- Create the following new query called EnterShipper based on the
Shippers table:
Query: EnterShipper
-------------------
Type: Select Query
Field: CompanyName
Table: Shippers
- On the Query menu, click Parameters.
- Type the following in the Query Parameters dialog box, and then click
OK.
Parameter Data Type
----------------------------
[EnterName] Text
- Save the EnterShipper query and close it.
- Select the EnterShipper query in the Database window, and then click
Save As/Export on the File menu.
- In the Save As dialog box, click "To an External File or Database,"
and then click OK.
- In the "Save Query 'EnterShipper' In" dialog box, select Microsoft IIS
1-2 (*.htx;*.idc) in the Save As Type box, and type EnterShipper.htx
in the File Name box. Note the folder where the exported files will be
stored. Click Export.
- In the HTX/IDC Output Options dialog box, type the name of a System
DSN on your Web server that points to the Northwind sample database.
Click OK.
For more information on how to define a system DSN, search the Help
index for "ODBC, setting up data sources," and see the following
article in the Microsoft Knowledge Base:
Q159682 ACC97: "Data Source Name Not Found" Err Msg Opening Web
Page
- Click OK in the Enter Parameter Value dialog box that appears.
- The HTX/IDC output creates three files: EnterShipper.HTML,
EnterShipper.htx, and EnterShipper.IDC.
- Copy EnterShipper.HTML, EnterShipper.htx, and EnterShipper.IDC to a
folder on your Web server computer where you have both Read and
Execute permission. Read permission is necessary to browse the HTML
file, and Execute permission is necessary to run the IDC file.
For more information about configuring Microsoft Internet Information
Server (IIS) permissions, please refer to the IIS Help Index, and see
the following article in the Microsoft Knowledge Base:
Q160754 ACC97: Error "HTTP/1.0 403 Access Forbidden" Browsing
IDC Page
Customizing the IDC files to Permit Inserting Records
- Use Notepad or another text editor to open the EnterShipper.IDC file.
You need to change the SQL Statement so that it will use the value
passed from the HTML form and insert it into the Shippers table of the
Northwind sample database. Change the SQL Statement so that it looks
like this:
INSERT into Shippers (CompanyName) values ('%[EnterName]%');
- Save the EnterShipper.IDC file and close it.
- Start Microsoft Internet Explorer 3.0, or another Web browser program.
- Type the Uniform Resource Locator (URL) in the address box of your Web
browser to view EnterShipper.HTML. For example, if you saved your IDC
files in a folder called Test in the wwwroot folder of your Web
server, type:
http://<servername>/test/EnterShipper.HTML
Note that the URL depends upon where your files are located on the Web
Server.
- The EnterShipper.HTML form opens in your Web browser with an
[EnterName] box and a Run Query button. Type a name into the box, and
then click the Run Query button. A new record with the name you typed
is inserted into the Shippers table in the Northwind sample database.
Note that no records are returned to your web browser because an insert
query does not return records.
REFERENCES
For more information about exporting IDC files, search the Help Index for
"IDC files," or ask the Microsoft Access 97 Office Assistant. In addition,
please refer to the Microsoft Internet Information Server (IIS) Help Index.
For more information about exporting ASP files, search the Help Index for
"ASP files," or ask the Microsoft Access 97 Office Assistant. In addition,
please refer to your online ASP documentation which is installed when you
install IIS 3.0.
Additional query words:
dynamic update intranet Internet
Keywords : kberrmsg kbinterop OtpOthr WzOthr IntAsp
Version : 97
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: May 17, 1999