Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Appending data from free table
Message
From
01/04/2000 13:59:20
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Visual ProMatrix
Miscellaneous
Thread ID:
00353829
Message ID:
00353928
Views:
13
>>append ....
>>replace sp_id with recno() - m.nOldReccount + aMaxPK[1,1] ;
>> for sp_id = 0If you use SRACCGPK(0) you should go to data builder and update 0 with new last PK (that's sp_id of last appended record). If you use -1 then you don't need to do any update.
>>Cetin
>
>Thanks for trying to help David and Cetin,
>
>Cetin, I think I will go with the sraccgpk(-1) for the time being and the will also generate the pk's manually because some of the tables I'm appending are in the 200,000 records range, so an "append all from..." and then "replace all" seems much faster than looping through all the records (especially because since they're not normalized, I will have to go through this a couple of times for each of the tables.
>
>Alex


Alex,
Then also take faster route for setting SRACCGPK(-1). Instead of using data builder :

use SRACDD2
replace primary with "SRCACGPK(-1)" for primary = "SRCACGPK("

I might have forgotten the "primary" field name in DD2 so pls check first.
Also take a note of what you're affecting when you do manual replacing by checking table relations report. If tables do not somehow have childs yet than there might be no problem if you don't check (otherwise you're breakig referential integrity).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform