Click here to Skip to main content
15,918,976 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Create ActiveX control with .net 4.0 Pin
Not Active23-Jun-10 2:34
mentorNot Active23-Jun-10 2:34 
GeneralRe: Create ActiveX control with .net 4.0 Pin
awu2523-Jun-10 4:41
awu2523-Jun-10 4:41 
GeneralRe: Create ActiveX control with .net 4.0 Pin
Not Active23-Jun-10 5:22
mentorNot Active23-Jun-10 5:22 
GeneralRe: Create ActiveX control with .net 4.0 Pin
awu2523-Jun-10 16:57
awu2523-Jun-10 16:57 
GeneralRe: Create ActiveX control with .net 4.0 Pin
Pete O'Hanlon23-Jun-10 21:56
mvePete O'Hanlon23-Jun-10 21:56 
GeneralRe: Create ActiveX control with .net 4.0 Pin
Pete O'Hanlon23-Jun-10 7:39
mvePete O'Hanlon23-Jun-10 7:39 
AnswerRe: Create ActiveX control with .net 4.0 Pin
Dave Kreskowiak23-Jun-10 3:13
mveDave Kreskowiak23-Jun-10 3:13 
QuestionXML Import Failing on XMLDocument.Load: Unexpected end of file has occurred. Pin
D.Dubya22-Jun-10 4:07
D.Dubya22-Jun-10 4:07 
Hi all,

I'm attempting to load an xml document from an XML column in MSSQL 2008, into an XmlDocument (see code below).

Sometimes the code will break at the <b>xdoc.Load(xr)</b> line with the error "Unexpected end of file and occurred". After breaking, the XmlReader has a value of "None".

While researching the problem, I saw posts that referred to a 4Kb limit on StreamReaders and figured this may be related somehow. So I cut down the size of my document (to around 4Kb) and everything worked fine.

On average, the XML documents I'm importing from the database are 20Kb and thanks to validation on INSERT by MSSQL, we can assume(?) the document is well-formed.

Does anyone know how to get 'large' amounts of XML from the database into my XmlDocument?

Dim xr As XmlReader = ExportAdapter.GetEditedCheckXML(chkId)
Dim xdoc As New XmlDocument
xdoc.Load(xr)


Here's the GetEditedCheck fn:
Public Shared Function GetEditedCheckXML(ByVal checkId As Integer) As XmlReader

    Dim conn As SqlConnection = New SqlConnection(CONNECTION_STRING)
    Dim comm As New SqlCommand("PS_GetModifiedXmlByCheckId", conn)
    Dim adap As New SqlDataAdapter

    comm.CommandType = CommandType.StoredProcedure
    comm.Parameters.Add("@checkId", SqlDbType.Int).Value = CInt(checkId)
    conn.Open()

    Dim xml = comm.ExecuteXmlReader()
    xml.Read()
    conn.Close()

    Return xml
End Function

QuestionDifferent query but get same result Pin
Naunt21-Jun-10 23:05
Naunt21-Jun-10 23:05 
AnswerRe: Different query but get same result Pin
Pete O'Hanlon21-Jun-10 23:28
mvePete O'Hanlon21-Jun-10 23:28 
GeneralRe: Different query but get same result Pin
Naunt22-Jun-10 1:17
Naunt22-Jun-10 1:17 
GeneralRe: Different query but get same result Pin
Pete O'Hanlon22-Jun-10 1:47
mvePete O'Hanlon22-Jun-10 1:47 
QuestionPage.ClientScript.RegisterClientScriptBlock Not Working in my page Pin
jintalPatel21-Jun-10 0:54
jintalPatel21-Jun-10 0:54 
AnswerRe: Page.ClientScript.RegisterClientScriptBlock Not Working in my page Pin
Peace ON21-Jun-10 1:42
Peace ON21-Jun-10 1:42 
GeneralRe: Page.ClientScript.RegisterClientScriptBlock Not Working in my page Pin
jintalPatel21-Jun-10 3:12
jintalPatel21-Jun-10 3:12 
GeneralRe: Page.ClientScript.RegisterClientScriptBlock Not Working in my page Pin
Dave Kreskowiak21-Jun-10 5:41
mveDave Kreskowiak21-Jun-10 5:41 
AnswerRe: Page.ClientScript.RegisterClientScriptBlock Not Working in my page Pin
Abhijit Jana21-Jun-10 2:21
professionalAbhijit Jana21-Jun-10 2:21 
GeneralRe: Page.ClientScript.RegisterClientScriptBlock Not Working in my page Pin
Not Active21-Jun-10 2:26
mentorNot Active21-Jun-10 2:26 
GeneralRe: Page.ClientScript.RegisterClientScriptBlock Not Working in my page Pin
Abhijit Jana21-Jun-10 2:35
professionalAbhijit Jana21-Jun-10 2:35 
QuestionHow can i see the metadata of the assembly ? Pin
Yanshof20-Jun-10 22:47
Yanshof20-Jun-10 22:47 
AnswerRe: How can i see the metadata of the assembly ? Pin
Abhinav S21-Jun-10 1:18
Abhinav S21-Jun-10 1:18 
AnswerRe: How can i see the metadata of the assembly ? Pin
Peace ON21-Jun-10 1:35
Peace ON21-Jun-10 1:35 
QuestionI want to develop any website Pin
AkyeaW18-Jun-10 22:18
AkyeaW18-Jun-10 22:18 
AnswerRe: I want to develop any website Pin
Richard MacCutchan18-Jun-10 23:04
mveRichard MacCutchan18-Jun-10 23:04 
AnswerRe: I want to develop any website Pin
Ankur\m/19-Jun-10 0:57
professionalAnkur\m/19-Jun-10 0:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.