Re: Embedded SQL and comments



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 &macro variables, into literal
values, before passing it on to the ODBC layer.

-Anders

"PSULionRP" <PSULionRP@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4E5204F2-F59B-476B-AEB6-F6BE4AAA19FD@xxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:10AC7648-6BDB-485A-B275-A16823985610@xxxxxxxxxxxxxxxx
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





.



Relevant Pages

  • Re: Problems with Delete Command
    ... The SQL could get fairly messy if you need to construct it in code, ... ContactID, and WebComID, and create your on-the-fly SQL on that saved query, ... to find the list of ContactIDs from the junction table, ... This is a style/readability thing: if you are going to use string ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Exact match using INLIST()
    ... VFP InList() function can be a little confusing ... InList respects the Set Ansi setting ... To avoid this confusion (and to make your SQL ... It's not that the statement behaves differently, but that string ...
    (microsoft.public.fox.programmer.exchange)
  • Re: sqlexec() with multiple SQL commands
    ... If you look close at the original code you'll see with that line break it ... would be a VFP line continuation character. ... >> string would be different. ... >> and I should not expect to see the difference but that SQL Server will? ...
    (microsoft.public.fox.vfp.queries-sql)
  • Re: Need help with Code Please!!!
    ... posted in response to my last post was some SQL, but this is not the SQL that ... the actual string that gets built at the end of the SQ1 build process. ... The message says Syntax error in query expression ... Dim rs As Recordset 'object ref to qryCompany\USFNumber ...
    (microsoft.public.access.formscoding)
  • RE: Web Part and Access database
    ... I dont know if it is possible to connect to access,but you can download SQL ... Server Error in '/Webparts' Application. ... The connection string specifies a local Sql Server Express instance ... String user, String password, Boolean trusted, String connectionString) ...
    (microsoft.public.sharepoint.portalserver.development)