Writing Large Text field to a text File in Stored Procedure

Writing Large Text field to a text File in Stored Procedure

Post by Rob » Thu, 02 Jan 2003 00:17:23



Within a Stored Procedure, I'm trying to write large text
to a text file. Everything works fine until the text gets over 4k.
I then get a network error. (The file is being written to the
hard drive on the server where sql server is.)

I'm doing this so I can bring that textfile back into a table
as an image (in order to do full-text indexing with an ".htm" filter).
Any help would be greatly appreciated.

Here is a the portion of the code that writes the text file:

CREATE PROCEDURE spWriteTextFile



AS








set nocount on




--Create Text File

OUTPUT










set nocount off

ErrorHandler:



 
 
 

Writing Large Text field to a text File in Stored Procedure

Post by oj » Sun, 05 Jan 2003 01:46:58


Rob,

If memory serves, someone mentions it's a limitation with sp_oa*.

Can't you use writetext/updatetext?

--
-oj
http://www.rac4sql.net


> Within a Stored Procedure, I'm trying to write large text
> to a text file. Everything works fine until the text gets over 4k.
> I then get a network error. (The file is being written to the
> hard drive on the server where sql server is.)

> I'm doing this so I can bring that textfile back into a table
> as an image (in order to do full-text indexing with an ".htm" filter).
> Any help would be greatly appreciated.

> Here is a the portion of the code that writes the text file:

> CREATE PROCEDURE spWriteTextFile



> AS








> set nocount on




> --Create Text File


> OUTPUT











> set nocount off

> ErrorHandler:





 
 
 

Writing Large Text field to a text File in Stored Procedure

Post by John Bel » Sun, 05 Jan 2003 02:30:44


Yep you are right!

This problem seems to occur a lot and has been around for ages!

http://support.microsoft.com/default.aspx?scid=KB;en-us;325492&

John


> Rob,

> If memory serves, someone mentions it's a limitation with sp_oa*.

> Can't you use writetext/updatetext?

> --
> -oj
> http://www.rac4sql.net



> > Within a Stored Procedure, I'm trying to write large text
> > to a text file. Everything works fine until the text gets over 4k.
> > I then get a network error. (The file is being written to the
> > hard drive on the server where sql server is.)

> > I'm doing this so I can bring that textfile back into a table
> > as an image (in order to do full-text indexing with an ".htm" filter).
> > Any help would be greatly appreciated.

> > Here is a the portion of the code that writes the text file:

> > CREATE PROCEDURE spWriteTextFile



> > AS








> > set nocount on




> > --Create Text File


> > OUTPUT











> > set nocount off

> > ErrorHandler: