473,385 Members | 1,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

cannot fully convert for xml auto to string

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;
}
}
}
}
Oct 23 '08 #1
1 2617
"Cezus" <ce******@gmail.comwrote in message
news:63**********************************@d45g2000 hsc.googlegroups.com...
I cannot convert the following query in the dataset to a string. It
says it cannot get more then 2034 chars long...
What is "it"? Are you actually getting an error message?
the string just ends at 2034 characters...
I know absolutely nothing about the table adapters or all this generated
data handling (don't use data binding, personally), but I can say that if
it's calling stored procedures that you wrote then those are the first
things to look at. You might just have a DECLARE @RetString 2034 in there
somewhere. I've seen that bite people more than once, myself included. But
then it looks like you have a direct SQL statement there, not an SP, so
that's probably not the answer.
Oct 23 '08 #2

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

Similar topics

9
by: Paul | last post by:
Hi, VB.NET is saying the file I am creating is in use by another process and won't complete its task of moving the file to the specified destination folder. Here is my code (the main bit...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
22
by: Christoph Boget | last post by:
I am getting an error (a few among many) for the following lines of code: retval.BrokerName = (( curRow == System.DBNull.Value ) ? SqlString.Null : (string)curRow ); retval.BrokerGroupId = ((...
5
by: tienlx | last post by:
Hi all, I'm have a problem that i don't know how to convert object to char in C# . Does anybody know ? Thanks.
4
by: Edwin Knoppert | last post by:
In my code i use the text from a textbox and convert it to a double value. I was using Convert.ToDouble() but i'm used to convert comma to dot. This way i can assure the text is correct. However...
0
by: shaily | last post by:
hi I have a java web service called "Registration service" and C# client which is a consumer of that service java web service running under Tomcat has following interface API exposed ...
5
by: Zytan | last post by:
I am surprised that a single character string is not auto-created from a single char. It is hard to find information on converting a char into a string, since most people ask how to convert char...
7
by: groups | last post by:
This is my first foray into writing a generic method and maybe I've bitten off more than I can chew. My intent is to have a generic method that accepts a value name and that value will be...
5
by: Marc | last post by:
Hello dear, I have a string and every second char is a \0. Can I somehow convert it to a normal string. Or may-be in the underlying code I am doing something wrong, choose the wrong C# type? ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.