Microsoft KB Archive/154867

= DBWEB: How to Create a Custom Update DBX =

Article ID: 154867

Article Last Modified on 9/26/2003

-

APPLIES TO


 * Microsoft dbWeb 1.0
 * Microsoft dbWeb 1.1

-



This article was previously published under Q154867



SUMMARY
Microsoft dbWeb provides a default form that you can use as your Update form. However, with a text editor you can create a custom HTML document to use as your Update form. You can design the look of the form so that it resembles other HTML documents on your web site.



MORE INFORMATION
The following example uses the Employees table in the sample database Nwind.mdb and the dbnwind data source. Before you begin the example, make sure you can query the Employees sample schema in the dbnwind data source of the dbWeb administrator.

CAUTION: Following the steps in this example will modify the sample database Nwind.mdb and the Employees sample schema. You may want to back up the Nwind.mdb and Dbweb.mdb files, or use a copy of them for this example.

Creating a Custom Update Form
NOTE: The HTML example below uses /scripts as the cgi files folder. That is the default folder for Internet Information Server (IIS). If you use a different web server, the folder may be different. Change the path as appropriate for your web server. Also, if you are using dbWeb 1.0, replace dbwebc.dll with $dbwebc.exe in the following example.

  Using Notepad or your favorite HTML editor, type the following text into a new file:  Update Employee Information 

 Update Employee Information 

 <INPUT TYPE="hidden" NAME="11,Employees,Employee ID" VALUE="\tobj\tEmployees\tcol\tEmployee ID\t">

</FORM> </BODY> </HTML> </li> <li>Save the file as Upempinf.htm in the dbweb subfolder of the HTML document root folder (\inetsrv\wwwroot\dbweb, if IIS is your web server).</li></ol>

Modifying the Schema
<ol> <li>Start the dbWeb Administrator.</li> <li>Double-click the dbnwind data source.</li> <li>Double-click the Employees schema.</li> <li>Click the Schema tab, and then click to select the Update check box.</li> <li>Click the QBE tab.</li> <li>In the "Data columns in selected tables" box, select Employee ID, and then click Add.</li> <li>Click the Ins/Upd/Del tab.</li> <li> In the "Data columns in selected tables" box, select each of the following fields, and then click Add: <pre class="fixed_text">      Employee ID       Last Name First Name Title Address City Region Postal Code Country Home Phone </li> <li>In the "Update data columns" box, select Employee ID, and then click Properties.</li> <li>Under Column Properties, set the Key property to Key(non updateable).</li> <li>Click the DBX tab.</li> <li>In the "Single record result output custom format file" box, click Browse to find the Upempinf.htm file (in the \inetsrv\wwwroot\dbweb folder, if IIS is your server).</li> <li>Click Apply.</li></ol>

View the custom update form:

 * 1) Open your favorite browser, and type the URL path to the Employees schema using the getxqbe method. For dbWeb 1.1, the default path is /scripts/dbweb/dbwebc.dll/Employees?getxqbe. For dbWeb version 1.0, the default path is /scripts/dbweb/$dbwebc.exe/Employees?getxqbe.
 * 2) On the Employees QBE page, type 1 in the Employee ID field.
 * 3) Click the Submit Query button to run the query and invoke your custom Update form.
 * 4) Change some information on the form, and then click Submit Update. You will receive a success or failure message.

NOTE: If Submit Query returns more than one record, you will not see the custom Update form you created. In this example, you must limit the query results to one record. However, it is possible to use this form for multiple record queries. Just set Upempinf.htm as the "Multi record result output custom format" file on the DBX tab of the Employees schema.

Keywords: kbhowto kbusage KB154867

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.