C
Cezus
Hello,
I cannot convert the following query in the dataset to a string. It
says it cannot get more then 2034 chars long... the string just ends
at 2034 characters...
this is where it goes wrong in the code:
string xml = Convert.ToString(mijnQTA.GetDataXMLForAuto());
it just won't put in more then 2034 characters in the string.
I hope somebody can help me?
With Kind Regards,
Cees van Altena.
query in the dataset:
SELECT Studentennummer, Voornaam, Initialen, Tussenvoegsel,
Achternaam, Geslacht, Straatnaam, Huisnummer, Postcode,
Telefoonnummer, Mobiel, Emailadres,
Domeincode
FROM Studenten FOR XML AUTO, ELEMENTS, ROOT('RootElement')
Generic Handler code:
using System;
using System.Collections;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Xml;
namespace demoService
{
/// <summary>
/// Summary description for $codebehindclassname$
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class XsltXMLForAuto : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
// Maak een QueriesTableAdapter
DemoTableAdapters.QueriesTableAdapter mijnQTA = new
DemoTableAdapters.QueriesTableAdapter();
// Voer de query uit, resultaat is een string
string xml =
Convert.ToString(mijnQTA.GetDataXMLForAuto());
// Stop xml in een XmlDocument
XmlDocument mijnXmlDocument = new XmlDocument();
mijnXmlDocument.LoadXml(xml);
XmlNode mijnNode = mijnXmlDocument.DocumentElement;
context.Response.ContentType = "text/xml";
context.Response.Write(mijnNode.OuterXml);
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
I cannot convert the following query in the dataset to a string. It
says it cannot get more then 2034 chars long... the string just ends
at 2034 characters...
this is where it goes wrong in the code:
string xml = Convert.ToString(mijnQTA.GetDataXMLForAuto());
it just won't put in more then 2034 characters in the string.
I hope somebody can help me?
With Kind Regards,
Cees van Altena.
query in the dataset:
SELECT Studentennummer, Voornaam, Initialen, Tussenvoegsel,
Achternaam, Geslacht, Straatnaam, Huisnummer, Postcode,
Telefoonnummer, Mobiel, Emailadres,
Domeincode
FROM Studenten FOR XML AUTO, ELEMENTS, ROOT('RootElement')
Generic Handler code:
using System;
using System.Collections;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using System.Data.SqlClient;
using System.Xml;
namespace demoService
{
/// <summary>
/// Summary description for $codebehindclassname$
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class XsltXMLForAuto : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
// Maak een QueriesTableAdapter
DemoTableAdapters.QueriesTableAdapter mijnQTA = new
DemoTableAdapters.QueriesTableAdapter();
// Voer de query uit, resultaat is een string
string xml =
Convert.ToString(mijnQTA.GetDataXMLForAuto());
// Stop xml in een XmlDocument
XmlDocument mijnXmlDocument = new XmlDocument();
mijnXmlDocument.LoadXml(xml);
XmlNode mijnNode = mijnXmlDocument.DocumentElement;
context.Response.ContentType = "text/xml";
context.Response.Write(mijnNode.OuterXml);
}
public bool IsReusable
{
get
{
return false;
}
}
}
}