Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using option button in sql
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
MS SQL Server
Miscellaneous
Thread ID:
01311140
Message ID:
01311206
Views:
32
>How will add with my query.
>SELECT scode,CODE,descr,fname,descru,fnameu,lcode,sec,sex,rtel FROM student WHERE admtd=1;
>aND lcode>=thisform.lcodefm.value AND lcode<=thisform.lcodeto.value...
It is always better to not use thisform properties in the query.

Use separate variables outside of the query, e.g.

lcMinCode = thisform.lCodeFm.value
lcMaxCode = thisform.lcCodeFm.value

select ... where lCode between m.lcMinCode and m.lcMaxCode ...
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform