Re: Embedded SQL and comments by Anders
Anders
Sat Apr 05 05:43:00 CDT 2008
VFP doesn't support -- for comments anywhere. If you're sending off the sql
as a string to some other backend, I can't say; you'd better test it. VFP
does parse even this sort of string placed in a SQLEXEC() function and turns
embedded ?varable or ?vfpfunction(), and ¯o variables, into literal
values, before passing it on to the ODBC layer.
-Anders
"PSULionRP" <PSULionRP@discussions.microsoft.com> wrote in message
news:4E5204F2-F59B-476B-AEB6-F6BE4AAA19FD@microsoft.com...
> Straight SQL. I just wasn't sure if Visual FoxPro would like the "--"
> comment
> parsers or not.
>
> "swdev2" wrote:
>
>> I don't take that approach.
>> I'll copy the entire sql block to a new area/line, comment out the old
>> sql
>> block in it's entirety, also put date/time stamp in the comments, along
>> with
>> yer initials, cause -
>> USUALLY
>> a sql block code change occurs,
>> IN A PRODUCTION SYSTEM
>> because of BUSINESS RULE CHANGE.
>>
>> You'll want to document that change, everwhere you are, in case the phb's
>> CHANGE THEIR MINDS AGAIN.
>>
>> If you are thinking about using "--", then is this STRAIGHT SQL for VFP,
>> or SQL to be PASSED into a backend server using odbc ? (My thought is
>> SPT,
>> btw)
>>
>> Regards [Bill]
>>
>> --
>> ===================
>> William Sanders / EFG VFP / mySql / MS-SQL
>> www.efgroup.net/vfpwebhosting
>> www.terrafox.net www.viasqlserver.net
>>
>> "PSULionRP" <PSULionRP@discussions.microsoft.com> wrote in message
>> news:10AC7648-6BDB-485A-B275-A16823985610@microsoft.com...
>> > I am enhancing a Visual FoxPro batch program with a .prg extension. I
>> > am
>> > specifically changing the SQL so I'd like to comment within the SQL.
>> > That
>> > being said, should my comment be prefaced with "--" designating SQL
>> comments,
>> > or "*" designating FoxPro comments???
>> >
>> > Thanks in advance for your help.
>> >
>> > PSULionRP
>>
>>
>>