Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox Dropdown List setting off change in buffered t
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01310572
Message ID:
01310578
Views:
8
Well, as luck would have it, I found some incomplete code I had added into which I did a replace into the Production.Distrib field without any conditions. So, I set an IF conditon so that if the value in that field had changed, then we'd do the REPLACE.
* .getDistributionCode()
* 04/14/2008 Cecil Champenois. Note: The below code was causing a change to the
* buffered Production Table. So, I added the additional condition of:
* "IF the Distrib field doesn't equal what it should", then we change it.

LOCAL lcMachine As Character
lcMachine=LEFT(ALLTRIM(Production.Machine),2)

DO CASE
  CASE ((lcMachine = "02")  OR (lcMachine = "03") OR ALLTRIM(Production.Machine)="2404")
    IF Production.Distrib <> "02"
      REPLACE Production.Distrib WITH "02"
    ENDIF
	
  CASE ((lcMachine = "11") OR (lcMachine = "14") OR  ALLTRIM(Production.Machine)="2406")
    IF Production.Distrib <> "14"
      REPLACE Production.distrib WITH "14"
    ENDIF
	
  CASE ((lcMachine = "09") OR (lcMachine = "26") OR (lcMachine = "28") ;
			OR (lcMachine = "29") OR (lcMachine = "37")OR (lcMachine = "38") ;
			OR (lcMachine = "39") OR (lcMachine = "25") OR (lcMachine = "27") ;
			OR ALLTRIM(Production.Machine)="2402")
    IF Production.Distrib <> "09"
      REPLACE Production.Distrib WITH "09"
    ENDIF
	
  OTHERWISE
    IF Production.Distrib <> "08"
      REPLACE Production.Distrib WITH "08"
    ENDIF		
ENDCASE
>>How do I stop my program from causing a change to the buffered table?
>>
>>I am already initializing the ControlSource in the INIT isntead of directly in the ComboBox DropDown List control, which I thought would resolve this problem. I have two such Combo Boxes and the first one does not set off a change.

>Do you mean it is making buffered changes, or committing changes in the buffer to disk?

>What other code do you have in the init?
Previous
Reply
Map
View

Click here to load this message in the networking platform