maximum characters for string data type

J

JT

i don't know why i can't find this anywhere but -

what is the maximum number of characters that a string variable can hold - i
initially thought it was 256, but after some testing it seems that it can
hold much more than that..

tia
 
M

Mark Schupp

vbScript uses variants for all variables. For strings a variant points to a
Win32 BSTR which can have 2*31 characters.

I don't know about JScript but I presume it also uses variants and would
have similar behavior.
 
A

Aaron [SQL Server MVP]

Let us know if you reach the limit. You will probably experience server
slowdown / memory chaos long before you have a string big enough to hit an
actual limit. You will probably get a response buffer limit exceeded error,
maybe?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,159
Messages
2,570,879
Members
47,416
Latest member
LionelQ387

Latest Threads

Top