Writing MSSQL TEXT field from CRecordset 
Author Message
 Writing MSSQL TEXT field from CRecordset

Hopefully this is a simple question for someone.  We are using MSSQL
as the platform for a new B/AR system to replace an aging system.  I
am trying to write a report to a TEXT field so that once the report is
created, it can be easily viewed or printed on demand by our users.
This is a plain text report that will not be over one or two pages.

We are using Visual C++ and ODBC.  When using Class Wizard to create a
derived CRecordset class for the table, the TEXT field is mapped as a
CString.  I have tried writing the report to the CString and updating
the record in the standard way.  This method gives me a "data
truncation" error.

Can a TEXT field be written, updated, and read using the CRecordset
class?  I have access to MSDN, and have found little documentation
regarding the TEXT and IMAGE fields in MSSQL except for T-SQL.

If CRecordset is not the way to go, what is the least complicated way
of updating these type of fields from a VC++ MFC/ODBC application.

Your help is greatly appreciated.

Bradley Powers

Thu, 14 Sep 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Text fields with CRecordset

2. CRecordset & Database text field

3. CRecordset() and Text fields

4. Saving object OLE into BLOB field in MsSQL

5. How to Write a 0-Embeded String to a CDaoRecordSet text field

6. Using CRecordset::AddNew() and CRecordset::Edit() with IDENTITY fields

7. Size of text-fields/edit-fields depending on Font selected

8. how to change the text in the static text field

9. Auto-Highlighting Text Field Text

10. Writing Written Text File at Specific Location in Each Line

11. CRecordset binary type field handling

12. Can CRecordset automatically trim blanks from fields?


Powered by phpBB® Forum Software