Link to home
Start Free TrialLog in
Avatar of Lisp
Lisp

asked on

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?
Avatar of Lisp
Lisp

ASKER

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.
Avatar of Lisp

ASKER

Sorry, litteral string looks more like this...

exec MyStoredProcedure ''
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...
Avatar of Anthony Perkins
ddelhez,

>>If you are programming in ASP<<
The questioner is using JScript (not VBScript) on ASP.  ASP is a platform not a language.
ASKER CERTIFIED SOLUTION
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Lisp

ASKER

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.