Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

MsiDatabaseOpenView returns 1615 with 2 transforms


1 reply to this topic

derekf

derekf
  • Full Members
  • 3 posts

Posted 01 June 2011 - 14:33

We have some tools that we are required to run against the packages we create, and our packaging standards have evolved to the point where we have two transforms for each MSI.

These internal tools don't like running against MSIs with two transforms. Even simple queries such as "SELECT * FROM `Property`" fail with return value 1615. Found a forum thread that talked about getting that return value when querying against tables that didn't exist - but Property should be valid.

Code to reproduce (C#):

CODE

           IntPtr dbhandle = IntPtr.Zero;
           IntPtr viewhandle = IntPtr.Zero;
           int result = 0;

           MsiOpenDatabase(@"<base MSI path goes here>", (IntPtr)2, ref dbhandle);

           // Apply transforms 1 and 2
           MsiDatabaseApplyTransform(dbhandle, @"<first transform path>", 0);
           MsiDatabaseApplyTransform(dbhandle, @"<second transform path>", 0);

           viewhandle = IntPtr.Zero;
           result = MsiDatabaseOpenView(dbhandle, "SELECT * FROM `Property`", ref viewhandle); // Returns 1615


The wierd part: If I remove either transform, the return value becomes 0, and the packages install just fine with both transforms. I've set "voicewarmup" in the registry, but there doesn't seem to be any logging going on. Both of the "MsiDatabaseApplyTransform" entries are returning 0. Problem has occurred on every package I've tested with that had two transforms.

Anyone know what's happening here, or have any suggestions on where to look?

derekf

derekf
  • Full Members
  • 3 posts

Posted 07 June 2011 - 19:20

MsiGetLastErrorRecord and debug output agree that the root error is
CODE
1: 2229 2: <path> 3: Property 4: SELECT * FROM `Property`
Near as I can tell, 2229 would be an error trying to open that table.

Changed the "(IntPtr) 2" to "IntPtr.Zero" to open the MSI as Read-Only -- otherwise when the problem occurred (only with two transforms) the program would corrupt the base MSI. Since that change, the MSI doesn't get modified, but the 1615 still occurs.