The 'TextCopy' example that is included in the SQL CD
samples under DBLIB subdirectory, gives an example how Text Data can be
with DBLIB applications. This is just a sample DB-LIB application which is
not supported my Microsoft.
You can modify the code provided to cater your needs and then build the
The example mentions that the following code can be used to set the
DBTEXTLIMIT / DBTEXTSIZE values:
dbsetopt (pDbproc, DBTEXTLIMIT, strChunkSize);
dbsetopt (pDbproc, DBTEXTSIZE, "2147483647");
Please change these values as per your DOC size and let us know if that
resolved your issue.,
Microsoft SQL Server Support Professional
This posting is provided "AS IS" with no warranties, and confers no rights.
Get secure ! For info, please visit http://www.microsoft.com/security.
Please reply to Newsgroups only.
>Subject: sql_cmd TextCopy 64K limitation?
>Date: Mon, 19 Aug 2002 06:20:30 -0700
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Xref: cpmsftngxa07 microsoft.public.sqlserver.programming:283827
>NNTP-Posting-Host: TKMSFTNGXA04 10.201.232.163
>I am using the procedure sql_cmd to run a DOS/SQL Server
>command called textcopy. This command reads in an entire
>command system file, in my case a '.rtf' into a text field
>in a specified table. After inserting the file into the
>text field I can no longer open the text in MS Word. The
>file begins to convert and then an error results. It
>appears that only 64K of the file can be read back out
>after the insert. Do any of you have any suggestions? I
>have tried different 'chunk sizes' but no luck.