Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 24th, 2005, 08:59 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default vbCrLf or vbLF or vbCRLF ???

I am workng with some MGP (Microsoft Great Plains) tables or should I say data in thier tables. I do not have the ability to change the way MGP inserts or deals with data/data types in any way.

I have hit a road block trying to display some data from a text data type field. They have inserted squares in the string, these represent a vbCrLf. Usually I run a function that replaces these with a <br> like so:

  Function DisplayMemo(theText)
    DisplayMemo = ""
    on error resume next
    DisplayMemo = CStr(theText)
    if (len(DisplayMemo) > 0) Then
      DisplayMemo = Replace(DisplayMemo, vbCrLf, "<br>", 1, -1, 1)
    end if
  End Function

Has anybody encountered this square (literaly) before and know how to deal with it?

TYIA

Wind is your friend
Matt
__________________
Wind is your friend
Matt
 
Old May 24th, 2005, 11:16 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Matt,

Did you try with replacing CHR(13) or CHR(10) instead of VbCrLf? See if this helps.

Code:
DisplayMemo = Replace(DisplayMemo, CHR(13), "<br>", 1, -1, 1)
As the VbCrLf is intepretted differently in different apps.

Let me know if that worked.

Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old May 24th, 2005, 11:24 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Great stuff happygv - problem solved using CHR(13) - thanking you very much.

Wind is your friend
Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
Replace vbcrlf with <br> using C# kgriffin ASP.NET 1.0 and 1.1 Basics 2 May 4th, 2005 09:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.