Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Event Order and misfires
Message
De
08/06/2010 06:55:47
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01467746
Message ID:
01467847
Vues:
57
>Hi Gang!
>
>I have an unusual problem. One of our customers has an error occuring recently that noone else has reported to us in the past.
>
>We have a PRG called SEOD.prg
>
>This is some of the code....
>
>
>PROCEDURE SEOD
>PARAMETER mPass_Reg
>
>*TMT Added declaration of ShellExecute to main code.
>DECLARE LONG ShellExecute in "shell32.dll" long hwnd, string lpszOp, ;
>             	string lpszFile, string lpszParams, ;
>                string lpszDir, long nShowCmd
>
>mTerm = IIF(TYPE('mPass_reg') = 'C',INT(VAL(mPass_reg)),mPass_reg)
>
>IF mTerm = 0
>	WAIT WINDOW ' Passed Register number is Zero '
>ENDIF
>
>SET TABLEVALIDATE TO 0
>SET STATUS OFF
>SET TALK OFF
>SET ECHO OFF
>SET HISTORY TO 0 
>SET HISTORY OFF
>SET SYSMENU OFF
>SET SAFETY OFF
>SET DELETED ON
>SET EXCL OFF
>SET DEVELOPMENT OFF
>SET DOHISTORY OFF
>SET EXACT ON
>SET PATH TO .\DBF
>SET ESCAPE OFF
>SET REPROCESS TO AUTO
>SET RESOURCE OFF
>SET HELP OFF
>SET CENTURY ON
>SET CPDIAL OFF
>
>DO SEOD_B WITH .F.
>
>RETURN
>
>PROCEDURE SEOD_B
>PARAMETER mOnLine_2, mP_Prt
>
>IF NOT FILE('ALLOW_SEOD.TXT')
>	IF USED('POSCONFG')
>		IF POSCONFG.RX1
>			******************************
>			* CHECK FOR OPEN POS
>			******************************
>			ON ERROR DO POSERR WITH ERROR()
>			SELECT INVENTRY
>			USE
>			SELECT 0
>			USE INVENTRY EXCLUSIVE
>
>			ON ERROR DO POSERROR WITH PROGRAM(), ERROR(), MESSAGE(), MESSAGE(1), LINENO()
>
>			IF NOT USED('INVENTRY')
>				=MESSBOX('A POS session is active on another computer.  Please exit the session and try again.')
>				SELECT 0
>				USE INVENTRY
>				RETURN
>			ENDIF
>
>			******************************
>			* CHECK FOR OPEN EZSIGN
>			******************************
>			ON ERROR DO POSERR WITH ERROR()
>			SELECT 0
>			USE \EZSIGN\CC_SALES EXCLUSIVE
>
>			ON ERROR DO POSERROR WITH PROGRAM(), ERROR(), MESSAGE(), MESSAGE(1), LINENO()
>
>			IF NOT USED('CC_SALES')
>				=MESSBOX('A Credit Card Processing session is active on another computer.  Please exit the session and try again.')
>				RETURN
>			ENDIF
>
>			SELECT CC_SALES
>			USE
>			
>			******************************
>			* CHECK FOR OPEN EZSIGN
>			******************************
>			ON ERROR DO POSERR WITH ERROR()
>			SELECT 0
>			USE \ORDER\DBF\REORDER EXCLUSIVE
>
>			ON ERROR DO POSERROR WITH PROGRAM(), ERROR(), MESSAGE(), MESSAGE(1), LINENO()
>
>			IF NOT USED('REORDER')
>				=MESSBOX('An Inventory Control session is active on another computer.  Please exit the session and try again.')
>				RETURN
>			ENDIF
>
>			SELECT REORDER
>			USE
>		ENDIF
>	ENDIF
>ENDIF
>	
>PUBLIC mExit_System
>mExit_System = .f.
>
>DO FORM frmseod
>
>IF USED('INVENTRY')
>	SELECT INVENTRY
>	USE
>	SELECT 0
>	USE INVENTRY
>ENDIF
>
>IF mExit_System
>	CLOSE DATABASES
>	CLOSE TABLES ALL
>	RELEASE ALL
>	QUIT
>ENDIF
>
>RETURN
>
>
>
>
>You can see when we calll this from our POPUPS menu, this is the command we give....
>
>
>ON SELECTION BAR 8 OF ShiftChang DO SEod_B WITH .T. IN SEOD
>
>
>
>So this calls SEOD_B in SEOD, passes over .T. to mONLINE_2, which is a PARAMETER.
>
>Now SEOD_B calls the from frmSEOD and here are the events for the form...
>
>INIT
>
>thisform.edtmessage.Value = ;
>'The Store End of Day should only be run after all cash reigsters' + CHR(13) + ;
>'have been reconciled. Please make sure all other cash registers' + CHR(13) + ;
>'are at the Windows Desktop, and the selected printer is Online' + CHR(13) + ;
>'with ample paper for the End of Day Reports.' + CHR(13)
>
>
>and the
>
>ACTIVATE
>
>IF NOT mOnline_2
>     Thisform.cmdexecute.Click
>ENDIF
>
>
>and Thisform.cmdexecute.click runs a bunch of other EOD programs....
>
>What is happening is the mONLINE_2 is giving a VARIABLE mONLINE_2 is not found when they run the SEOD.... from the frmSEOD.ACTIVATE event. Normally, this has never been a problem, and for the life of me, I can't find anywhere in the called programs that would release the mONLINE_2 paramter.
>
>Any ideas? Where to start looking I have overlooked?
>
>Thanks a bunch in advance!!

One occasional reason would be index corruption (and yes with corrupted indexes I have seen all sorts of unrelated error messages).
However instead of chasing it, I would stop using public and private variables and use only local variables. Pass the variables as parameters where needed and store to properties where it is needed form wise.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform