Modify Method (mode, record)

DTF API

Copy image CopyHover image
Deployment Tools Foundation Modify Method (mode, record)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerViewModify(ViewModifyMode, Record)
Updates a fetched Record.
Declaration Syntax
C# Visual Basic Visual C++ F#
public void Modify(
	ViewModifyMode mode,
	Record record
)
Public Sub Modify ( 
	mode As ViewModifyMode,
	record As Record
)
public:
void Modify(
	ViewModifyMode mode, 
	Record^ record
)
member Modify : 
        mode : ViewModifyMode * 
        record : Record -> unit 
Parameters
mode (ViewModifyMode)
specifies the modify mode
record (Record)
the Record to modify
Remarks

You can update or delete a record immediately after inserting, or seeking provided you have NOT modified the 0th field of the inserted or sought record.

To execute any SQL statement, a View must be created. However, a View that does not create a result set, such as CREATE TABLE, or INSERT INTO, cannot be used with any of the Modify methods to update tables though the view.

You cannot fetch a record containing binary data from one database and then use that record to insert the data into another database. To move binary data from one database to another, you should export the data to a file and then import it into the new database using a query and the SetStream(Int32, String). This ensures that each database has its own copy of the binary data.

Note that custom actions can only add, modify, or remove temporary rows, columns, or tables from a database. Custom actions cannot modify persistent data in a database, such as data that is a part of the database stored on disk.

Win32 MSI API: MsiViewModify

Exceptions
Exception Condition
InstallerException the modification failed, or a validation was requested and the data did not pass
InvalidHandleException the View handle is invalid

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller.dll) Version: 3.0.0.0 (3.11.1.2318)