Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
V6s5 - REQUERY() a view for a given SELECT no. of recs
Message
 
À
21/04/2004 04:59:29
Dorin Vasilescu
ALL Trans Romania
Arad, Roumanie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00895276
Message ID:
00896786
Vues:
29
Hi Dorin

>So, with SET DELETED ON...
>
>You have a remote viev
>Delete one record from remote view
>Update with TABLEUPDATE()
>SELECT ... from remote view alias
>
>The deleted record appear in query?
>
>I've done some tests and the deleted record wasn't there

I have a way to find the most typical of problem, ahm!! <g>

I put in a browse on the remote view in this buildtree() method that houses the SELECT statement and yet the deleted record shows in the browse window.

My framework CodeBook as Transactions, will that affect results?

Here below is the Delete() function from CodeBook as it already exists by the original coder
PROCEDURE delete
LOCAL lnRetVal, laError[AERROR_NUMCOLUMNS], lnOldArea
lnRetVal = FILE_OK
lnOldArea = SELECT(0)

*-- Delete the current record.
DELETE

*-- If we are using TABLE buffering, then we assume that the user will
*-- have the ability to REVERT all deleted records. Therefore, do not
*-- issue a TABLEUPDATE().
IF INLIST(CURSORGETPROP("BUFFERING"), DB_BUFOPTRECORD, DB_BUFLOCKRECORD) ;
		AND !TABLEUPDATE()
	SELECT (lnOldArea)

	*-- Undo the changes made to the buffer ... the deletion
	TABLEREVERT()

	*-- Return error number of what went wrong
	AERROR(laError)
	lnRetVal = laError[AERROR_ERROR]

ELSE
	*-- If you are using record buffering or no buffering
	IF !EOF()
		*-- Get off of the deleted record
		SKIP

		IF EOF()
			*-- If the record you deleted was the last record,
			*-- reposition yourself on the new last record.
			SKIP -1

			IF !BOF()
				*-- Return that the operation was successful.
				lnRetVal = FILE_OK
			ELSE
				*-- If you deleted the last record, indicate so.
				lnRetVal = FILE_NORECORDS
			ENDIF
		ENDIF
	ENDIF
ENDIF

SELECT (lnOldArea)

RETURN lnRetVal
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform