You are here: Re: Problem writing XML files. « MsSQL Server « IT news, forums, messages
Re: Problem writing XML files.

Posted by John Bell on 09/07/05 00:36

Hi

You may want to check out http://sqlxml.org/faqs.aspx?faq=29 but there may
be issues with line breaks for sp_makewebtask or look at
http://www.perfectxml.com/Articles/XML/ExportSQLXML.asp

John

"Pi" <3.something@gmail.com> wrote in message
news:1126041751.328093.220490@f14g2000cwb.googlegroups.com...
> Hi guys,
>
> I have a stored procedure that I will subsequently post below this
> message. What the stored procedure does is, it reads some specific
> tables in a database and created XML off it.
>
> The problem comes in when the data is bigger than a few hundred/
> thousand characters. The data is truncated and the XML file is not
> fully made.
>
> Now i have been reading some posts by some people and tried using TEXT/
> NTEXT/ IMAGE type to write the files but they give me errors which,
> again, I am adding to this email.
>
> STORED PROC:
> ****************************
>
> CREATE PROCEDURE usrp_sp_makexmlfile
> @str varchar(50),
> @templatefile varchar(255),
> @ReturnValue as image OUT
>
> AS
> SET NOCOUNT ON
> DECLARE @strVar as varchar(8000)
> /*DECLARE @ReturnValue as varchar(255)*/
>
> Set @strVar = 'Select * from ' + @str + ' FOR XML AUTO'
> Set @templatefile = 'c:\template.tpl'
>
> EXEC (@strVar)
>
> SELECT @ReturnValue
> GO
>
>
>
>
>
> THIS IS WHAT I GET WHEN I USE IMAGE/NTEXT/TEXT TYPE:
> *********************************************************
>
> An unhandled exception of type 'System.InvalidOperationException'
> occurred in system.data.dll
>
> Additional information: Parameter 2: '@ReturnValue' of type: Byte[],
> the property Size has an invalid size: 0
>
>
> Also, if i try to add an integer value to the image/text/ntext like
> 8000 or something less than that, it tells me that the result has to be
> discarded because the current process has had some error.
>
>
> Can someone give me a suggestion on how to resolve this or an example
> that would illustrate the solution? Thank you all in advance.
>
> Pi.
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация