DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Mikhael Guest

    Why is my CString variable being cut off?


    Any explanation? I thought CString has a huge limit? I am not even at 300
    characters. What's up with that?

    Thanks,
    :Michael

  2. #2
    Danny Kalev Guest

    Re: Why is my CString variable being cut off?

    please post some code. Obviously, there is a bug lurking somewhere in
    your code. CString should handle long strings without any problem.

    Danny

    Mikhael wrote:
    >
    > Any explanation? I thought CString has a huge limit? I am not even at 300
    > characters. What's up with that?
    >
    > Thanks,
    > :Michael


  3. #3
    Mikhael Guest

    Re: Why is my CString variable being cut off?


    Hello Danny,

    Here's the code:

    ============================
    CString cSQL;

    cSQL = "Select Company,Duns_No,EDI_Contact,";
    cSQL += "EDI_Contact_Phone,EDI_Contact_Fax,";
    cSQL += "Third_Party_Svc_Provider,URL_Address,";
    cSQL += "ISA_Qualifier,ISA_Code,ISA_X12_Version,";
    cSQL += "Signer_Key_ID,Signer_Pass_Phrase From G_EDI_TPA";
    ===========================

    Thanks,
    Mikhael

    Danny Kalev <dannykk@inter.net.il> wrote:
    >please post some code. Obviously, there is a bug lurking somewhere in
    >your code. CString should handle long strings without any problem.
    >
    >Danny
    >
    >Mikhael wrote:
    >>
    >> Any explanation? I thought CString has a huge limit? I am not even at

    300
    >> characters. What's up with that?
    >>
    >> Thanks,
    >> :Michael



  4. #4
    Sergio Guest

    Re: Why is my CString variable being cut off?


    I want to know, the reason why you think that!
    Can you only see 300 characters at watch or variable window, or you take
    the CString.GetLength() method ?

    Sergio


    "Mikhael" <kibrosky@aol.com> wrote:
    >
    >Any explanation? I thought CString has a huge limit? I am not even at

    300
    >characters. What's up with that?
    >
    >Thanks,
    >:Michael



  5. #5
    Danny Kalev Guest

    Re: Why is my CString variable being cut off?

    OK, looks like you've hit a well-known limitation of the debugger, which
    can display no more than 255 characters per symbol. This doesn't mean
    however that the string is really chopped, you simply can't see the rest
    of the characters in a debug window. My advice is to print it on the
    screen, e.g., using cout or printf.

    Danny

  6. #6
    Mikhael Guest

    Re: Why is my CString variable being cut off?


    That is what i see on the watch window... I will try to see what I'd get
    using GetLength.

    Thanks,
    :Mikhael

    "Sergio" <skser@bigfoot.com> wrote:
    >
    >I want to know, the reason why you think that!
    >Can you only see 300 characters at watch or variable window, or you take
    >the CString.GetLength() method ?
    >
    >Sergio
    >
    >
    >"Mikhael" <kibrosky@aol.com> wrote:
    >>
    >>Any explanation? I thought CString has a huge limit? I am not even at

    >300
    >>characters. What's up with that?
    >>
    >>Thanks,
    >>:Michael

    >



  7. #7
    Mikhael Guest

    Re: Why is my CString variable being cut off?


    Thanks Danny!

    I will do that.

    :Mikhael

    Danny Kalev <dannykk@inter.net.il> wrote:
    >OK, looks like you've hit a well-known limitation of the debugger, which
    >can display no more than 255 characters per symbol. This doesn't mean
    >however that the string is really chopped, you simply can't see the rest
    >of the characters in a debug window. My advice is to print it on the
    >screen, e.g., using cout or printf.
    >
    >Danny



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links