473,403 Members | 2,284 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,403 software developers and data experts.

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 1389
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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
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...
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...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.