Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Double ampersands causes problem
Message
 
 
To
31/07/2007 08:30:38
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01244817
Message ID:
01244828
Views:
12
This message has been marked as a message which has helped to the initial question of the thread.
VFP treats '&&' as begining of inline comment regardless if it's inside string literal or not. IMO, it's a bug which not going to be be fixed.
You'll have to either split string literal or replace '&' with CHR(38)
UPPER(Password)="&" + "&ETC       " 
* or
UPPER(Password)= CHR(38) + CHR(38) + "ETC       " 
>My SQL was like this:
>
>
>SELECT Numero AS PrimaryKey,Session FROM Member WHERE UPPER(Username)="SOMETHING" AND UPPER(Password)="&&ETC       " ORDER BY 1
>
>
>But, this generates an error in VFP. The cause is the double ampersands. How can I adjust to support such a search in my SQL?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform