I am trying to access the msi database using VB6 (the following code):
--------
Dim installer: Set installer = Nothing
Set installer = CreateObject("WindowsInstaller.Installer")
Dim database: Set database = installer.OpenDatabase("C:\\testmsi.msi", msiOpenDatabaseModeTransact)
strUpdatePropertySql = "SELECT * from 'Property'"
Dim view: Set view = database.OpenView(strUpdatePropertySql)
---------
but 'Set view = database.OpenView(strUpdatePropertySql)' statement is giving an error
"Msi API error 80004005: OpenView,Sql
1: 2228 2: c:\\testmsi.msi 3: Property 4: select * from 'Property' "
I have internet explorer 6 on my machine. I have absolutely no clue why i m getting this error ?????
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.
database.OpenView giving error
Started by
KapilMarwah
, Jul 02 2004 14:25
6 replies to this topic
Posted 02 July 2004 - 16:20
Why "C:\\testmsi.msi" instead of "C:\testmsi.msi" (I think Win9x don't know how to resolve this, WinNT bases systems should resolve the double backslash)? Is the file read-only? Is the file extension really *.msi and not *.ism or *.isv or similar?
Regards
-Stein Åsmul
-Stein Åsmul
Posted 02 July 2004 - 16:23
Did a search, I would definitely check that path: http://www.dotnet247.../50/251465.aspx
Regards
-Stein Åsmul
-Stein Åsmul
Posted 05 July 2004 - 09:07
A description for error 2228 (and many others) can be found here:
http://msdn.microsof...or_messages.asp
Try 'Properties'
http://msdn.microsof...or_messages.asp
Try 'Properties'
Posted 05 July 2004 - 09:22
Good one Zweite. KapilMarwah, you can always find the table names by opening the MSI file in Orca or using Installshield's Direct Editor view.
Regards
-Stein Åsmul
-Stein Åsmul
Posted 06 July 2004 - 04:13
One more detail: if you don't need to get all properties at once, the MsiGetProperty and MsiSetProperty functions should let you access the property table without using SQL.
Regards
-Stein Åsmul
-Stein Åsmul
Posted 15 July 2004 - 17:45
I got the solution .... the problem is 'Property' ...quotation marks around Property .... instead i used `Property`..... and it works....