Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Command line length
Message
 
 
To
20/08/2011 10:19:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01521401
Message ID:
01521406
Views:
60
If it's longer than 255 characters you HAVE to break it up into separate variables. I just ran into that this week.

I agree with you about putting SQL commands inside a TEXT/ENDTEXT block. Much more readable that way.

>Moises,
>yes, the maximum length of a string literal is 255. See Visual FoxPro System Capacities in Help.
>Anyway, the preferred way to write long text into a variable, is to use Text-Endtext which also makes it much more readable
>Text to cSQL Noshow Pretext 1+2+4+8
>   INSERT INTO correios 
>   (nome,email,endereco,numero,bairro,cidade,CEP,
>   estado,telefone,nome_ent,email_ent,numero_ent,
>   bairro_ent,cidade_ent,cep_ent,estado_ent,telefone_ent)
>   VALUES (?cl, ?e_mail1, ?rua, ?no,?bairro,?cidade,?cep,?est,)
>Endtext
>Notice that you can break up the line if you want.
>
>>Hi
>>
>>Looks like there is the maxium lenght, even using "; "
>>
>>Beyond this limit, there is error message.
>>But I need to insert many values.
>>
>>Is there lenghs limits in VFP and a way to overcome the problem below ?
>>
>>
>>cSQL = 'INSERT INTO correios (nome,email,endereco,numero,bairro,cidade,CEP,estado,telefone,nome_ent,email_ent,numero_ent,bairro_ent,cidade_ent,cep_ent,estado_ent,telefone_ent);
>>VALUES (?cl, ?e_mail1, ?rua, ?no,?bairro,?cidade,?cep,?est,)'
>>
>>
>>(looks like limit is valid for the sum of both lines)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform