Author: Gil Hale
Posted: 2008-06-26 07:37:07 Link
Good Day, All!
I am using some very old VFP3 code as the underpinnings for a new project
(very stable code, still in use daily all around the country), and came
across a command using a syntax I can't find in either the VFP9 help file or
VFP7 Hacker's Guide electronic documentation. It looks a bit clunky
compared to how I implement the command in my current code, but I do believe
it was set up the way shown below as I was writing against an ORACLE
read/write cursor back then (now a VFP table) and was having problems with
the ODBC driver when it came to trying to record data into the target cursor
without doing some strange shuffling around. Anyway, here is what it looks
like:
.
.
.
SELECT xiSORCursor
mThisRecord = RECNO('xiSORCursor')
REPLACE cVIN with mVIN, ;
cAdvisor WITH mAdvisor, ;
cSORNum with mSORNum, ;
cCancelDat with mCancelDat, ;
cCustNum with mCustNum, ;
RECORD mThisRecord
.
.
.
The syntax question involves my use of the "RECORD mThisRecord" part of the
REPLACE command. I cant find any reference to tacking that onto the REPLACE
command, yet it still compiles in VFP9 and runs fine. So, this is more of a
"curiosity thing" than a "it is broken, now what?" matter. I do not want to
remove that unknown part of the code, as it is working fine and had to have
been put there by myself long ago for a pretty good reason.
Thanks for the anticipated shedding of light!
Regards,
Gil
Gilbert M. Hale
New Freedom Data Resources, Inc.
Pittsford, NY
585-359-8085 - Office (Rolls To Cellular)
585-202-4341 - Cellular/VoiceMail
gil@gilhale.com
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
Author: Mike yearwood
Posted: 2008-06-26 08:48:52 Link
> Message: 7
> Date: Thu, 26 Jun 2008 07:37:07 -0400
> From: "Gil Hale" <gil@gilhale.com>
> Subject: Undocumented syntax, works great, but it is driving me nuts.
> Where did it come from? Why can't I find reference to it?
> To: profoxtech@leafe.com
> Message-ID: <NDBBLHFMCDKPEGPOIIAPOEJGAAAB.gil@gilhale.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Good Day, All!
>
> I am using some very old VFP3 code as the underpinnings for a new project
> (very stable code, still in use daily all around the country), and came
> across a command using a syntax I can't find in either the VFP9 help file or
> VFP7 Hacker's Guide electronic documentation. It looks a bit clunky
> compared to how I implement the command in my current code, but I do believe
> it was set up the way shown below as I was writing against an ORACLE
> read/write cursor back then (now a VFP table) and was having problems with
> the ODBC driver when it came to trying to record data into the target cursor
> without doing some strange shuffling around. Anyway, here is what it looks
> like:
>
> .
> .
> .
>
> SELECT xiSORCursor
> mThisRecord = RECNO('xiSORCursor')
>
> REPLACE cVIN with mVIN, ;
> cAdvisor WITH mAdvisor, ;
> cSORNum with mSORNum, ;
> cCancelDat with mCancelDat, ;
> cCustNum with mCustNum, ;
> RECORD mThisRecord
> .
> .
> .
>
> The syntax question involves my use of the "RECORD mThisRecord" part of the
> REPLACE command. I cant find any reference to tacking that onto the REPLACE
> command, yet it still compiles in VFP9 and runs fine. So, this is more of a
> "curiosity thing" than a "it is broken, now what?" matter. I do not want to
> remove that unknown part of the code, as it is working fine and had to have
> been put there by myself long ago for a pretty good reason.
>
> Thanks for the anticipated shedding of light!
>
>
> Regards,
>
> Gil
>
>
> Gilbert M. Hale
> New Freedom Data Resources, Inc.
> Pittsford, NY
> 585-359-8085 - Office (Rolls To Cellular)
> 585-202-4341 - Cellular/VoiceMail
> gil@gilhale.com
Hi Gil
In a trigger, that syntax will attempt to move the record pointer,
which will fire the trigger, etc. etc. :) Since you are already on the
record you are trying to update, your best approach is to drop the
RECORD clause.
Mike Yearwood
Author: MB Software Solutions General Account
Posted: 2008-06-26 09:43:31 Link
Gil Hale wrote:
> Good Day, All!
>
> I am using some very old VFP3 code as the underpinnings for a new project
> (very stable code, still in use daily all around the country), and came
> across a command using a syntax I can't find in either the VFP9 help file or
> VFP7 Hacker's Guide electronic documentation. It looks a bit clunky
> compared to how I implement the command in my current code, but I do believe
> it was set up the way shown below as I was writing against an ORACLE
> read/write cursor back then (now a VFP table) and was having problems with
> the ODBC driver when it came to trying to record data into the target cursor
> without doing some strange shuffling around. Anyway, here is what it looks
> like:
>
> .
> .
> .
>
> SELECT xiSORCursor
> mThisRecord = RECNO('xiSORCursor')
>
> REPLACE cVIN with mVIN, ;
> cAdvisor WITH mAdvisor, ;
> cSORNum with mSORNum, ;
> cCancelDat with mCancelDat, ;
> cCustNum with mCustNum, ;
> RECORD mThisRecord
> .
> .
> .
>
> The syntax question involves my use of the "RECORD mThisRecord" part of the
> REPLACE command. I cant find any reference to tacking that onto the REPLACE
> command, yet it still compiles in VFP9 and runs fine. So, this is more of a
> "curiosity thing" than a "it is broken, now what?" matter. I do not want to
> remove that unknown part of the code, as it is working fine and had to have
> been put there by myself long ago for a pretty good reason.
>
> Thanks for the anticipated shedding of light!
So what's it do? Is it like a SCATTER?
Author: Kenneth Kixmoeller/fh
Posted: 2008-06-26 11:42:22 Link
On Jun 26, 2008, at 6:37 AM, Gil Hale wrote:
> cCustNum with mCustNum, ;
> RECORD mThisRecord
But there shouldn't be a comma after mCustNum -- I would think that
would break the scope statement.
Ken
Author: Lew
Posted: 2008-06-28 09:56:48 Link
RECORD is documented as one of the scope clauses & afaik always has been.
-----Original Message-----
From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On Behalf Of Gil Hale
Sent: Thursday, June 26, 2008 7:37 AM
To: profoxtech@leafe.com
Subject: Undocumented syntax, works great,but it is driving me nuts. Where did it come from? Why can't I find
reference to it?
Good Day, All!
I am using some very old VFP3 code as the underpinnings for a new project
(very stable code, still in use daily all around the country), and came
across a command using a syntax I can't find in either the VFP9 help file or
VFP7 Hacker's Guide electronic documentation. It looks a bit clunky
compared to how I implement the command in my current code, but I do believe
it was set up the way shown below as I was writing against an ORACLE
read/write cursor back then (now a VFP table) and was having problems with
the ODBC driver when it came to trying to record data into the target cursor
without doing some strange shuffling around. Anyway, here is what it looks
like:
.
.
.
SELECT xiSORCursor
mThisRecord = RECNO('xiSORCursor')
REPLACE cVIN with mVIN, ;
cAdvisor WITH mAdvisor, ;
cSORNum with mSORNum, ;
cCancelDat with mCancelDat, ;
cCustNum with mCustNum, ;
RECORD mThisRecord
.
.
.
The syntax question involves my use of the "RECORD mThisRecord" part of the
REPLACE command. I cant find any reference to tacking that onto the REPLACE
command, yet it still compiles in VFP9 and runs fine. So, this is more of a
"curiosity thing" than a "it is broken, now what?" matter. I do not want to
remove that unknown part of the code, as it is working fine and had to have
been put there by myself long ago for a pretty good reason.
Thanks for the anticipated shedding of light!
Regards,
Gil
Gilbert M. Hale
New Freedom Data Resources, Inc.
Pittsford, NY
585-359-8085 - Office (Rolls To Cellular)
585-202-4341 - Cellular/VoiceMail
gil@gilhale.com
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
[excessive quoting removed by server]
Author: evital
Posted: 2008-06-28 10:05:58 Link
Yep it is there.
Lew wrote:
> RECORD is documented as one of the scope clauses & afaik always has been.
>
> -----Original Message-----
> From: profox-bounces@leafe.com [mailto:profox-bounces@leafe.com] On Behalf Of Gil Hale
> Sent: Thursday, June 26, 2008 7:37 AM
> To: profoxtech@leafe.com
> Subject: Undocumented syntax, works great,but it is driving me nuts. Where did it come from? Why can't I find
> reference to it?
>
> Good Day, All!
>
> I am using some very old VFP3 code as the underpinnings for a new project
> (very stable code, still in use daily all around the country), and came
> across a command using a syntax I can't find in either the VFP9 help file or
> VFP7 Hacker's Guide electronic documentation. It looks a bit clunky
> compared to how I implement the command in my current code, but I do believe
> it was set up the way shown below as I was writing against an ORACLE
> read/write cursor back then (now a VFP table) and was having problems with
> the ODBC driver when it came to trying to record data into the target cursor
> without doing some strange shuffling around. Anyway, here is what it looks
> like:
>
> .
> .
> .
>
> SELECT xiSORCursor
> mThisRecord = RECNO('xiSORCursor')
>
> REPLACE cVIN with mVIN, ;
> cAdvisor WITH mAdvisor, ;
> cSORNum with mSORNum, ;
> cCancelDat with mCancelDat, ;
> cCustNum with mCustNum, ;
> RECORD mThisRecord
> .
> .
> .
>
> The syntax question involves my use of the "RECORD mThisRecord" part of the
> REPLACE command. I cant find any reference to tacking that onto the REPLACE
> command, yet it still compiles in VFP9 and runs fine. So, this is more of a
> "curiosity thing" than a "it is broken, now what?" matter. I do not want to
> remove that unknown part of the code, as it is working fine and had to have
> been put there by myself long ago for a pretty good reason.
>
> Thanks for the anticipated shedding of light!
>
>
> Regards,
>
> Gil
>
>
> Gilbert M. Hale
> New Freedom Data Resources, Inc.
> Pittsford, NY
> 585-359-8085 - Office (Rolls To Cellular)
> 585-202-4341 - Cellular/VoiceMail
> gil@gilhale.com
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
> text/plain (text body -- kept)
> text/html
> ---
>
[excessive quoting removed by server]