Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Appending data from free table
Message
From
01/04/2000 01:48:46
 
General information
Forum:
Visual FoxPro
Category:
Visual ProMatrix
Miscellaneous
Thread ID:
00353829
Message ID:
00353858
Views:
16
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.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform