473,466 Members | 1,349 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How can I clean this string ?

I'm using Microsoft.Project.OLEDB.9.0 provider with a datareader to read data from a .mpp file (Microsoft Project plan) from ASP.NET
The problem is All the STRING values, the datareader returns, do not end properly.
I mean, suppose the value its suposed to return is "surya".. But instead it returns "sury
The length of this string is around 256 characters... meaning the string is not ending properly and has some characters appended to it
strTemp = drRecords("TaskName").tostrin
I've tried strTemp = String.copy (drRecords("TaskName").tostring).... still it gives the same problem

How can I clean this string
Please help
Thanks
Sury

Jul 21 '05 #1
1 1391
If it returns trailing spaces, you can use string.Trim()

--
----------
WBR, Morozov Max
"Surya" <an*******@discussions.microsoft.com> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
ÓÌÅÄÕÀÝÅÅ: news:CC**********************************@microsof t.com...
I'm using Microsoft.Project.OLEDB.9.0 provider with a datareader to read data from a .mpp file (Microsoft Project plan) from ASP.NET. The problem is All the STRING values, the datareader returns, do not end properly. I mean, suppose the value its suposed to return is "surya".. But instead it returns "surya The length of this string is around 256 characters... meaning the string is not ending properly and has some characters appended to it. strTemp = drRecords("TaskName").tostring
I've tried strTemp = String.copy (drRecords("TaskName").tostring).... still it gives the same problem.
How can I clean this string ?
Please help.
Thanks,
Surya

Jul 21 '05 #2

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

Similar topics

15
by: lallous | last post by:
Hello, I have a function like: void fnc() { char *mem1, *mem2, *mem3, *mem4; // lots of code... // mem1, 2, 3, 4 got allocated // lots of code and condition checks if (condition_failed)
17
by: Christopher Benson-Manica | last post by:
Yesterday I changed some code to use std::vectors and std::strings instead of character arrays. My boss asked me today why I did it, and I said that the code looks cleaner this way. He countered...
0
by: Sreejumon[MVP] | last post by:
Hi, For controls haveing text property (textbox, lablel etc) you can use ControlName.Text = String.Empty to clear the contents. For databind controls like repeater, datagrid, dalalist etc you...
1
by: Surya | last post by:
I'm using Microsoft.Project.OLEDB.9.0 provider with a datareader to read data from a .mpp file (Microsoft Project plan) from ASP.NET The problem is All the STRING values, the datareader returns, do...
4
by: arak123 | last post by:
consider the following oversimplified and fictional code public void CreateInvoices(Invoice invoices) { IDbCommand command=Util.CreateDbCommand(); foreach(Invoice invoice in invoices) //lets...
232
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first...
7
by: Ben | last post by:
Hi We are looking for a component that offers that offers the below for Tiff files: Image clean-up (deskew, despeckle) Printing capabilities from VB The ability to add text to image, e.g....
8
by: Ulysse | last post by:
Hello, I need to clean the string like this : string = """ bonne mentalit&eacute; mec!:) \n <br>bon pour info moi je suis un serial posteur arceleur dictateur ^^* \n ...
25
by: Koliber (js) | last post by:
sorry for my not perfect english i am really f&*ckin angry in this common pattern about dispose: ////////////////////////////////////////////////////////// Public class...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.