Solved

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

Posted on 1998-10-19
2
950 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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.

707 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

18 Experts available now in Live!

Get 1:1 Help Now