MsiRecordSetStringA function

The MsiRecordSetString function copies a string into the designated field.


UINT MsiRecordSetStringA(
  MSIHANDLE hRecord,
  UINT      iField,
  LPCSTR    szValue



Handle to the record.


Specifies the field of the record to set.


Specifies the string value of the field.

Return Value

This function returns UINT.


In the MsiRecordSetString function, a null string pointer and an empty string both set the field to null. Attempting to store a value in a nonexistent field causes an error.

To set a record string field to null, set szValue to either a null string or an empty string.


Minimum supported client Windows Installer 5.0 on Windows Server 2012, Windows 8, Windows Server 2008 R2 or Windows 7. Windows Installer 4.0 or Windows Installer 4.5 on Windows Server 2008 or Windows Vista. Windows Installer on Windows Server 2003 or Windows XP
Target Platform Windows
Header msiquery.h
Library Msi.lib
DLL Msi.dll

See Also

Record Processing Functions