Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
INTO cursor Results to Screen
Message
 
 
To
12/12/2008 15:30:30
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01367070
Message ID:
01367228
Views:
4
>I have a SQL statement that consistently brings the results to the screen in a MM desktop app. I am using VFP 9 SP2, but have set engine behavior to 7. This is not in a view, just a method on a form.
>
>select distinct student.cid ;
>	from  iepoint!student ;
>	left outer join iepoint!facts on student.cid = facts.cStudentid  ;
>	left outer join iepoint!IEP3744_CONF on student.cid = IEP3744_CONF.cStudentid ;
>	left outer join iepoint!enrollment on student.cid = enrollment.cStudentid ;
>	where &lmAllStuRules into cursor crsStudentsWhoMatchRules nofilter
>
>Even with my [INTO] statement, it brings the results to a query window in the desktop, the fails when I attempt to reference the cursor 2 lines down.
>My macro variable evaluates to:
>
>( FACTS.CHOMESCHID='00Z46H')
>
>This code works correctly in a command window, and a similar statement w/o the macro works. Thoughts?
>TIA
>Amanda

Try
text to lcSQL TEXTMERGE NOSHOW
select distinct student.cid ;
	from  iepoint!student ;
	left outer join iepoint!facts on student.cid = facts.cStudentid  ;
	left outer join iepoint!IEP3744_CONF on student.cid = IEP3744_CONF.cStudentid ;
	left outer join iepoint!enrollment on student.cid = enrollment.cStudentid ;
	where <<lmAllStuRules>> into cursor crsStudentsWhoMatchRules nofilter
endtext
=messagebox(lcSQL) && to see what's going on
lcSQL = strtran(strtran(lcSQL, chr(13) + chr(10)," "),";" " ")
&lcSQL
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform