Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

MsiRecordSetString function

The MsiRecordSetString function copies a string into the designated field.

Syntax


UINT MsiRecordSetString(
  _In_ MSIHANDLE    hRecord,
  _In_ unsigned int iField,
  _In_ LPCTSTR      szValue
);

Parameters

hRecord [in]

Handle to the record.

iField [in]

Specifies the field of the record to set.

szValue [in]

Specifies the string value of the field.

Return value

ERROR_INVALID_HANDLE

An invalid or inactive handle was supplied.

ERROR_INVALID_PARAMETER

An invalid parameter was passed to the function.

ERROR_SUCCESS

The function succeeded.

Remarks

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.

Requirements

Version

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

Header

Msiquery.h

Library

Msi.lib

DLL

Msi.dll

Unicode and ANSI names

MsiRecordSetStringW (Unicode) and MsiRecordSetStringA (ANSI)

See also

Record Processing Functions

 

 

Community Additions

ADD
Show:
© 2015 Microsoft