ACC97: How to Use IDC Files to Query a Secure MS Access DatabaseLast reviewed: September 8, 1997Article ID: Q161172 |
The information in this article applies to:
SUMMARYAdvanced: Requires expert coding, interoperability, and multiuser skills. WARNING: Although this article discusses Microsoft Access security features, any information you send over the Internet with the techniques described in this article is sent unencrypted. To send encrypted information over the Internet, you must use a protocol that sends client certificates, such as Secure Sockets Layer (SSL). Note that client certificates cannot be used on Personal Web Server for Windows 95. ANY USE BY YOU OF THE METHODS PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this sample "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This article describes a technique you can use to create Internet Database Connector (IDC) files that allow you to type a username and password in an HTML form in order to query a secure Microsoft Access database.
MORE INFORMATIONThere are three main steps to use IDC files to query a secure Microsoft Access database:
This example contains the following sections:
Creating a Secure Copy of Northwind.mdb
1. Copy the sample database Northwind.mdb to C:\My Documents\Northwind2.mdb. 2. Start the Workgroup Administrator by executing the Wrkgadm.exe file. The file is installed to your Windows\System folder by default. You can find a shortcut to this file in the C:\Program Files\Microsoft Office folder. 3. In the Workgroup Administrator dialog box, click Create. 4. In the Workgroup Owner Information dialog box type the following information, and then click OK: Name: <Your name> Organization: Northwind Traders Workgroup ID: 1234 5. In the Workgroup Information File dialog box, make a note of the path and file name that appears in the Database box so you can rejoin that workgroup file when you are finished. Then type C:\My Documents\Northwind2.mdw, and click OK. 6. In the Confirm Workgroup Information dialog box, verify that the information is correct, and then click OK. 7. Click OK when you see the message that you have successfully created the workgroup file, and then click Exit in the Workgroup Administrator dialog box. 8. Start Microsoft Access and open C:\My Documents\Northwind2.mdb. 9. On the Tools menu, point to Security, and then click User And Group Accounts. 10. Click the Change Logon Password tab, and type Admin in the New Password and Verify boxes. Click OK. 11. Quit Microsoft Access. 12. Copy the Northwind2.mdb and Northwind2.mdw files to a folder on your Web Server computer, or to a network location that you can access from your Web Server computer. Be sure to retain a copy of Northwind2.mdb on your local drive for use later in this example. At this point, you can rejoin your original workgroup information file. 13. Start the Workgroup Administrator program following the procedure in step 2 of this section. 14. Click the Join button. 15. In the Workgroup Information File dialog box, type the path and file name of the system database that you noted in step 5, and then click OK. 16. Click OK when you receive the message that you have successfully joined the workgroup, and then click Exit in the Workgroup Administrator dialog box. Creating a System DSN for a Secure Microsoft Access Database
Creating the HTX/IDC Files and the HTML Logon FormIn this section, you create a query with username and password parameters, and then export the query to HTX/IDC format. When you create IDC files from a parameter query, Microsoft Access automatically creates an HTML form for entering the parameters. This is an easy way to create the HTML form you need to collect the username and password information. However, you do not have to use this technique to create the HTML form; you can use Notepad or another tool, such as Microsoft Front Page 97, to create your own HTML Logon form.
1. Start Microsoft Access. 2. Open Northwind2.mdb. 3. Create a new query called SecureIDC based on the Customers table: Query: SecureIDC ---------------- Type: Select Query Field: CustomerID Table: Customers 4. On the Query menu, click Parameters. 5. Type the following in the Query Parameters dialog box, and then click OK. Parameter Data Type ---------------------------- [UserParam] Text [PassParam] Text 6. Save the SecureIDC query and close it. 7. Select the SecureIDC query in the Database window, and then click Save As/Export on the File menu. 8. In the Save As dialog box, click "To an External File or Database," and then click OK. 9. In the "Save Query 'SecureIDC' In" dialog box, select Microsoft IIS 1-2 (*.htx;*.idc) in the Save As Type box, and type SecureIDC.htx in the File Name box. Click Export. 10. In the HTX/IDC Output Options dialog box, type NorthwindIDC in the Data Source Name box, and then click OK. 11. Click OK in each of the two Enter Parameter Value dialog boxes that appear. 12. The HTX/IDC output creates three files: SecureIDC.HTML, SecureIDC.htx and SecureIDC.IDC Customizing the IDC FilesNOTE: This section contains information about editing IDC and HTML files, and assumes that you are familiar with editing HTML files. Microsoft Technical Support engineers do not support customization of any HTML, HTX, IDC, or ASP files.
ARTICLE-ID: Q160754 TITLE : ACC97: Error "HTTP/1.0 403 Access Forbidden" Browsing IDC Page Testing the Query
REFERENCESFor more information about how to create and modify the optional fields in IDC files, please refer to your Microsoft IIS online documentation. For more information about IIS authentication, security, and Secure Sockets Layer (SSL), please refer to your IIS online documentation, or see the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q142868 TITLE : IIS: Authentication & Security FeaturesFor more information about Microsoft Access security, search the Help Index for "security, overview," or ask the Microsoft Access 97 Office Assistant.
|
Additional query words: internet intranet
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |