ACC97: Action Queries Cannot Be Exported to HTML, IDC, or ASP

Last reviewed: September 29, 1997
Article ID: Q163443
The information in this article applies to:
  • Microsoft Access 97

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, you must write the IDC file manually using Notepad or another text editor. Following is 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 Technical Support engineers do not support customization of any HTML, HTX, IDC, or ASP files.

Creating the Files in Microsoft Access

  1. Start Microsoft Access 97 and open the sample database Northwind.mdb.

  2. Create the following new query called EnterShipper based on the
     Shippers table:

        Query: EnterShipper
        -------------------
        Type: Select Query

        Field: CompanyName
          Table: Shippers

  3. On the Query menu, click Parameters.

  4. Type the following in the Query Parameters dialog box, and then click
     OK.

        Parameter          Data Type
        ----------------------------
        [EnterName]        Text

  5. Save the EnterShipper query and close it.

  6. Select the EnterShipper query in the Database window, and then click
     Save As/Export on the File menu.

  7. In the Save As dialog box, click "To an External File or Database,"
     and then click OK.

  8. 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.

  9. 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:

        ARTICLE-ID: Q159682
        TITLE     : ACC97: "Data Source Name Not Found" Err Msg Opening Web
                    Page

 10. Click OK in the Enter Parameter Value dialog box that appears.

 11. The HTX/IDC output creates three files: EnterShipper.HTML,
     EnterShipper.htx, and EnterShipper.IDC.

 12. 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:

        ARTICLE-ID: Q160754
        TITLE     : ACC97: Error "HTTP/1.0 403 Access Forbidden" Browsing
                    IDC Page

Customizing the IDC files to Permit Inserting Records

  1. 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]%');
    

  2. Save the EnterShipper.IDC file and close it.

  3. Start Microsoft Internet Explorer 3.0, or another Web browser program.

  4. 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.

  5. 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 : IntAsp OtpOthr WzOthr kberrmsg kbinterop
Version : 97
Platform : WINDOWS
Hardware : x86
Issue type : kbprb
Solution Type : Info_Provided


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 29, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.