cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
RvHaandel
Level 3

Result MsiDatabaseOpenView stays 1615

Hey everyone,

During our migration from Installshield 10.5 to Installshield 2008 I encounter this problem:

When I run this piece of code I receive an nResult that has the value: 1615

function _Get_View( hInstall, strTableName, hTableView, hDataBase )
string strQuery;
number nResult;
HWND hView;
begin
(Comments: strTableName = "Condition")
// Select all columns and all rows in the named table
strQuery = "SELECT * FROM " + strTableName;

// Obtain a handle to the active database
hDataBase = MsiGetActiveDatabase( hInstall );

if( hDataBase = 0 ) then
MessageBox( "Unable to open active database", SEVERE );
abort;
endif;

// create a view object as specified by strQuery
nResult = MsiDatabaseOpenView( hDataBase, strQuery, hView );
(Comments: nResult = 1615 here)
if ( nResult != ERROR_SUCCESS ) then
MessageBox( "Error opening view on table " + strTableName, SEVERE );
abort;
endif;
end;

I really don't understand what the problem is because this same code always worked in Installshield 10.5.

Can someone please help me out?
Labels (1)
0 Kudos
(7) Replies
RobertDickau
Flexera Alumni

Error 1615 is ERROR_BAD_QUERY_SYNTAX, so perhaps strTable or strQuery isn't being set? Does an MSI log file (or displaying the values in a message box) give any more information about where the query fails?
0 Kudos
RvHaandel
Level 3

Hi Robert,

I enabled the MSI logging and the query was in the logging. This is the exact copy:

MSI (c) (30!90) [11:42:28:769]: Note: 1: 2228 2: 3:
Condition 4: SELECT * FROM `Condition`

I hope you can tell me more...
0 Kudos
Not applicable

Note 2228 means that the Condition Table doesn't exist. InstallShield 12 and later all drop empty tables, so this can happen if you do not have any Feature Conditions in your installation package.

You can further look this and other notes/errors up here: http://msdn2.microsoft.com/en-us/library/aa372835.aspx
0 Kudos
RvHaandel
Level 3

bryanwolf wrote:
Note 2228 means that the Condition Table doesn't exist. InstallShield 12 and later all drop empty tables, so this can happen if you do not have any Feature Conditions in your installation package.

You can further look this and other notes/errors up here: http://msdn2.microsoft.com/en-us/library/aa372835.aspx


Thank you very much! I will go on right away! See if I can solve it.
0 Kudos
DLee65
Level 13

Is there a way to force a particular table to not be removed to prevent this error other than putting a pseudo value in the table?
0 Kudos
MichaelU
Level 12 Flexeran
Level 12 Flexeran

Assuming you're talking about by the InstallShield 12 and later build process, see support\0409\settings.xml under the InstallShield installation directory and look for the EmptyTableDisposition element.
0 Kudos
DLee65
Level 13

Michael ... You da man! I knew there was a way but I was forgetting the process for doing this.

I humbly bow before your great wisdom :D!
0 Kudos