Parsing Text from a SQL Database.

Parsing Text from a SQL Database.

am 19.05.2006 21:13:47 von TRH

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.

Re: Parsing Text from a SQL Database.

am 19.05.2006 21:25:37 von reb01501

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 "
", 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"

Re: Parsing Text from a SQL Database.

am 19.05.2006 22:03:17 von TRH

Thanks, Bob. I pulled my head out just after posting it. Guess I
should of had that beer before lunch. :) Thanks.