How can I clean this string ?

G

Guest

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
 
M

Morozov Max

If it returns trailing spaces, you can use string.Trim()

--
----------
WBR, Morozov Max
Surya said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top