Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Character limit on string variables?

Posted on 2006-10-27
7
Medium Priority
?
3,494 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 

Author Comment

by:Lisp
ID: 17817890
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
ID: 17817910
Sorry, litteral string looks more like this...

exec MyStoredProcedure ''
0
 
LVL 5

Expert Comment

by:ddelhez
ID: 17817957
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 17820988
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 776 total points
ID: 17821007
>>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
ID: 18233961
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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

650 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