Re: Programmitically add default values by Sietse
Sietse
Thu Jun 24 01:22:24 CDT 2004
Hi Gene,
As I read it, you've already added the new record to the customer table, and
want to set the primary key?
Then use the REPLACE Command:
REPLACE PKField with NewPKValue
If tthe new customer record isn't addet yet, you can consider the insert
command:
INSERT INTO custtable (PKField) VALUES (NewPKValue)
The reason why you're using the EVAL() function puzzles me.. What value is
in the smsydd2.Default field for the current record?
Sietse Wijnker
"Gene Conrad" <gjconrad@ronan.net> wrote in message
news:40da371b_1@newsfeed.slurp.net...
> Hi.
>
> VPM 6.0b, VFP 6
>
> I am trying to add a new record to a customer list that uses s<pre>cgpk to
> generate the new primary key. I have opened the s<pre>DD2 table, located
the
> record for the table and PK field, then do a:
>
> store smsydd2.default to lcRunIt
> eval(RunIt)
>
> The error I get is looking for a DD2DEFAULT table. Can someone advise me
on
> this table?
>
> Thanks,
>
> Gene Conrad
>
>