> I think you can even sprinkle comments in the > content of the string that goes through EXECSCRIPT() and it won't hurt > things.
I sure hope so, because I have been doing that for years now <g>... Imagine that - a fully commented code block to explain all the > things the code is doing. SQL syntax is truly a step back to the > dark ages > in that regard. It really is a great way to handle off-the-wall processing with tremendous flexibility. I am pretty sure it compiles on-the-fly, but leaves no .fxp files laying around. Very clean, and allows for simple changes in a live environment (use buffering!). One thing I have done when making more than a few small tweaks with memo code is copy the code into a program form, so I get all the syntax highlighting, parenthetical nesting notifications, intellitype, etc. Then once I am certain I have no syntax errors/typos I paste the code back into the memo field and let 'er rip. If I want to preserve the original code I simply use a program form to comment out the old code and annotate accordingly, then put the commented & annotated code back into the memo field.. Okay, I am done beating this horse, dead or not. It is cool, it rocks, I love it. Gil > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Charlie Coleman > Sent: Thursday, May 01, 2008 1:37 PM > To: [EMAIL PROTECTED] > Subject: Re: Simple two step query possible in one? > > > At 04:37 PM 5/1/2008 +0000, Mark Stanton wrote: > >Whilst the ExecScript thang is a great idea, my client's batch simply > >doesn't work like that at the moment 8-( > > I'm sorry, I don't understand the above comment. Code structure, content, > etc, is not dependent on a "batch" run or a "real time" run. Of course, > some code is more effective under one environment or another, but that > doesn't have anything to do with the discussion. > > You wanted a certain result set. You have a given database > design. You can > see the easy solution by using perhaps 2 separate SQL statements. We've > explained to you a couple options that would easily accommodate multiple > SQL statements. > > Are you saying you do not control how the memo field is interpreted? In > other words, are YOU writing the code that reads the memo field that > contains the SQL statement(s). If you are, then simply change the call to > use EXECSCRIPT() instead of what you're doing now (which is... parsing? > macro substitution?). If all the other memo fields are currently > simple SQL > statements, the EXECSCRIPT() should flow them through with no problem. > > If you're not in control of the code that 'reads' the memo field, I'd > suggest you work out an additional interface spec with whomever is. For > example, the code they use now may grab the SQL String and > "parse" out the > field list, and "parse" out the WHERE clause and "parse" out the FROM... > JOIN... etc. And then they rebuild the whole thing again into a SQL > statement (I've actually done something similar back in VFP 6 > days). Well, > simply tell them if see EXECSCRIPT() in the first characters of > the string, > strip out "EXECSCRIPT()" and then take the rest of the string and put it > inside an EXECSCRIPT() call. > > The thing is, once you get the use of EXECSCRIPT() in place, you are > assured to be able to EASILY handle ANY monstrously complex data > processing > need in the future (as long as the database content can support it). And, > on top of that, the complex stuff you have to do will take much > less effort > to maintain in the future. I think you can even sprinkle comments in the > content of the string that goes through EXECSCRIPT() and it won't hurt > things. Imagine that - a fully commented code block to explain all the > things the code is doing. SQL syntax is truly a step back to the > dark ages > in that regard. > > -Charlie > > > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

