Alex,
>specialty.dbf
> sp_id - integer - primary index generated by SRACCGPK(0)
> specialty - 60 chars
>
>Now I need to append to this table all the records in another .dbf (I'm creating a vfp app that will replace an existing alpha4 thing).
>
>The problem is that when I do an append from spclty, the primary key doesn't get generated. The sp_id for all the newly added records remain 0.
1) Does the sp_id get generated properly if you APPEND and fill in the other field manually? In other words, the ID-Generation function is working when you add a new record?
2) I assume you don't have the primary key INDEX tag on the table yet, since it should not allow you to APPEND multiple records with sp_id = 0 without giving a "Uniqueness of Index ID is Violated" error.
3) Does the table you are appending FROM have the same field sp_id? If so, the DEFAULT value in your new table will not fire on the APPEND FROM. Eliminate that field from the source table and the default function will fire.