Solved

Character limit on string variables?

Posted on 2006-10-27
7
3,483 Views
Last Modified: 2007-12-19
I'm using ASP 3.0 with javascript.

I have code that produces a long xml string.  My variable (which is called xml) is set like this...

var xml='';

I then go through the process of assigning the xml to it.

When complete I can view the length of the xml variable like this...

Response.Write(xml.length);

And it tells me it's a bit over 20 thousand characters.

That's all fine but when I try to actually view the xml string only an empty string is returned.

I have an sql server stored procedure that accepts xml as a parameter and i'm trying to parse this xml to the stored procedure.  But I can't seem to do anything with it.

Any ideas?
0
Comment
Question by:Lisp
  • 3
  • 2
7 Comments
 

Author Comment

by:Lisp
Comment Utility
The assignment at the end looks like this...

SQL = "exec MyStoredProcedure '" + xml + "'";

but the litteral string produced looks like this..

exec MyStored Procedure ''

I've done this many times in other languages and in asp .net.
0
 

Author Comment

by:Lisp
Comment Utility
Sorry, litteral string looks more like this...

exec MyStoredProcedure ''
0
 
LVL 5

Expert Comment

by:ddelhez
Comment Utility
If you are programming in ASP,

var doesn't exist, it's dim to declare a variable
and to ask the length of a string it is
Response.Write(Len(xml))

and there is no semi-column at the end of lines...
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 75

Expert Comment

by:Anthony Perkins
Comment Utility
ddelhez,

>>If you are programming in ASP<<
The questioner is using JScript (not VBScript) on ASP.  ASP is a platform not a language.
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 194 total points
Comment Utility
>>That's all fine but when I try to actually view the xml string only an empty string is returned.<<
It may be because IIS is interpreting the Xml document as HTML.
0
 

Author Comment

by:Lisp
Comment Utility
Apologies for the delay.  I must have forgotten to come back and award the points.  The xml was indeed being interpreted as html in the page... so it wasn't the code that was flawed, only the means of testing it.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now