tramite chiamata ascincrona lancio una query... solo ke il risultato della query (un XML)
è troppo lungo per la stringa di contenimento...
qualcuno sa una soluzione per ritornare alla pagina kiamante l'intero XML?
vi posto qui sotto il codice:
codice:
Imports System.Data
Imports System.Data.SqlClient
Imports FileComuni.NET
Imports SIC_WebService
Imports FileComuniClassLibrary
Imports iTextSharp.text
Imports iTextSharp.text.pdf
Imports System.IO
Imports PDFCommon
Imports System.Xml
Partial Class getAna
Inherits System.Web.UI.Page
Dim objWebService As New FunzioniBase
Sub Page_Load(ByVal Src As Object, ByVal E As EventArgs) Handles MyBase.Load
Dim Leggi As SqlDataReader
Dim SQL As String
Dim objDb As New DatabaseClass(objWebService.PCCOM_LeggiDB("Statistiche"))
Dim xmldoc As New XmlDocument
Dim xmlOUT As String
Dim xml As XmlReader
Dim tipo As String
Dim ob As String
Dim filtro As String
ob = Request("ob")
tipo = Request("tipo")
filtro = Request("filtro")
'If (ob <> "") And (tipo <> "") Then
SQL = " SELECT CodiceSIC, "
SQL &= " Denominazione "
SQL &= " FROM Anagrafica "
SQL &= " WHERE '1'='1' "
Select Case tipo
Case "Contraenti"
SQL &= "AND CodRuoloEnte = 'CNR' "
Case "Intermediari"
SQL &= "AND (CodRuoloEnte = 'AGE' OR CodRuoloEnte = 'BAN' OR CodRuoloEnte = 'BRK' OR CodRuoloEnte = 'COM' OR CodRuoloEnte = 'SAGE') "
End Select
If filtro <> "" Then
If filtro = "0" Then
SQL &= " AND (ISNUMERIC(LEFT(denominazione,1))=1 OR LEFT(denominazione,1) = '')"
Else
SQL &= "AND Denominazione LIKE ('" & filtro & "%') "
End If
End If
If ob = "y" Then
SQL &= " ORDER BY Denominazione"
End If
SQL &= " FOR XML AUTO, ELEMENTS, ROOT('ramoprincipale') "
Leggi = objDb.ReturnDataReader(SQL)
If Leggi.Read Then
xmlout = leggi(0)
'Else
' xmlout = "<ramoprincipale></ramoprincipale>"
End If
if leggi.read
Leggi.Close()
'Else
'xmlOUT = "<Anagrafica></Anagrafica>"
End If
'------------------------------------------------------------------------------------
'imposto il giusto ContentType.
Response.ClearContent()
Response.ClearHeaders()
Response.ContentType = "text/xml"
Response.Write(xmlout)
Response.Flush()
Response.Close()
End Sub
End Class