CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: ODBC problem

  1. #1
    Guest

    ODBC problem

    I am storing a large amount of text in a field on Sybase. I am useing MFC to write to and retrieve this text field. However I experience problems when I attempt to read/write more than 255 characters to this column. This is not an issue when talking to the database through the sybase 'interactive sql' so I think this is an ODBC issue.
    The data type of the field is a varchar and I believe sybase stores characters beyond the 255th separately from the rest of the row.

    Is there a workaround for this problem as I don't know how to go about solving it?

    Any suggestions would be appreciated.


  2. #2
    Join Date
    May 1999
    Location
    Wisconsin, USA
    Posts
    953

    Re: ODBC problem

    Are you using CRecordset?

    If so check out your DoFieldExchange() method.

    You'll need to add a third parameter to your call to RFX_Text().

    Something like this:

    RFX_Text(pFX, _T("[myTextField]"), m_myField,5000);

    Where 5000 is the number of characters you allow for.



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