ValidateFields Method (record)

DTF API

Copy image CopyHover image
Deployment Tools Foundation ValidateFields Method (record)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerViewValidateFields(Record)
Validates fields of a fetched or new record, returning information about any errors. Can validate one or more fields of an incomplete record.
Declaration Syntax
C# Visual Basic Visual C++ F#
public ICollection<ValidationErrorInfo> ValidateFields(
	Record record
)
Public Function ValidateFields ( 
	record As Record
) As ICollection(Of ValidationErrorInfo)
public:
ICollection<ValidationErrorInfo>^ ValidateFields(
	Record^ record
)
member ValidateFields : 
        record : Record -> ICollection<ValidationErrorInfo> 
Parameters
record (Record)
the Record to be validated
Return Value
ICollection<(Of <(<'ValidationErrorInfo>)>)>
null if the record was validated; if there is an existing record with the same primary keys that has conflicting data then error information is returned
Remarks

Works with read-write and read-only records. This method cannot be used with a View containing joins.

See Modify(ViewModifyMode, Record) for more remarks.

Win32 MSI APIs: MsiViewModify, MsiViewGetError

Exceptions
Exception Condition
InstallerException the validation failed (for a reason other than invalid data)
InvalidHandleException the View handle is invalid

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