![Copy image Copy image](copycode.gif)
![CopyHover image CopyHover image](copycodeHighlight.gif)
Deployment Tools Foundation
Replace Method (record)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.WindowsInstaller ► View ► Replace(Record)
Updates or deletes and inserts a Record into the View.
![](collapse_all.gif)
C# | Visual Basic | Visual C++ | F# |
public void Replace( Record record )
Public Sub Replace ( record As Record )
public: void Replace( Record^ record )
member Replace : record : Record -> unit
![](collapse_all.gif)
- record (Record)
- the Record to be replaced
![](collapse_all.gif)
The Record must have been obtained by calling Fetch()()()(). Updates record if the primary keys are unchanged. Deletes old row and inserts new if primary keys have changed. Fails with a read-only database. This method cannot be used with a View containing joins.
See Modify(ViewModifyMode, Record) for more remarks.
Win32 MSI API: MsiViewModify
![](collapse_all.gif)
Exception | Condition |
---|---|
InstallerException | the replacement failed |
InvalidHandleException | the View handle is invalid |
Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.11.1.2318)