• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3496
  • Last Modified:

Character limit on string variables?

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
Lisp
Asked:
Lisp
  • 3
  • 2
1 Solution
 
LispAuthor Commented:
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
 
LispAuthor Commented:
Sorry, litteral string looks more like this...

exec MyStoredProcedure ''
0
 
ddelhezCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Anthony PerkinsCommented:
ddelhez,

>>If you are programming in ASP<<
The questioner is using JScript (not VBScript) on ASP.  ASP is a platform not a language.
0
 
Anthony PerkinsCommented:
>>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
 
LispAuthor Commented:
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

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now