473,503 Members | 1,681 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Render Xml from image DataType

Sorry for the cross post, but I'm stumped.

I'm trying to render the XML content that is stored as an image datatype in
the SQL Server Reporting Services database.Table Catalog, Content Colmn,
using ASP.NET (VB.NET).

These look to tbe the RDL files that get uploaded where the TYPE column = 2
in the Catalog Table.
What happens is, the xml gets rendered in IE (6.0) but is truncated at the
end because it is not well-formed. It seems most of the XML is rendered
except for a the last few lines.

Here is the error in the browser:

?//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Cannot view XML input using XSL style sheet. Please correct the error and
then click the Refresh button, or try again later.
------------------------------------------------------------------------------

Cannot have a DOCTYPE declaration outside of a prolog. Error processing
resource 'http://sauronan.gefa.ad.ga.gov/FSTProject...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
----------^/DIV>
<PaddingTop>2pt</PaddingTop>

?/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Here's my code-behind:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Dim ImgStream As MemoryStream = New MemoryStream

Dim cn As SqlConnection = New
SqlConnection("server=SAURONAN;database=ReportServ er;user
id=FSTApp;password='pass")

Dim rdr As SqlDataReader

Dim xName As String = ddlNme.SelectedValue

Dim cmd As New SqlCommand("GetBinaryData", cn)

cmd.CommandType = CommandType.StoredProcedure

Dim param As SqlParameter

param = cmd.Parameters.Add(New SqlParameter("@sName", xName))

param.Direction = ParameterDirection.Input

cn.Open()

Dim blob() As Byte = CType(cmd.ExecuteScalar(), Byte())

context.Response.ContentType = "text/xml"

context.Response.OutputStream.Write(blob, 0, blob.Length)

cn.Close()

Response.Flush()

End Sub

Any ideas on how to get this data. I really don't care how, as long as I
have access to it.

-Troy
Nov 19 '05 #1
1 1553
Your problem is that somewhere there is a Doctype. If you need a
doctype to be spit out then the proper way to do this with XSL is to
use
<xsl:output doctype-public="-//W3C//DTD HTML 4.01//EN"
doctype-system="http://www.w3.org/TR/html4/strict.dtd" method="html"
version="4.01" encoding="UTF-8" indent="yes"/>
If you have no control then you are going to have to manually search
and replace the Doctype yourself. This could be as simple as fast
forwarindg your stream by x azmount of bytes so it skips over the
Doctype.

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
2938
by: Roger Withnell | last post by:
I'm updating a record by opening a recordset, setting the fields and the updating it with objRS.Update. I need to set an image datatype to NULL. objRS("field") = NULL works for datatypes int...
4
3159
by: lkrubner | last post by:
I'd like to write a PHP script to be used from the command line on a Unix machine. I'd like for the script to put together a string, turn it into a web page, print it, then return control the...
5
29098
by: Jason Huang | last post by:
Hi, I have a PassWord column in SQL Server 2000 which is image datatype. How do I transfer or decode/encode text to image datatype so that my SQL Server recongnize it? Any help will be...
2
1421
by: Jeronimo Bertran | last post by:
I have an aspx page that shows a complex image with several objects that are sensitive to mouseover events. The information about the objects in the image is obtained from a database and complex...
9
1475
by: Lars Netzel | last post by:
Hey! Is there any possibility to render images for the web in asp.net? Is it hard? Is there something built in or do I need external commercial components? best regards /Lars
3
5224
by: den 2005 | last post by:
Hi everyone, Here is code working on..Trying to insert record with a column with Image or VarBinary datatype in sql database from a existing jpeg image file, then retrieve this image from...
8
4042
by: Edward Diener | last post by:
Is there a way in Javascript, or perhaps in HTML, to force a browser to re-render an image on an HTML page after a round-trip between the client and the server ? In my particular case, the image...
10
7397
by: Nathan Sokalski | last post by:
I am using ASP.NET 2.0, and need to know how to save and use an image that is stored in an SQL Server image datatype. How can I do this using ASP.NET? Thanks.
4
2445
by: Ken Fine | last post by:
I've been living with a frustrating issue with VS.NET for some months now and I need to figure out what the problem is. Hopefully someone has run into the same issue and can suggest a fix. I...
0
7084
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7458
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.