how long can a string be ? 
Author Message
 how long can a string be ?

Hi,

I get an error String to long !
the length is 268.
is there some kind of a workaround ?

thanks in advance

--
Christophe
Belgium

?,?o`o?,??,?o`o?,??,?o`o?,??,?o`o?
,??,?o



Tue, 21 Oct 2003 20:31:42 GMT  
 how long can a string be ?
Christophe,
A string constant can only be 255 characters, but a string can be up to
16,777,184. Break your contant string up into multiple pieces. e.g.

xx = "12345 ....... xyz" && too long
xx = "12345..." + "... xyz" && good

Rick


Quote:
> Hi,

> I get an error String to long !
> the length is 268.
> is there some kind of a workaround ?

> thanks in advance

> --
> Christophe
> Belgium

> ?,?o`o?,??,?o`o?,??,?o`o?,??,?o`o?
> ,??,?o



Tue, 21 Oct 2003 20:55:54 GMT  
 how long can a string be ?
another way is do space it out. like this.
mystring=space(256 * 3000)
? len(mystring)
should show 768000
Bob Lee


Quote:
> Hi,

> I get an error String to long !
> the length is 268.
> is there some kind of a workaround ?

> thanks in advance

> --
> Christophe
> Belgium

> ?,?o`o?,??,?o`o?,??,?o`o?,??,?o`o?
> ,??,?o



Tue, 21 Oct 2003 22:19:17 GMT  
 how long can a string be ?

Use a property of a class, form...  Properties can contain much more text.

*************************************************************
ovars.CreateObject([cTest])

ovars.ctest = REPLICATE([a],16777184
ovars.itest = len(ovars.ctest)

MessageBox([ Number of characters is:]+TRANSFORM(ovars.itest)+[. ])

RELEASE ovars

Return

DEFINE CLASS test AS session

ctest = []
itest = 0

EndDefine

****************************************************************************
****

***************************

Fred


Quote:
> Hi,

> I get an error String to long !
> the length is 268.
> is there some kind of a workaround ?

> thanks in advance

> --
> Christophe
> Belgium

> ?,?o`o?,??,?o`o?,??,?o`o?,??,?o`o?
> ,??,?o



Tue, 21 Oct 2003 22:30:19 GMT  
 how long can a string be ?
hi all,

thanks so far,
but in addition to this how can I use it as a Run
statement ?
I think that the Run statement is to long ?
is that possible ?

for example :
lSendmail="run /N7 "+chr(34)+"blat.exe"+chr(34)+;
  " "+chr(34)+"c:\sendbody.txt"+chr(34)+;
  " -subject "+chr(34)+onderwerp_+chr(34)+;
  " -to "+aan_+;
  " -server "+alltrim(smtpserver_)+;
  " -f "+alltrim(emailadres_)+;
  " -q"
  " -attach
"c:\mycurrentdirectory\testfiles\data\test.txt"

&lSendmail

assigning lSendmail is no problem but
the "Run blat.exe" from &lSendmail isn't executed
correctly !

any advice is welcom.
--
Christophe
Belgium

?,?o`o?,??,?o`o?,??,?o`o?,??,?o`o?
,??,?o



Quote:
> Hi,

> I get an error String to long !
> the length is 268.
> is there some kind of a workaround ?

> thanks in advance

> --
> Christophe
> Belgium

?,?o`o?,??,?o`o?,??,?o`o?,??,?o`o?
Quote:
> ,??,?o



Wed, 22 Oct 2003 00:44:39 GMT  
 how long can a string be ?
in the mean while,

I've found an answer , pfffww ....

I store the whole bunch in a file with an
extension .bat
and then execute a Run "myfile.bat"

I don't know if this is the best solution but it
works great for me

thanks anyway

--
Christophe
Belgium

?,?o`o?,??,?o`o?,??,?o`o?,??,?o`o?
,??,?o



Quote:
> hi all,

> thanks so far,
> but in addition to this how can I use it as a
Run
> statement ?
> I think that the Run statement is to long ?
> is that possible ?

> for example :
> lSendmail="run /N7

"+chr(34)+"blat.exe"+chr(34)+;
Quote:
>   " "+chr(34)+"c:\sendbody.txt"+chr(34)+;
>   " -subject "+chr(34)+onderwerp_+chr(34)+;
>   " -to "+aan_+;
>   " -server "+alltrim(smtpserver_)+;
>   " -f "+alltrim(emailadres_)+;
>   " -q"
>   " -attach
> "c:\mycurrentdirectory\testfiles\data\test.txt"

> &lSendmail

> assigning lSendmail is no problem but
> the "Run blat.exe" from &lSendmail isn't
executed
> correctly !

> any advice is welcom.
> --
> Christophe
> Belgium

?,?o`o?,??,?o`o?,??,?o`o?,??,?o`o?

- Show quoted text -

Quote:
> ,??,?o


in

> > Hi,

> > I get an error String to long !
> > the length is 268.
> > is there some kind of a workaround ?

> > thanks in advance

> > --
> > Christophe
> > Belgium

?,?o`o?,??,?o`o?,??,?o`o?,??,?o`o?

- Show quoted text -

Quote:
> > ,??,?o



Wed, 22 Oct 2003 01:39:39 GMT  
 how long can a string be ?
Sounds like you're bumping into a &macro problem more than a string length
problem.

&macro expansion terminates on a "." (and it's documented, just don't ask me
where!) so anything containing a period (like a filename) may be screwing
you up.

Glad you got a workaround!

Dan


Quote:
> in the mean while,

> I've found an answer , pfffww ....

> I store the whole bunch in a file with an
> extension .bat
> and then execute a Run "myfile.bat"

> I don't know if this is the best solution but it
> works great for me

> thanks anyway



Wed, 22 Oct 2003 06:49:41 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Long, long character string

2. Help: String to Long to fit!

3. STRTRAN() to fix ASCII: Error 1903: String is too long to fit

4. String too long in PICTURE "@M"

5. ?? long strings?

6. string to long error

7. Beware the String Too Long To Fit

8. Long string problems

9. String for Pass Through command too long

10. Help Anyone (who has experience processing Long Ascii Strings)

11. Long macro command string

12. String is too long to fit

 

 
Powered by phpBB® Forum Software