473,395 Members | 1,488 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,395 software developers and data experts.

Removing the symbols for Carriage Return and Line Feed

6
I am using vb.net and have a long string of text. When I use vbnewline or vbCrLf, for a carraige retun, I get a black square box in the SQL database table. I need the carriage return but I don't want the symbol to show up in SQL table because when another application (vb.6) is opened which uses the same SQL dbase table and shows the text, I get the carriage return, but I also get the unwanted symbol |

What code or command in vb.net can I use that will still give me the carriage return but not put the black box in the sql dbase table?
Feb 20 '08 #1
4 8362
Plater
7,872 Expert 4TB
I would guess that your program inserts a "\r\n" as the newline and the vb6 only looks for "\n".
Just have vb6 remove the "\r" character, or don't insert the "\r" is your vbnet side.
Feb 20 '08 #2
LOCAFO
6
I don't understand what you are talking about. Maybe this will better help you understand my dillema. The xml file that I receive has ~ ~. This is where the carriage return/line break should be. Therefor, In my vb.net code, I do the following command. NewValue = Replace(NewValue.string, m_linebreak, VbCrLf).

NewValue is the long string of the xml data and m_LineBreak is ~ ~.

The black square boxes shows up in the database and in vb6, I get the || marks.
Feb 22 '08 #3
Plater
7,872 Expert 4TB
The square boxes ARE the carriage return (\r) and Line Feed (\n), (most?)databases will not show the line breaks in their stored values.
Why VB6 is being screwy with it I don't know. Seems like there is a very simple way for this not to be a problem.
Store the values with ~ ~, then when reading the data, change the ~ ~ to the carriage return line feed.
Feb 25 '08 #4
If you are using a textbox go to the properties and make it multiline
Oct 9 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: | last post by:
Hi, I want to send an Email using ASP (I know how to to this) The body of the Email contains several variabels How do I concat string values and separate them by carriage returns/ Line feeds? ...
1
by: Neil S. | last post by:
I am writing an ISAPI filter which is using CAPICOM to encrypt and decrypt cookie information. I've found that the encryption string being returned by CAPICOM a has carriage control and line feed....
1
by: wschaub | last post by:
Is there any way of forcing an ASMX web service not to translate a carriage return – line feed (\r\n) with a (\n\n), in other words the carriage return \r is replaced with a \n if contained as...
2
by: John Dalberg | last post by:
Hi What's the regex to remove the carriage return/line field from a string? These can occur multiple times in the string as in xxx\r\n\r\n. -- John Dalberg
2
by: Torsten Zachert | last post by:
I would like to insert some text with embedded carriage return/line feed into a MS Access text field with OleDb and C# ADO.NET. I tried to use "\n" in combination with "\r". If I display the input...
0
by: John Dalberg | last post by:
I noticed that when I add key/value pairs to a NameValueCollection variable and send this collection through a POST using WebClient.UploadValues method, the recepient process receives the...
2
by: Enrico Sabbadin | last post by:
Hi, A few days go I fiund iut that the xmlserializer strips away /r/n out during deserialization (and just leave /n) ... I found out that you can resolve this problem using the deserialize...
6
by: azizrasul | last post by:
I have a text file with x number of lines. When opening the file, I have an extra blank line which I presume is a carriage return, How do I 1. ensure I don't have a blank line when I write to...
8
by: kcovert | last post by:
using System.Net.Mail; I've been unable to get a carriage return/line feed into the body of my Outlook message. Have look all over the web for a soltion with no luck. Here's what I have tried...
0
by: Hayduke | last post by:
I've observed various posts here and elsewhere concerning CRLFs getting stripped out of programatically generated emails. This behavior is evident when the email is viewed using various versions of...
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: 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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.