Solved

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

Posted on 1998-10-19
2
1,024 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to convert c++ code to Android App 3 128
mixing C++ & C# in Vis Studio 2013 7 229
VS2015 compilation and missing DLLs 9 180
Error C2678: binary '!=': no operator found... 4 63
When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
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.

680 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