Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

777 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