473,799 Members | 3,106 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.ToStrin g(mijnQTA.GetDa taXMLForAuto()) ;

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('RootEleme nt')

Generic Handler code:

using System;
using System.Collecti ons;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Serv ices;
using System.Web.Serv ices.Protocols;
using System.Xml.Linq ;
using System.Data.Sql Client;
using System.Xml;

namespace demoService
{
/// <summary>
/// Summary description for $codebehindclas sname$
/// </summary>
[WebService(Name space = "http://tempuri.org/")]
[WebServiceBindi ng(ConformsTo = WsiProfiles.Bas icProfile1_1)]
public class XsltXMLForAuto : IHttpHandler
{

public void ProcessRequest( HttpContext context)
{
// Maak een QueriesTableAda pter
DemoTableAdapte rs.QueriesTable Adapter mijnQTA = new
DemoTableAdapte rs.QueriesTable Adapter();

// Voer de query uit, resultaat is een string
string xml =
Convert.ToStrin g(mijnQTA.GetDa taXMLForAuto()) ;

// Stop xml in een XmlDocument
XmlDocument mijnXmlDocument = new XmlDocument();
mijnXmlDocument .LoadXml(xml);

XmlNode mijnNode = mijnXmlDocument .DocumentElemen t;

context.Respons e.ContentType = "text/xml";
context.Respons e.Write(mijnNod e.OuterXml);

}

public bool IsReusable
{
get
{
return false;
}
}
}
}
Oct 23 '08 #1
1 2638
"Cezus" <ce******@gmail .comwrote in message
news:63******** *************** ***********@d45 g2000hsc.google groups.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
715
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 anyway).... Private Sub LogChange(ByVal source As Object, ByVal e As System.IO.FileSystemEventArgs) If e.ChangeType = WatcherChangeTypes.Created Then
8
5483
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 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
22
27900
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 = (( curRow == System.DBNull.Value ) ? SqlInt32.Null : (int)curRow ); The errors are (in turn):
5
6793
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
4526
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 it seems this convert is determined by the local settings and comma is indeed used as decimal separator. Is there another way to convert a dotted value to a double variable? Like 1234.5 and not 1234,5
0
3579
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 public RegistrationResponse registerDevice(RegistrationRequest regReq) throws RemoteException
5
38540
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 to string. I have a function that accepts a string, and I wish to access this function for each character in the string, individually. The only solution I have found is: char c = 'A'; string s = System.Text.Encoding.ASCII.GetString(c);
7
16721
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 returned from the source. My first attempt was as follows; (please ignore that error handling is not present in this example) public T GetValue<T(string objName) { T results;
5
9067
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? This is my function I am trying to get right: public static bool GetPrivateProfileSectionAsCS(string appName, string fileName, out string section)
0
9687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10484
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10251
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10027
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9072
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4141
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.