Replace Method (record)

DTF API

Copy image CopyHover image
Deployment Tools Foundation Replace Method (record)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerViewReplace(Record)
Updates or deletes and inserts a Record into the View.
Declaration Syntax
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 
Parameters
record (Record)
the Record to be replaced
Remarks

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

Exceptions
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)