How to process large text in SQL Server? 
Author Message
 How to process large text in SQL Server?

Hi,
    I want to process a large text field in SQL Server, but the buffer ODBC
provided is a CString, for a very large text, more than 70,000 bytes, it
can't process. the error message is "Data was truncated", How do i do ?


Tue, 27 Aug 2002 03:00:00 GMT  
 How to process large text in SQL Server?
I just bump into almost the same problem a while ago.

We solved the problem using VARIANT. We set the variant type to BSTR and
uses SysAllocStringLen to allocate the BSTR. Then we convert byte by
byte from String to BSTR.

On another note, check this out:
http://msdn.microsoft.com/library/psdk/sql/8_ar_ts_1.htm

The Maximum Capacity Specification should prove to be useful to you.

The Max string length is 128KB. So you are still within the range and
you should be fine.

Another thing to check is to make sure that you don't have the close
quote within your string. I found that to be problematic and ODBC will
truncate the string for you and generate invalid syntax error.

Quote:
-----Original Message-----

Hi,
    I want to process a large text field in SQL Server, but the buffer
ODBC
provided is a CString, for a very large text, more than 70,000 bytes, it
can't process. the error message is "Data was truncated", How do i do ?



Tue, 27 Aug 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Storing very large binary objects in SQL Server 7

2. Update call to SQL Server with large record never returns

3. In process server to out of process server

4. SQL server Text type problem

5. HELP - Long text from Access to SQL Server?

6. Inserting a Delimited Text File into SQL Server

7. Image and Text fields in SQL Server 7

8. MFC CString & SQL Server text

9. Getting text datatype from SQL Server with MFC ODBC library

10. Inserting a Delimited Text File into SQL Server

11. Inserting a Delimited Text File into SQL Server

12. MFC CString & SQL Server text

 

 
Powered by phpBB® Forum Software