I need to pass a CString which sometimes contains more than 255 characters.
How can I do that?
Printable View
I need to pass a CString which sometimes contains more than 255 characters.
How can I do that?
Where to pass?Quote:
Originally Posted by Radu
Please be more explicit.
Quote:
Originally Posted by Radu
A CString object can store up to INT_MAX (2,147,483,647) characters. Why you are fearing for just 255 characters?
Have a look at below link...
http://msdn.microsoft.com/library/de...tring_data.asp
ok, I have an array of strings. I need to copy a number of entries in this array to a single CString variable, something like:
for (int i = 0; i < 10; i++)
myStr += myStrArray[i];
So, if the number of characters in these entries exceeds 255 then myStr won't contain the rest which exceeds 255.
:cool:Quote:
Originally Posted by santoct2002
Are you sure? Just try this:
Code:CString strBig(_T('A'), INT_MAX - 1);
so, any idea what I can do about this?
Yes...I am sure... :cool:Quote:
Originally Posted by micknustiunimik
Just add this:Quote:
Originally Posted by Radu
and I assure you can get more than 255.Code:int nLength = myStr.GetLength();
Possible you have seen max. 255 in the output window. There is a limitation, indeed.
Well...post your code where you fill the string...Quote:
Originally Posted by Radu
Are you sure based on that ASSERT(nLen <= INT_MAX-1) from CString::AllocBuffer?Quote:
Originally Posted by Andreas Masur
ok, if I read the length it gives me more than 255 so probably it is indeed the limitation of the watch?!
So, the problem must be somewhere else. The thing is, I am exporting this string into a cell of an excel sheet and in the sheet I am seeing only 255 characters so first i thought it was a limitation of the cell length in the sheet but if I fill a cell by hand with more than 255 chars, it works. So now I'm pretty lost about where the problem could be....
thanks anyway guys!
If you still should have an idea, please let me know!
How are you doing that?Quote:
Originally Posted by Radu
Using ODBC
RFX_Text has a 255 character limit. That's probably your problem.Quote:
Originally Posted by Radu
No...I am sure based in the class code itself...Quote:
Originally Posted by micknustiunimik