473,545 Members | 1,947 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Insert carriage return/line feed with C# and ADO.NET in MS Access

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 in a text field I only see
quads.

Tia

Torsten
Nov 17 '05 #1
2 18754
Have you tried Environment.New Line()?

Regards

--
Steven Lewis [MCP - C#]

Nov 17 '05 #2
> 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 in a text field I only see quads.

These 3 variants ar possible:

1.) Convert.ToChar( 13).ToString() + Convert.ToChar( 10).ToString()

2.) "\r\n"

3.) Environment.New Line

I think the last one is the best one.
Nov 17 '05 #3

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

Similar topics

3
9266
by: Canes_Rock | last post by:
The information posted at: http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=slrnarv28n.e4j.TuxTrax%40fortress.tuxnet&rnum=1&prev=/groups%3Fq%3Dsuppress%2Bcarriage%2Breturn%2Bgroup:comp.lang.python.*%26hl%3Den%26lr%3D%26ie%3DUTF-8%26group%3Dcomp.lang.python.*%26selm%3Dslrnarv28n.e4j.TuxTrax%2540fortress.tuxnet%26rnum%3D1 seemed to...
6
12341
by: pk | last post by:
Sorry for the piece-by-piece nature of this post, I moved it from a dormant group to this one and it was 3 separate posts in the other group. Anyway... I'm trying to bulk insert a text file of 10 columns into a table with 12. How can I specify which columns to insert to? I think format files are what I'm supposed to use, but I can't...
1
850
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 part of a string that is transferred to a web service method. The XML 1.1 standard is supposed to address this problem, however, we are not aware...
2
4116
by: Andrew Chanter | last post by:
I have a VBA function that returns a string including "vbcr" (VB Carriage Return) to seperate a list into multiple rows, eg Item1 & vbcr & Item2 & vbcr & Item3 This works as planned in the immediate window, producing a list where a Carriage Return follows each item. But when I output the result into either an Access query or form, instead...
3
2329
by: david_windeler | last post by:
I am trying to write an Update query to update a field by combining 2 other fields. However, there is a slight twist. I wish to insert a carriage return or a blank line in between the 2 fields. Can this be done and if so how?
2
2325
by: sys | last post by:
I have a web method that returns a string. When I return a string that has a carriage return and line feed in it ("\r\n") on the client side I only receive a string including the line feed ("\n"). The carriage return disappeared. Thanks for any help.
11
8438
by: TheRain | last post by:
Hi, I am trying to append a carriage return to my string using the string builder class, but when I do this the string ends up containing "13". I tried this multiple ways like so sb->Append('\r'); and also
3
10005
by: Gillian Steele | last post by:
I'm trying to import data into a memo field by running an append query. The data is to be imported as if it was entered with separate lines in the memo field. I have tried inserting chr(13)s into the string that is being appended into the memo field but when appended, the data displays with a square box in place of a carriage return/line...
4
27804
by: whitej77777 | last post by:
I am trying to write a user defined function that will allow me to strip off the last carriage return and line feed from a text field. We have address fields stored in a text field for our ERP system and some of them have an extra carriage return and line feed at the end of them. This causes havoc when we sync between our ERP system and CRM...
0
7675
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7928
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7440
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7775
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
4963
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3470
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1902
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1030
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
726
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.