Parsing Text from a SQL Database.

I am trying to format text that I read out of a SQL Database. Here is
an example of that text.

[04/20/2006 21:19:11 : NMATHES] CHARGEABLE [04/20/2006 21:15:54 :
NMATHES] B28 OUT WITH SOME 48AS ON THE LOT [04/20/2006 21:14:47 :
NMATHES] KEYHOLDER ETA 10 MINS RED TRUCK [04/20/2006 21:09:45 :
NMATHES] Landmark: GC FAMILY DENTISTRY Cross streets: MARYANNE
PL//GLADMAN AV Geo Comment: GC1 JTFD201 GENERAL ALARM

Each "[" Starts a new line. I am trying to have each date and time
line start a new line. I have tried the REPLACE function and vbCrLf
but only get vbcrlf in front of my [.

Can someone point me in the right direction, Thanks.
TRH [ Fr, 19 Mai 2006 21:13 ] [ ID #1321595 ]

Re: Parsing Text from a SQL Database.

TRH wrote:
> I am trying to format text that I read out of a SQL Database. Here is
> an example of that text.
>
> [04/20/2006 21:19:11 : NMATHES] CHARGEABLE [04/20/2006 21:15:54 :
> NMATHES] B28 OUT WITH SOME 48AS ON THE LOT [04/20/2006 21:14:47 :
> NMATHES] KEYHOLDER ETA 10 MINS RED TRUCK [04/20/2006 21:09:45 :
> NMATHES] Landmark: GC FAMILY DENTISTRY Cross streets: MARYANNE
> PL//GLADMAN AV Geo Comment: GC1 JTFD201 GENERAL ALARM
>
> Each "[" Starts a new line. I am trying to have each date and time
> line start a new line. I have tried the REPLACE function and vbCrLf
> but only get vbcrlf in front of my [.

Well you obviously did something wrong. Normally I would say something about
your failure to show us the code at this point, but in this case, you
mistake is obvious. You did this:
response.write replace(text_from_sql,"[","vbcrlf")

instead of this:
response.write replace(text_from_sql,"[",vbcrlf)

However, vbCrLf is not recognized as html, is it? For line breaks in html,
you have to use "<BR>", not vbcrlf.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
reb01501 [ Fr, 19 Mai 2006 21:25 ] [ ID #1321596 ]

Re: Parsing Text from a SQL Database.

Thanks, Bob. I pulled my head out just after posting it. Guess I
should of had that beer before lunch. :) Thanks.
TRH [ Fr, 19 Mai 2006 22:03 ] [ ID #1321597 ]
Webserver » microsoft.public.inetserver.asp.db » Parsing Text from a SQL Database.

Vorheriges Thema: SQL Insert Problem - Precision Invalid
Nächstes Thema: FLASH CMS OPEN SOURCE with ASP .MDB