Author: Gianni Turri
Posted: 2008-12-28 at 17:39:09
Here VFP9 SP1.
Take a look at
set AUTOINCERROR OFF
Using it you no more have the need to bother writing on the autoinc =
field, because it is read-only.
So you can continue to use your familiar gather istruction.
--=20
Gianni
On Sat, 27 Dec 2008 21:38:34 -0600, Matt Slay =
<foxstuff@jordanmachine.com> wrote:
>Need some guidance here... I am trying to copy the data in one record =20
>to a new record in the same table, then change the JobNo field to some =20
>new Job umber that I already have and validated as unique.
>
>The problem is that the table has an AutoInc field named "ipkey", and =20
>VFP does not want to let me do a GATHER for obvious reasons.
>
>So, I understand why it has this limitation because of autoinc, I just =20
>want to know how one normally works around it.
>
>Presently, to get around it, I am doing a REPLACE command on every =20
>field except ipkey, but I was hoping to use the SCATTER NAME / GATHER =20
>NAME method to avoid having to list out every field, and so I would =20
>have code that is independent of the field names.
>
>Here's what I wanted to use:
>
>Select 0
>Use Jobs order jobno
>... navigate to the desired record ..
>SCATTER NAME loCurrentJob
>Append Blank
>Gather NAME loCurrentJob
>replace JobNo with lcNewJobNo && a passed in value, already validated
>
>
>
>
>--- StripMime Report -- processed MIME parts ---
>multipart/alternative
> text/plain (text body -- kept)
> text/html
>---
>
[excessive quoting removed by server]