MSI Factory 2.3

MSI.ViewClose

MSI.ViewClose

This is the first topic This is the last topic  

MSI.ViewClose

This is the first topic This is the last topic  

OverviewExamples

boolean MSI.ViewClose (

number hView )

Example 1

hDatabase = MSI.GetActiveDatabase(_hInstall);

if (hDatabase ~= 0) then

 

   strQuery = "SELECT * FROM `Feature`";

   hView = MSI.DatabaseOpenView(hDatabase, strQuery);

 

   if (hView ~= 0) then

 

       bExecuteResult = MSI.ViewExecute(hView, 0);

       if (bExecuteResult) then

           bContinue = true;

           strValues = "The Feature IDs are:\r\n\r\n";

 

           while (bContinue) do

               hRecord = MSI.ViewFetch(hView);

               if (hRecord ~= 0) then

                   strRecordString = MSI.RecordGetString(hRecord, 1);

                   strValues = strValues..strRecordString.."\r\n";

               else

                   bContinue = false;

                   MSI.CloseHandle(hRecord);

               end

           end

       end

 

       Dialog.Message("Feature IDs", strValues);

 

       MSI.ViewClose(hView);

       MSI.CloseHandle(hView);

 

   end

 

   MSI.CloseHandle(hDatabase);

end

Gets all of the feature IDs from the "Features" table and shows them in a dialog message.

See also: Related Actions


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