MSI Factory 2.3

MSI.RecordClearData

MSI.RecordClearData

This is the first topic This is the last topic  

MSI.RecordClearData

This is the first topic This is the last topic  

OverviewExamples

boolean MSI.RecordClearData (

number hRecord )

Example 1

bRecordClear = MSI.RecordClearData(record);

Sets all the fields in the record to null given the record handle named "record," and returns true in the variable "bRecordClear" if successful.

Example 2

-- Create a new record

record = MSI.CreateRecord(46546);

 

-- Set an integer

bRecordSet = MSI.RecordSetInteger(record, 6, 17);

 

if bRecordSet then

   Dialog.Message("Success","Record Set properly.");

else

   Dialog.Message("Error","Error setting record.");

end

 

-- Retrieve the integer

nInteger = MSI.RecordGetInteger(record, 6);

 

Dialog.Message("nInteger",nInteger);

 

-- Clear the record

bRecordClear = MSI.RecordClearData(record);

 

-- Try to retrieve the integer again

nCleared = MSI.RecordGetInteger(record, 6);

 

if (nInteger == nCleared) then

   Dialog.Message("Error", "MSI.RecordClearData() failed to clear record.");

end

 

-- Clode the handle to the record

bClosed = MSI.CloseHandle(record);

Creates a record, writes to it, and reads the value. This script also contains some error handling.

See also: Related Actions


Learn More: Indigo Rose Software - MSI Factory - Buy Now - Contact Us