ACC97: Cannot Enter Line Breaks in Active Server Pages

ID: Q188860


The information in this article applies to:
  • Microsoft Access 97


SYMPTOMS

Advanced: Requires expert coding, interoperability, and multi-user skills.

In an ASP form, you cannot add line breaks to a field as you can in a form in Microsoft Access. Using CTRL+ENTER will insert a line break; however, after committing the record, the line break will not be present.


CAUSE

The ASP page uses a function, MakeHTMLValue(), to convert the user's response to HTML format. Because this function does not have the capability of converting the carriage return and linefeed combination (CR/LF) to the required escape sequence, it is parsed out of the string.


STATUS

Microsoft has confirmed this to be a problem in Microsoft Access 97.


MORE INFORMATION

Steps to Reproduce Problem


  1. Open the sample database Northwind.mdb.


  2. On the File menu, click Save As HTML. Click Next in the "Publish to the Web" dialog box.


  3. On the next screen, select the Customers form on the Forms tab, and then click Next.


  4. The next screen prompts you to select a default template. Leave the text box blank an click Next.


  5. Select Dynamic ASP, and then click Next.


  6. In the Data Source Name box, type the name of a System DSN on your Web server that points to the sample database Northwind.

    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 "Data Source Name Not Found" Err Msg Opening Web Page


  7. In the Server URL box of that same screen, enter the URL that points to the Web Server location where your ASP files will be stored and click Next.

    For example, if you store the ASP files in the \IISSamples folder on the \\PubTest server, type http://pubtest/iissamples/ as your Server URL.


  8. Select the folder on your Web server indicated by the Server URL you entered in step 7.

    NOTE: This folder must have Execute permission.

    For more information on ASP permissions see the following article in the Microsoft Knowledge Base:

    Q162975 ACC97: Permissions Necessary to View HTML, IDC, and ASP Files


  9. Click Finish. The "Publish to the Web" Wizard creates 2 files: Customers_1.asp, and Customers_1alx.asp.


  10. View the Web page Customers_1.asp in your browser.


  11. In the Address field of the first customer record, insert a line break by pressing CTRL+ENTER and enter additional data.


  12. Click the Commit button. The data will be written to the Northwind database and the Browser data will be refreshed from the table.

    Note that the data in the Address field does not show a line break.



REFERENCES

For more information about exporting ASP files, search the Help Index for "ASP files," or ask the Microsoft Access 97 Office Assistant.

For more information on how to create and modify ASP files, please refer to your Microsoft ASP documentation.

Keywords : kbdta IntAsp
Version : WINDOWS:97
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: April 23, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.