473,382 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Using special characters within a string

Hi

Doing my best to understand why I cant insert a vbcrlf or an equivalent into
this piece of code that read messages from an SQL DB. The messages it takes
read into a marquee fine but I want the Marquee to scroll up instead of
horizontally and I need new line spacings else the mesages are difficult to
read.

At present we use the strNewTextDelimitor and I am unable due to syntax or
perhaps idioscy to find a way of adding the VBCRLF or any derivative into
this code so......I am sure its simple but could do with a hand...Tx in
advance.

This outout is pumped to a page back to a page which will not pick up the
new messages if I use any of the following characters (even without placing
them into a variable) vbcrlf vbcr vblf chr(13) chr(10).

Do While Not adoRecordset.EOF

' Add the current message in the recordset to the string that is
returned
strNewText = strNewText & strNewTextDelimiter &
Trim(adoRecordset.Fields("Message").Value & "")
' Set the delimiter ready for the next message.
strNewTextDelimiter = " * * "

' Get the next message from the recordset
adoRecordset.MoveNext
Loop

The code above works fine but the moment I attempt to add the special
characters the scripts do not run and the web page will not update :-( ,
Tis driving me crackers!

Cheers,


Jul 19 '05 #1
2 2179
Can you show how you "attempt to add the special characters"?

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Paul" <p@btinternet.com> wrote in message
news:41**********************@news.zen.co.uk...
Hi

Doing my best to understand why I cant insert a vbcrlf or an equivalent into this piece of code that read messages from an SQL DB. The messages it takes read into a marquee fine but I want the Marquee to scroll up instead of
horizontally and I need new line spacings else the mesages are difficult to read.

At present we use the strNewTextDelimitor and I am unable due to syntax or
perhaps idioscy to find a way of adding the VBCRLF or any derivative into
this code so......I am sure its simple but could do with a hand...Tx in
advance.

This outout is pumped to a page back to a page which will not pick up the
new messages if I use any of the following characters (even without placing them into a variable) vbcrlf vbcr vblf chr(13) chr(10).

Do While Not adoRecordset.EOF

' Add the current message in the recordset to the string that is
returned
strNewText = strNewText & strNewTextDelimiter &
Trim(adoRecordset.Fields("Message").Value & "")
' Set the delimiter ready for the next message.
strNewTextDelimiter = " * * "

' Get the next message from the recordset
adoRecordset.MoveNext
Loop

The code above works fine but the moment I attempt to add the special
characters the scripts do not run and the web page will not update :-( ,
Tis driving me crackers!

Cheers,

Jul 19 '05 #2
On Tue, 10 Aug 2004 12:07:43 +0100, "Paul" <p@btinternet.com> wrote:
Hi

Doing my best to understand why I cant insert a vbcrlf or an equivalent into
this piece of code that read messages from an SQL DB. The messages it takes
read into a marquee fine but I want the Marquee to scroll up instead of
horizontally and I need new line spacings else the mesages are difficult to
read.

At present we use the strNewTextDelimitor and I am unable due to syntax or
perhaps idioscy to find a way of adding the VBCRLF or any derivative into
this code so......I am sure its simple but could do with a hand...Tx in
advance.

This outout is pumped to a page back to a page which will not pick up the
new messages if I use any of the following characters (even without placing
them into a variable) vbcrlf vbcr vblf chr(13) chr(10).
How do you know? :)

Displaying a VbCrLf in HTML has no effect, you need to convert them to
a <br> or <p></p> tag for HTML to show them. VbCrLf will break the
lines in a View Source, but it's not an HTML tag.

Add the VbCrLf to the input side and store it in the database (it
makes a great delimiter...) and Replace it on the output side. As in:

strMessage = Replace(strMessage,VbCrLf,"<br>")

Jeff
Do While Not adoRecordset.EOF

' Add the current message in the recordset to the string that is
returned
strNewText = strNewText & strNewTextDelimiter &
Trim(adoRecordset.Fields("Message").Value & "")
' Set the delimiter ready for the next message.
strNewTextDelimiter = " * * "

' Get the next message from the recordset
adoRecordset.MoveNext
Loop

The code above works fine but the moment I attempt to add the special
characters the scripts do not run and the web page will not update :-( ,
Tis driving me crackers!

Cheers,


Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Frank Ratzlow | last post by:
Hi folks, I have a list of entries where some entries contain the special character (quotes) within in the string. If I try to save this entry everything after the quotes is skipped. The reason...
2
by: sdvoranchik | last post by:
We have an application that contains links that run javascripts to create pages in a separate frame. When these links open an external site, it causes the javascripts to no longer function. When...
6
by: Nimrod Cohen | last post by:
Hi, newbie that i am in .Net, i'm trying to add "D/T" as a new element in C# : XmlElement elemAttr = (XmlElement)m_xmlDoc.AppendChild(m_xmlDoc.CreateElement("D/T" ) ); but the framework...
0
by: Andrzej | last post by:
Hi, I have to figure out why we have a problem with special characters in encrypted usernames and passwords. Case: Username: r&bgeorge Password: tigger
17
by: Carl Mercier | last post by:
Hi, Is it possible to use special characters like \n or \t in a VB.NET string, just like in C#? My guess is NO, but maybe there's something I don't know. If it's not possible, does anybody...
7
by: arno | last post by:
Hi, I want to search a substring within a string : fonction (str, substr) { if (str.search(substr) != -1) { // do something } }
6
by: OriginalBrownster | last post by:
Hi there... I'm still pretty new to turbogears. but i have gotten pretty familiar with it i'm just trying to clear something up, i'm having a difficult time using \ when declaring a string...
12
by: Goran Djuranovic | last post by:
Hi all, I ran into a problem where my XMLTextReader fails on .Read() when I have "<" character in one of the attribute's values. What I am trying to do is replace illegal characters ("<", "&" ,...
2
by: tristanlbailey | last post by:
I been scouring the Internet for an answer to my problem, and a couple of times thought I had almost found the answer, but still to no avail. I'm tying to use the Rich Edit class (riched20.dll),...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.