Solved

Problem in RFX_Text (CRecordset) While more than 256 char.

Posted on 1998-10-19
2
989 Views
Last Modified: 2012-08-14
Is there a better way than RFX_Text to handle large data fields? using CRecordset..
RFX_Text defaults to 255 characters maximum, I need to set this higher for a Memo field.
I think this is a documented error in MFC.
When i enter the data more than 255 char into the field it breaks. Hope anyone can help me.
0
Comment
Question by:manuelfrancis
2 Comments
 
LVL 1

Accepted Solution

by:
Darren_Simons earned 100 total points
ID: 1175608
In terms of fixing the code, as you mention you can change the max. characters using something like....

RFX_Text(pFX, _T("[VARIABLE]"), m_Variable, 10000);

where the length you specify is 10000. I am currently using this for a record set talking to SQL Server, which has no concept of memo fields and *always* requires a maximum length to be set.

I don't believe there is another way of doing this, since I imagine other databases work in a similar way to SQL Server
0
 

Author Comment

by:manuelfrancis
ID: 1175609
Thanks Darren_Simons,

Your answer is quite right and helped me too...
The same answer is there in the VC help and MSDN CD but i did't seen that before.

Thanks once again.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now