I meant a SINGLE constant. Imagine - you need to build query conditions in runtime and user typed all these characters. You make following:
MyConditions = MyConditions + ' AND [' + UserInput + ']'
...
SELECT ...
WHERE &MyConditions
Above will not work when UserInput contains all ', " and []. Need to use special string functions to split it apart as you mentioned. Why so complex? Why not just make it As I use now for SQL Server:
MyConditions = MyConditions + " AND '" + STRTRAN(UserInput,"'","''") + "'"
Above is MUCH more easy and I wery wondered why VFP don;t have such feature. :(
>>Why not make this by the same way as in other languages?
>> For example, in SQL Server I can use following:
>> MyString = 'Ed''s new book "How to confuse FoxPro"'
>>
>> In VFP I cannot make string constant that contains all ', " and [] characters :(
>
You can,
>use
lcMyString = [a string with ', " and ] + " [] is possible in VFP"
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.