You have to remember that autoincremental fields are readonly.
What I do is something like this

select myview
scatter name oView blank fields except kw_id

with oView
    .field1 = ....   && you fill the object field properties with the 
values to be inserted in the corresponding field
    .field2 = ....
   etc
endwith
insert into myview from name oView

In this manner you can insert a new record with data into the view 
bypassing the autoincremental field

Rafael Copquin


El 15/07/2012 01:41 p.m., Gary Jeurink escribió:
> Since foxpro6.0 doesn't have an auto increment function. How do I insert a
> new record from a view that has a (primary key of kw_id). I am developing a
> database of program keywords. I just added the kw_id (int) field thinking it
> was necessary to make each record unique in order to update from views. I'm
> trying to learn C# from on-line tutorials. The field that filters the view
> is Lno (language no). C# is lno(12). I need to increment the highest record
> number and I am not sure how if it's hidden by the filter.
>
> Gary Jeurink
>
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
>    text/plain (text body -- kept)
>    text/html
> ---
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to