DOCUMENT:Q105279 05-FEB-2000 [foxpro] TITLE :How to Remove Carriage Returns/Linefeeds from @ ... EDIT PRODUCT :Microsoft FoxPro PROD/VER:MS-DOS:2.0,2.5,2.5a; WINDOWS:2.5,2.5a,3.0 OPER/SYS: KEYWORDS: ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual FoxPro for Windows, version 3.0 - Microsoft FoxPro for MS-DOS, versions 2.0, 2.5, 2.5a - Microsoft FoxPro for Windows, versions 2.5, 2.5a ------------------------------------------------------------------------------- SUMMARY ======= When information is entered in a character field in a database through an @ ... EDIT command and the RETURN key is pressed in the edit region during the input process, a carriage return and a linefeed are added to the text. These control codes can cause problems if the text field must be written out to a text file or another databases without control codes in the field. To remove the carriage returns and linefeeds and replace them with a space in both FoxPro for MS-DOS and Windows, enter the following code either in the Command window or in a program REPLACE ALL WITH STRTRAN(,CHR(13)+CHR(10),' ') where is the name of the database field that contains the carriage returns and linefeeds. MORE INFORMATION ================ When the database is browsed in FoxPro for MS-DOS, you can view control codes in the fields. In the active record, the field will contain two accented characters together, an "i" and an "e" representing the carriage return and linefeed. In the other records in the Browse window, a musical note and a circle in a box represents the carriage return and linefeed. In FoxPro for Windows, the carriage return and linefeed are represented by two vertical bars in all records in the Browse window. Additional query words: VFoxWin FoxDos FoxWin get line feed cr/lf ====================================================================== Keywords : Technology : kbVFPsearch kbAudDeveloper kbFoxproSearch kbZNotKeyword3 kbFoxPro200DOS kbFoxPro250DOS kbFoxPro250aDOS kbFoxPro250 kbFoxPro250a kbVFP300 Version : MS-DOS:2.0,2.5,2.5a; WINDOWS:2.5,2.5a,3.0 ============================================================================= 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. Copyright Microsoft Corporation 2000.