RecordAsBuffer class | QSYS API Reference Guide

Estimated reading time: 6 minutes

Defines operations to move data between a file record, a row in a dataset, and a string buffer.

Namespace: ASNA.QSys.Runtime Assembly: ASNA.QSys.Runtime.dll

Inheritance: Object

Methods

Signature Description
BufferToRecord(DataRow, String) Deserialize a string containing a record of RPG-encoded data into a DataRow.
BufferToRecord(AdgDataSet, String, String) Deserialize a string containing a record of RPG-encoded data into a DataRow.
GetDateFormatString(DateTimeFormat) Creates the string pattern to format a fixed date value.
GetDateFormatStringNoSeparator(DateTimeFormat) Creates the string pattern to format a fixed date value without a separator character.
GetDateFormatStringNoSeparator(String) Creates the string pattern to format a fixed date value without a separator character.
GetFormatString(String, String) Creates the string pattern to format a fixed date/time/timestamp value.
GetFormatString(Int32, String) Creates the string pattern to format a fixed date/time/timestamp value.
GetFormatStringNoSeparator(Int32, String) Creates the string pattern to format a fixed date/time/timestamp value without a separator character.
GetTimeFormatString(DateTimeFormat) Creates the string pattern to format a fixed time value.
GetTimestampFormatString() Creates the string pattern to format a fixed timestamp value.
RecordToBuffer(AdgDataSet, String) Returns a StringBuilder object with the contents of a file record, intepreting the datarow column contents as fixed-format values.

bool BufferToRecord(DataRow row, string buffer)

Deserialize a string containing a record of RPG-encoded data into a DataRow.

bool BufferToRecord(DataRow row, string buffer)

Parameters

Type Parameter name Description
DataRow row The DataRow to load with data.
String buffer The string buffer contianing the data.

Returns

Type Description
Boolean True if the operation is successful.

bool BufferToRecord(AdgDataSet dataSet, string formatName, string buffer)

Deserialize a string containing a record of RPG-encoded data into a DataRow.

bool BufferToRecord(AdgDataSet dataSet, string formatName, string buffer)

Parameters

Type Parameter name Description
AdgDataSet dataSet The AdgDataSet object that contains the table row to load.
String formatName The name of the table.
String buffer The string buffer contianing the data.

Returns

Type Description
Boolean True if the operation is successful.

string GetDateFormatString(DateTimeFormat format)

Creates the string pattern to format a fixed date value.

string GetDateFormatString(DateTimeFormat format)

Parameters

Type Parameter name Description
DateTimeFormat format The DateTimeFormat enum value for the requested fixed date format.

Returns

Type Description
String The string pattern for the requested fixed date format.

string GetDateFormatStringNoSeparator(DateTimeFormat format)

Creates the string pattern to format a fixed date value without a separator character.

string GetDateFormatStringNoSeparator(DateTimeFormat format)

Parameters

Type Parameter name Description
DateTimeFormat format The DateTimeFormat enum value for the requested fixed date format.

Returns

Type Description
String The string pattern for the requested fixed date format, with no separator character.

string GetDateFormatStringNoSeparator(string format)

Creates the string pattern to format a fixed date value without a separator character.

string GetDateFormatStringNoSeparator(string format)

Parameters

Type Parameter name Description
String format The DateTimeFormat enum value as a string.

Returns

Type Description
String The string pattern for the requested fixed date format, with no separator character.

string GetFormatString(string subType, string kind)

Creates the string pattern to format a fixed date/time/timestamp value.

string GetFormatString(string subType, string kind)

Parameters

Type Parameter name Description
String subType The DateTimeFormat enum value as a string.
String kind The kind as a string, one of “DATE”, “TIME”, or “TIMESTAMP”.

Returns

Type Description
String The string pattern for the requested fixed date/time/timestamp format.

string GetFormatString(int subType, string kind)

Creates the string pattern to format a fixed date/time/timestamp value.

string GetFormatString(int subType, string kind)

Parameters

Type Parameter name Description
Int32 subType The DateTimeFormat enum value as an integer.
String kind The kind as a string, one of “DATE”, “TIME”, or “TIMESTAMP”.

Returns

Type Description
String The string pattern for the requested fixed date/time/timestamp format.

string GetFormatStringNoSeparator(int subType, string kind)

Creates the string pattern to format a fixed date/time/timestamp value without a separator character.

string GetFormatStringNoSeparator(int subType, string kind)

Parameters

Type Parameter name Description
Int32 subType The DateTimeFormat enum value as an integer.
String kind The kind as a string, one of “DATE”, “TIME”, or “TIMESTAMP”.

Returns

Type Description
String The string pattern for the requested fixed date/time/timestamp format, with no separator character.

string GetTimeFormatString(DateTimeFormat format)

Creates the string pattern to format a fixed time value.

string GetTimeFormatString(DateTimeFormat format)

Parameters

Type Parameter name Description
DateTimeFormat format The DateTimeFormat enum value for the requested fixed time format.

Returns

Type Description
String The string pattern for the requested fixed time format.

string GetTimestampFormatString()

Creates the string pattern to format a fixed timestamp value.

string GetTimestampFormatString()

StringBuilder RecordToBuffer(AdgDataSet dataSet, string formatName)

Returns a StringBuilder object with the contents of a file record, intepreting the datarow column contents as fixed-format values.

StringBuilder RecordToBuffer(AdgDataSet dataSet, string formatName)

Parameters

Type Parameter name Description
AdgDataSet dataSet The AdgDataSet object where the record exists.
String formatName The name of the record format.

Returns

Type Description
StringBuilder The StringBuilder object with the contents of the record format.