CreateRecord Method (fieldCount)

DTF API

Copy image CopyHover image
Deployment Tools Foundation CreateRecord Method (fieldCount)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerDatabaseCreateRecord(Int32)
Creates a new record object with the requested number of fields.
Declaration Syntax
C# Visual Basic Visual C++ F#
public Record CreateRecord(
	int fieldCount
)
Public Function CreateRecord ( 
	fieldCount As Integer
) As Record
public:
Record^ CreateRecord(
	int fieldCount
)
member CreateRecord : 
        fieldCount : int -> Record 
Parameters
fieldCount (Int32)
Required number of fields, which may be 0. The maximum number of fields in a record is limited to 65535.
Return Value
Record
A new record object that can be used with the database.
Remarks

This method is equivalent to directly calling the Record constructor in all cases outside of a custom action context. When in a custom action session, this method allows creation of a record that can work with a database other than the session database.

The Record object should be Close()()()()d after use. It is best that the handle be closed manually as soon as it is no longer needed, as leaving lots of unused handles open can degrade performance.

Win32 MSI API: MsiCreateRecord

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