Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Local Views at Wits End
Message
De
09/06/2003 15:46:51
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00796970
Message ID:
00798087
Vues:
40
I hate it when that happens!

Were those two instances running on the same machine or 2 different machines? I've been getting two different computers to butt heads all along, so I compiled it into an executable, ran it twice and got one instance to fail.

As for the debugger, I don't think so. The client who originally ran into this issue as running an EXE with a production build. He was running on a pentium 2 white box running Win2000 with the data on a WIN2000 server. I'm running a 3ghz Dell with XP-Pro on a Novell 5.1 server. It dies in the same manner running VFP6(Sp5) or VPF8 (the one and ONLY sp-0).

If I've still got your attention, my new REPRO code is below.
local x, nNext

CLEAR
CLOSE DATA
CLOSE TABLES
SET EXCLUSIVE OFF
SET DELETED ON
SET CURSOR OFF

if NOT FILE("ShowBug.Dbc")

   CREATE Database SHOWBUG
   CREATE TABLE Test (MyID I, NextID I)	
   APPEND BLANK	
   REPLACE MyID WITH 1, NextID WITH 1
   USE
	
CREATE SQL VIEW VTest AS SELECT * FROM Test WHERE MyID=1
	DBSetProp( "VTest.MyID"   , "Field", "KeyField"   , .T. )
	DBSetProp( "VTest.MyID"   , "Field", "Updatable"  , .F. )
	DBSetProp( "VTest.NextID" , "Field", "Updatable"  , .T. )
	DBSetProp( "VTest"	     , "View" , "SendUpdates", .T. )
	DBSetProp( "VTest"        , "View" , "WhereType"  , 3 )

	CLOSE DATA

endif

OPEN DATABASE ShowBug
USE VTest SHARED

@2,2 SAY "Assign:"
@3,2 SAY "Source:"
@4,2 SAY "  View:"

for x = 1 to 100
   INKEY(.1)
   nNext = SqlNextID()	
   if nNext < 0
      =MessageBox("It's Dead!")
      EXIT
   else
      @2,10 SAY nNext
   endif
next

CLOSE DATA
CLOSE TABLES
SET CURSOR ON

return

********************************************************************************************************************

Function SqlNextID( cAlias )

local oldarea, x
x = 0

REQUERY()

do while .T.

	nRet = NextID
	REPLACE NextID WITH NextID + 1

	if TableUpdate( .T., .F. )
		EXIT
	else
		if x > 100
			TableRevert( .T. )		
			nRet = -1
		   EXIT
		endif
		@3,10 SAY Test.NextID
		@4,10 SAY VTest.NextID		
		x = x + 1
		TableRevert( .T. )
		REQUERY()
	endif
	
enddo	

return (nRet)
Thanks again for hanging in there with me.
~Erik Folley
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform