Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PhDbase III - I Can't Get No - TableUpdate
Message
 
To
19/06/2001 13:33:57
Keith Jones
The It Studio Limited
Brentwood, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00520392
Message ID:
00521252
Views:
19
Keith,

I was inspired to fix my PhD problem today. It seems the PhD manual index control doesn't seem to work well within a transaction either. So, if you wrap your tableupdate()'s within a transaction do the following:

1. For each new or modified record found by GETNEXTMODIFIED(), record the primary key to an array and issue a PHD('ixDel') [non-new records only] in your non-buffered alias of your PhD-indexed table.

2. Start your transaction, TableUpdate() everything, end transaction or rollback.

3. Skip through your array and issue a phd('ixAdd') for each record in your non-buffered alias. You need to do this even if you rolled back the transaction since you deleted the index entry regardless.

the PHD('ixAdd') and PHD('ixDel') is supposed to be slower than the PHD('ixold') and PHD('ixnew'), but you can't change the record pointer between the later two. So, if you are updating multiple records in the TableUpdate(), you'll need to issue the phd('ixDel') multiple times before you can issues the PHD('ixAdd')s .

HTH


>Thanks Dan.
>
>I found their E-Mail address for tech support.
>It is jkorenthal@book.com. Hoever, after two
>days still no reply.
>
>Thank you for you help.
>
>Now I know it is not me, I'll work around the problem.
>
>Keith
Previous
Reply
Map
View

Click here to load this message in the networking platform