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

>I have recently purchased Korenthal Associates PhDbase III.
>I have a support question, but I am unable to contact Korenthal Associates
>by e-mail, telephone or fax (using that information supplied in the users manual).

Yes, they've pretty much dropped off the face of the earth. I think you can still find their number in NY, NY, although I'm not sure how helpful they'll be.


>My query-:
>If I insert a record into a table with a PhdBase index on a text field, all is fine. If however,
>I try to edit a record, during the transaction processing, the data some how reverts to
>original value at the TABLEUPDATE(1, .F., cTableName). I was not sure if the PhD ‘Flush’
>command was required, which I have tried that in several places, but to no avail.

PhDBase doesn't work with buffering. Attempting it can apparently screw up the PhD index as well as your regualr indexes and possibly the update itself. Sucks, huh? You'll notice the time stamp on the Phd file changing during a buffered edit.

You can, however turn off the automatic index updating and manually update the index. Open the PhD indexed table again without buffering. Tabelupdate() the buffered alias, seek that record in the un-buffered alias of the same table and issue the PhD manual index update command. The only catch is that you have to Tableupdate on record at time using GETNEXTMODIFIED(). The various command are in the documentation.

I am still working on fixing a bug related to this. I'm C5-ing when I attempt to manually update the PhD index after adding a record.
lnrecordnumber=getnextmodified(0,'MEMBERS')
lccuralias=alias()
DO WHILE lnrecordnumber!=0 and lupdateworked
	IF lnrecordnumber>0
		seek members.relrec in phdmembers
		if alias()!='PHDMEMBERS'
			select phdmembers
		endif
		=phd("ixOld")
	ENDIF
	lupdateworked=TableUpdate(0,.f.,'MEMBERS')
	IF lupdateworked
		if alias()!='PHDMEMBERS'
			select phdmembers
		endif
		IF lnrecordnumber>0
			=phd("ixNew")
		ELSE
			seek members.relrec in phdmembers
			=phd("ixAdd")		
		ENDIF
		lnrecordnumber=getnextmodified(lnrecordnumber,'MEMBERS')
	ENDIF	
enddo
select (lccuralias)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform