When you create a form in FrontPage 2000 that saves results to a database, one of the additional fields that is saved is the User_name field. The User_name field is populated with the user's Windows NT logon ID, assuming that the site it is located on a Web server with "Allow Anonymous" disabled.
When you retrieve data from the database, the User_name is displayed as one of the returned fields for each record. However, it is not easy to use the FrontPage interface to add the Windows NT Logon as a filtering criteria.
To work around this limitation, modify the FrontPage generated HTML slightly.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
Filter Information From a Database Results with Windows NT Logon
If you have a Web that stores the User_Name field in a database, the following example will allow you to use the Windows NT logon as filter criteria:
- Create a new page, and insert a Database Results component.
- Select the database, click Next, select the table, click Next.
- Click More Options, and click Criteria, then click Add.
- Select the User_name field, and make sure that Use this Search Form Field is selected. Leave each of the other options on this dialog box with their default values.
- Click OK three times, and click Next twice to complete the insertion of the database results component.
- Switch to the HTML view for the page.
- Find the following tag:
<input TYPE="TEXT" NAME="User_name" VALUE="<%=Request("User_name")%>" size="20">
and replace it with the following:
<input TYPE="HIDDEN" NAME="User_name" VALUE="<%=Request.Servervariables("LOGON_USER")%>" size="20">
- Switch to the Normal view, right-click Reset, and click Cut.
Right-click Submit, and click Form Field Properties. In the Value/Label box type Click to Update. Click OK. - Save the page, and use the Preview In Browser command.
When you click Click to Update, the records pertaining to the current user are returned.