For Programmers: Free Programming Magazines  


Home > Archive > ASP > July 2004 > maximum characters for string data type









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author maximum characters for string data type
JT

2004-07-27, 3:55 pm

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


Mark Schupp

2004-07-27, 3:55 pm

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.

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com


"JT" <jt@nospam.com> wrote in message
news:O4Kqmq$cEHA.2752@TK2MSFTNGP12.phx.gbl...
> 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
>
>



Aaron [SQL Server MVP]

2004-07-27, 3:55 pm

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?

--
http://www.aspfaq.com/
(Reverse address to reply.)




"JT" <jt@nospam.com> wrote in message
news:O4Kqmq$cEHA.2752@TK2MSFTNGP12.phx.gbl...
> 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
>
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com