About the size of CString
-
Hello every body i try to put mor than 256 char in the CString viriable but i cannot, any help. Best Regards :)
Can you provide a code snippet of how you are doing this?
-
Hello every body i try to put mor than 256 char in the CString viriable but i cannot, any help. Best Regards :)
The MFC CString will accommodate strings far longer than 256 characters. It is more likely that there is something wrong with the code that is populating the CString. Post the code if you still have problems! :)
-
Can you provide a code snippet of how you are doing this?
CString query; query=_T("select distinct globalt.Mkname,globalt.Route,globalt.Time,globalt.SI,globalt.NDV,globalt.ANBLO,Avg(globalt.Traff) AS AvgTraffic,Avg( globalt.CCONG) AS AvgCCONG \n" "from globalt \n" "where ((([globalt].[Route]) Like '*SS*' Or ([globalt].[Route]) Like '*I')=False"); Best Regards :)
-
CString query; query=_T("select distinct globalt.Mkname,globalt.Route,globalt.Time,globalt.SI,globalt.NDV,globalt.ANBLO,Avg(globalt.Traff) AS AvgTraffic,Avg( globalt.CCONG) AS AvgCCONG \n" "from globalt \n" "where ((([globalt].[Route]) Like '*SS*' Or ([globalt].[Route]) Like '*I')=False"); Best Regards :)
There's only 254 characters there. What's the problem?
-
Hello every body i try to put mor than 256 char in the CString viriable but i cannot, any help. Best Regards :)
Use the
Format
method:CString s;
s.Format ("A very long string");Best regards, Alexandru Savescu P.S. Interested in art? Visit this!
-
Hello every body i try to put mor than 256 char in the CString viriable but i cannot, any help. Best Regards :)
-
There's only 254 characters there. What's the problem?
Thank u for ur reply I know every thing appeares normal in my code, but after this step if watch this variable 'query' it equals: "select distinct globalt.Mkname,globalt.Route,globalt.Time,globalt.SI,globalt.NDV,globalt.ANBLO,Avg(globalt.Traff) AS AvgTraffic,Avg( globalt.CCONG) AS AvgCCONG from globalt where ((([globalt].[Route]) Like '*SS*' Or ([globalt].[Route]) Like '*I')=Fal" as u see some char doesnot included "se", even if i add more strings to this variable like query+="any thing" then it doesnt appeare. so this is my problem!!!! Best Regards :)
-
There's only 254 characters there. What's the problem?