Writing Large Text field to a text File in Stored Procedure 
Author Message
 Writing Large Text field to a text File in Stored Procedure

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:





Sat, 18 Jun 2005 23:17:23 GMT
 Writing Large Text field to a text File in Stored Procedure

Rob,

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

Can't you use writetext/updatetext?

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


Quote:
> 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:






Wed, 22 Jun 2005 00:46:58 GMT
 Writing Large Text field to a text File in Stored Procedure
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


Quote:
> 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:






Wed, 22 Jun 2005 01:30:44 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Returning large text fields in a stored procedure

2. Stored Procedures: Writing a Line Feed to a Text Field

3. query large text fields more than 256 characters in stored procedure

4. Retrieving a large text field from a stored procedure

5. Retrieving a large text field from a stored procedure

6. General Purpose osql Stored Procedure to Write To Text File

7. To write data into text file from store procedure

8. Open and write to text file from stored procedure

9. WRITING TO TEXT FILES from stored Procedures

10. Stored Procedures and Writing Text Files

11. Write output to text file from stored procedure

12. Writing to a text file from within a Stored procedure


 
Powered by phpBB® Forum Software