CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 26 of 26
  1. #16
    Join Date
    Aug 2001
    Location
    germany
    Posts
    772

    Re: How to use CString with more than 255 characters?

    oh dammit!! I was fearing something like that...

    Thanks GCDEF!

    Any idea what I can do about it?

  2. #17
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,637

    Re: How to use CString with more than 255 characters?

    Quote Originally Posted by Radu
    oh dammit!! I was fearing something like that...

    Thanks GCDEF!

    Any idea what I can do about it?
    Read up on RFX_LongBinary. It's a little more involved, but that's what you use for transferring large amounts of data.

  3. #18
    Join Date
    Oct 2004
    Location
    Romania
    Posts
    45

    Re: How to use CString with more than 255 characters?

    Quote Originally Posted by Andreas Masur
    No...I am sure based in the class code itself...
    Well, but INT_MAX (2,147,483,647) is bigger than the usable space for a Win32 process, e.g. 2,147,352,576 for NT.
    Try T H I S

    Mick

  4. #19
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,244

    Re: How to use CString with more than 255 characters?

    Right!
    Never trust a stuff before test it!
    Ovidiu
    "When in Rome, do as Romans do."
    My latest articles: https://codexpertro.wordpress.com/

  5. #20
    Join Date
    May 2000
    Location
    KY, USA
    Posts
    18,652

    Re: How to use CString with more than 255 characters?

    Quote Originally Posted by micknustiunimik
    Well, but INT_MAX (2,147,483,647) is bigger than the usable space for a Win32 process, e.g. 2,147,352,576 for NT.
    So? It is stilll valid that a 'CString' can hold up to INT_MAX - 1 characters...whether the underlying operating system supports it or not is a different story....

  6. #21
    Join Date
    Aug 2004
    Location
    Earth, Solar System, Milky Way
    Posts
    80

    Re: How to use CString with more than 255 characters?

    Quote Originally Posted by Andreas Masur
    So? It is stilll valid that a 'CString' can hold up to INT_MAX - 1 characters...whether the underlying operating system supports it or not is a different story....
    In fact it cannot. Just it tries.
    Hokutata Yakubotu

  7. #22
    Join Date
    Dec 2004
    Posts
    16

    Re: How to use CString with more than 255 characters?

    Quote Originally Posted by GCDEF
    RFX_Text has a 255 character limit. That's probably your problem.
    Bringing up an old post... is there a way around this? i am trying to write more text to an access database using OBDC and RecordSet

    any suggestions?

  8. #23
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,637

    Re: How to use CString with more than 255 characters?

    Quote Originally Posted by Drabert
    Bringing up an old post... is there a way around this? i am trying to write more text to an access database using OBDC and RecordSet

    any suggestions?
    I don't think an Access text field can hold more than 255 characters anyway. As I mentioned earler, RFX_LongBinary will let you transfer BLOBs.

  9. #24
    Join Date
    Aug 2001
    Location
    germany
    Posts
    772

    Re: How to use CString with more than 255 characters?

    Quote Originally Posted by Drabert
    Bringing up an old post... is there a way around this? i am trying to write more text to an access database using OBDC and RecordSet

    any suggestions?
    Hi Drabert,

    I was trying to do something with RFX_LongBinary but didn't get too far because it's not straightforward and I didn't have the time to go too deep on that. However if you find a solution, I would appreciate alot if you could tell me how it works!!
    Hope to hear from you!
    Please rate if it helps!

    * The second mouse gets the cheese.

    * Birthdays are good for you. The more you have, the longer you live.

    * Always keep your words soft and sweet, just in case you have to eat them.

    * Always read stuff that will make you look good if you die in the middle of it.

  10. #25
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,430

    Re: How to use CString with more than 255 characters?

    Quote Originally Posted by GCDEF
    I don't think an Access text field can hold more than 255 characters anyway. As I mentioned earler, RFX_LongBinary will let you transfer BLOBs.
    Yes, the Access text field cannot hold more than 255 characters. However, the Memo field can. The memo field limit depends on the MS Access version.
    From MSDN (ACC: Concatenation of Memo Fields Creates Text Field ):
    Text fields have a limit of 255 characters; Memo fields can contain up to 32,000 characters in Microsoft Access 1.x, and up to 64,000 characters in Microsoft Access 2.0 or later.

  11. #26
    Join Date
    Dec 2004
    Posts
    16

    Re: How to use CString with more than 255 characters?

    ok i did a lot more research on here and found what you were talking about with the memo field but i am getting the truncate problem because the CString is too large... i tried this

    RFX_Text(pDX, IDC_DESCRIPTION, m_pSet->m_Description, 1500,SQL_LONGVARCHAR);

    but it didnt work... still getting the truncate problem...

    any sugestions? or am i totally doing this incorrectly?

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured