![Copy image Copy image](copycode.gif)
![CopyHover image CopyHover image](copycodeHighlight.gif)
Deployment Tools Foundation
ValidateNew Method (record)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.WindowsInstaller ► View ► ValidateNew(Record)
Validates a new record, returning information about any errors.
![](collapse_all.gif)
C# | Visual Basic | Visual C++ | F# |
public ICollection<ValidationErrorInfo> ValidateNew( Record record )
Public Function ValidateNew ( record As Record ) As ICollection(Of ValidationErrorInfo)
public: ICollection<ValidationErrorInfo>^ ValidateNew( Record^ record )
member ValidateNew : record : Record -> ICollection<ValidationErrorInfo>
![](collapse_all.gif)
- record (Record)
- the Record to be validated
![](collapse_all.gif)
ICollection<(Of <(<'ValidationErrorInfo>)>)>
null if the record was validated; if there is an existing record with the same primary keys then error information is returned
null if the record was validated; if there is an existing record with the same primary keys then error information is returned
![](collapse_all.gif)
Checks for duplicate keys. The Record must have been obtained by calling Fetch()()()(). 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
![](collapse_all.gif)
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)