| **Navigation:**  [[abc library reference.htm|ABC Library Reference]] > INIClass > INIClass Methods >====== Update (write INI file entries) {{c6h0009.jpg|C6H0009.jpg}} ====== | [[tryfetchfield return comma delimited ini file value .htm|{{btn_prev_n.gif|Previous page}}]][[abc library reference.htm|{{btn_home_n.gif|Return to chapter overview}}]][[jsondataclass overview.htm|{{btn_next_n.gif|Next page}}]] | | || | | **Update(**// section//**//,//** | **|****// //**//entry//**//, //**//value//**|**** ****), VIRTUAL** | | | | | //entry//, //value//, //filename//| | | | | |// window//| | | | | | //entry, queue//, //field, //[//field//]//, //[//field//] | | {{blk2blue.jpg|blk2blue.jpg}} | **Update** | Writes entries to the INI file. | | //section// | A string constant, variable, EQUATE, or expression containing the INI file section name. | | //entry// | A string constant, variable, EQUATE, or expression containing the INI file entry name. | | //value// | A constant, variable, EQUATE, or expression containing the value to store for the //section //and //entry//. | | //filename// | A string constant, variable, EQUATE, or expression containing the INI file name. If //filename //specifies a full path, the Update method looks for the file in the specified path. If no path is specified, the Update method looks for the file in the Windows directory. If //filename //is specified as null (''), the Fetch method uses the WIN.INI file. | | //window// | The label of a WINDOW or APPLICATION whose position and size parameters the Update method stores. | | //queue// | The label of a QUEUE. | | //Field// | The label of a FIELD within the QUEUE. | The **Update **method writes entries to the INI file. If the specified value is null (''), the existing entry is deleted. | **Update**(//section,entry,value//) | Writes a single value specified by //section //and //entry //to the INI file specified in the INIClass.FileName property. | | **Update**(//section,entry,value,filename//) | Writes a single value specified by //section //and //entry //to the INI file specified by //filename//. | | **Update**(//section,window//) | Writes several WINDOW position and size attributes to the INI file specified in the INIClass.FileName property, for retrieval by a subsequent corresponding call to Fetch(//section,window//). Restoring the values returns the specified WINDOW to its saved position and size. | | **Update**(//queue//, //field, //[//field//]//, //[//field//] ) | Writes the records of a QUEUE with a maximum of three fields to the INI file specified in the INIClass.FileName property. | **Implementation:** If a //window //is present, the Update method writes five entries to the specified INI file //section//: Maximize, XPos, YPos, Height, and Width. These entries are retrieved and applied by the Fetch method to restore the window's position and size. **Example:** **Sound   STRING('ON ')** **PWindow  WINDOW('Preferences'),AT(,,89,34),IMM,MAX,RESIZE** **          CHECK('&Sound'),AT(8,6),USE(Sound),VALUE('ON','OFF')** **          BUTTON('OK'),AT(57,3,30,10),USE(?OK)** **         END** ** CODE** ** OPEN(PWindow)** ** INIMgr.Fetch('Preferences',PWindow)         !restore PWindow size & position** ** INIMgr.Update('Preferences',PWindow)        !save PWindow size & position** **See Also:**     [[fetch get ini file entries .htm|Fetch]] , [[putini set ini file entry .htm|PUTINI]]